Jenkins + Unity + IOS 构建IOS自动编译

来源:互联网 发布:淘宝换货能用运费险吗 编辑:程序博客网 时间:2024/06/05 09:12

1. IOS8的兼容问题


2. ios开发证书

   1. download个人开发者证书和发布证书,在Member Center中

        https://developer.apple.com/account/ios/certificate/certificateList.action?type=development

        下载相应的csr文件证书,双击安装        

注意:

  1. 开发者证书,用于开发调试,有了这个证书才能安装到ios设备进行真机调试
  2.  发布证书,用于生成ipa包,然后才能发布到app store。


    2. 下载provisioning file: 在Member center中下载相应的profile文件 注意:这里可以直接在xcode的preference中添加apple ID来自动下载。下载之后的路径在:

~/Library/MobileDevice/Provisioning\ Profiles/ <span style="font-family: Arial, Helvetica, sans-serif;">这个目录下面的每一个*.mobileprovision文件对应一个 profile,需要找到和前面的开发者或者发布证书对应的profile文件。</span>
</pre><h3>3. xcode UUID兼容性问题:</h3><pre code_snippet_id="515809" snippet_file_name="blog_20141111_1_9510140" name="code" class="html">[MT] PluginLoading: Required plug-in compatibility UUID A2E4D43F-41F4-4FB9-BB94-7177011C9AED for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin' not present in DVTPlugInCompatibilityUUIDs
解决办法:
<span style="white-space:pre"></span>把上面的UUID添加到文件 ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin/Contents/Info.plist中的DVTPlugInCompatibilityUUID。
</pre><h3>4. CodeSign Error </h3><pre code_snippet_id="515809" snippet_file_name="blog_20141111_1_9510140" name="code" class="html">Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “97dd696a-de0a-4461-a6d1-276081606d18”, however, no such provisioning profile was found
解决办法:
  1. 检查~/Library/MobileDevice/Provisioning\ Profiles/下面有没有对应的profile文件
  2. 检查keychain里边有没有开发者证书和发布者证书。注意一定要system组和login组都要有。还有无数条需要检查的
  3. 在xcode的Build Settings  页面中的Code Signing Identity选项中,Debug要设为iOS Developer(xxxx)(就是keychain中的开发者证书),Release要设为 iPhone Distributionxxxxx(就是keychain中的发布者证书)


5. “resource envelope is obsolete”

解决办法:

这个问题的原因是Mac 10.9.5之后CodeSign的一个bug。目前官方没有解决。有一个workaround,就是在PackageApplication脚本中给codesign添加一个“--no-strict”参数。

<span style="white-space:pre"></span>my $result = runCmd("/usr/bin/codesign", "--verify", "--no-strict", "-vvvv", , $plugin );
具体描述见:http://stackoverflow.com/questions/26008449/xcodebuild-codesign-vvvv-saysresource-envelope-is-obsolete


6: 打ipa包的时候找不到路径:

+ /usr/bin/zip --symlinks --verbose --recurse-paths ../iOSTest/build/iPhone.ipa/build/test.ipa .

解决办法:

ipa对应的输出路径用绝对路径,不要用相对路径。


7.


0 0