一、在OsX系统上安装Jenkins
二、打开终端,安装XCode的命令行工具
xcode-select --install
三、添加xcodeproj和fir-cli工具
gem install xcodeproj
gem install fir-cli
四、在~目录中新建一个Unity.rb文件,内容是需要对导出的iOS工程进行修改的脚本,其中
releaseTarget.frameworks_build_phase.add_file_reference 为添加链接库,内容如下:
require 'xcodeproj'
project = Xcodeproj::Project.open("Unity-iPhone.xcodeproj");
targets = project.native_targets();
releaseTarget = targets[0];
usrLibPath="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/";
libs = ["libstdc++.tbd", "libstdc++.6.0.9.tbd", "libz.1.2.5.tbd"];
libs.each do |name|
r = project.frameworks_group.new_file(usrLibPath+name, :sdk_root);
releaseTarget.frameworks_build_phase