IPA导出使用XCodebuild和shell脚本

时间:2017-03-13 15:09:33

标签: ios shell provisioning-profile ipa xcodebuild

我一直在寻找一种使用Xcodebuild和shell脚本导出IPA的方法,我发现所有这些都是旧代码甚至XCodebuild错误对我来说都是不可理解的。如果有人试图这样做并找到了解决方案,那将是非常棒的和有帮助的

PS:事实上我已经找到了一个解决这个脚本来生成IPA的解决方案

这是我的代码

xcodebuild clean -workspace "${WORKSPACE_ABSOLUT_PATH}" -scheme "${SHEME_NAME}" -configuration Release

###Cleaning XCodeproj(Without Pods)

xcodebuild clean -project "${PROJECT_ABSOLUT_PATH}" -scheme "${SHEME_NAME}" -configuration Release

####Setting (Prod) Boolean value



#echo -n "" >"${PLIST_CONFIGURATION_NAME}"
##
#echo "Prod boolean value is  $8"
##
#echo "<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>Prod</key><${PROD_BOOLEAN_VALUE}/></dict></plist>" >> "${PLIST_CONFIGURATION_NAME}"
##
#head "${PLIST_CONFIGURATION_NAME}"
#
#
###Preparing Archive (Generate .xcarchive file)
##
xcodebuild archive -workspace "${WORKSPACE_ABSOLUT_PATH}" -scheme "${SHEME_NAME}" -archivePath "${ARCHIVE_ABSOLUT_PATH}"
##
#
##Export Archive file (.xcarchive) to (.ipa) file
#
xcodebuild -exportArchive -archivePath "${ARCHIVE_ABSOLUT_PATH}"  -exportPath "${IPA_ABSOLUT_EXPORT_PATH}" -exportFormat ipa -exportProvisioningProfile "${PROVISIONING_PROFILE_NAME}"

1 个答案:

答案 0 :(得分:0)

从Xcode 8.3开始,您将无法为ipa选择配置文件... 看看这个工具是否对你有帮助 https://github.com/johnny77221/export-IPA