准备工作:
* 向keychain导入证书,向xcode导入provisioning profile. 都是双击即可导入
* 在xcode中设置bundle id, 这个bundleid需要为将要使用签名的证书允许的.
* signing identity, provision(provisioning profile最好是anySDK也选上,但不知道是不是必须) , 并在preferences中增加对应的开发者账号(增加账号这步不知道是不是必须)
然后通过以下命令行得到工程的配置信息
<span style="font-family:Courier New;">xcodebuild -list
Information about project "Unity-iPhone":
Targets:
Unity-iPhone
Unity-iPhone Tests
Build Configurations:
Release
Debug</span>
*首先到iOS的工程目录
*然后运行如下命令,将工程按照指定的scheme编译成xrchive文件. 我的scheme比较简单,是默认的Unity-iPhone. 所有的certificate, profile, 都是按照xcode中设置选择的
<span style="font-family:Courier New;">xcodebuild -scheme Unity-iPhone -configuration Debug -archivePath build/.xcarchive archive</span>