美文网首页iOS 持续化集成
xcodebuild exportOptionsPlist

xcodebuild exportOptionsPlist

作者: 2b75747cf703 | 来源:发表于2017-05-10 17:41 被阅读1513次
#!/bin/sh

xcodePath=$1
projectPath=$2

archivePath="build/Unity-iPhone.xcarchive"
exportPath=$3 #Unity-iPhone.ipa
provisioningProfile=$4 #iOS_Distribution

ipaDir=${exportPath%/*}

mkdir $ipaDir

cd $projectPath

${xcodePath}/Contents/Developer/usr/bin/xcodebuild -scheme Unity-iPhone clean archive -archivePath $archivePath

# ${xcodePath}/Contents/Developer/usr/bin/xcodebuild -exportArchive -exportFormat ipa -archivePath $archivePath -exportPath $exportPath -exportProvisioningProfile "$provisioningProfile"
${xcodePath}/Contents/Developer/usr/bin/xcodebuild -exportArchive -archivePath $archivePath -exportPath $ipaDir -exportOptionsPlist exportOptions.plist
mv $ipaDir/Unity-iPhone.ipa $exportPath

# ${xcodePath}/Contents/Developer/usr/bin/xcodebuild build

# cd ${projectPath}/build/Release-iphoneos/

# ${xcodePath}/Contents/Developer/usr/bin/xcrun -sdk iphoneos packageapplication -v *.app -o $exportPath

exit $?

exportOptions.plist

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>method</key>
    <string>app-store</string>
    <key>teamID</key>
    <string>xxxxxxxxxx</string>
    <key>compileBitcode</key>
    <false/>
    <key>uploadSymbols</key>
    <false/>
</dict>
</plist>

method: (String) The method of distribution, which can be set as any of the following:
app-store
enterprise
ad-hoc
development
teamID: (String) The development program team identifier.
uploadSymbols: (Boolean) Option to include symbols in the generated ipa file.
uploadBitcode: (Boolean) Option to include Bitcode.

注意:teamID是十位字符串,企业包需要移除。

相关文章

网友评论

  • FengxinLi:请问一下楼主 生成了 xcarchive 文件 然后到处ipa包的时候 -exportOptionsPlist exportOptions.plist 这个参数后面的文件必须自己创建吗?
    该用户昵称已被重置:自己创建一个plist,里面就是个字典,命名可以随便,内容要符合上述要求。
    详细最新内容,请参考xcodebuild --help
  • 12e4ae453799:同问,exportOptions.plist在哪里?
    该用户昵称已被重置:自己创建一个plist,里面就是个字典,命名可以随便,内容要符合上述要求。
    详细最新内容,请参考xcodebuild --help
    LeoZzz:导出ipa包的时候
  • 大心脏:请问exportOptions.plist这个文件在哪里能找到呢?
    该用户昵称已被重置:自己创建一个plist,里面就是个字典,命名可以随便,内容要符合上述要求。
    详细最新内容,请参考xcodebuild --help

本文标题:xcodebuild exportOptionsPlist

本文链接:https://www.haomeiwen.com/subject/sqmgtxtx.html