#命令行打包———— 打包步骤
###1.准备
cd workspace_path
xcodebuild clean
xcodebuild
1 | echo "在项目工程文件内生成一个build子目录,里面有${project_name}.App程序" |
####制作ipa包完成…………………..
遇到问题:
1.xcrun: error: unable to find utility “PackageApplication”, not a developer tool or in PATH
解决方案:
Xcode升级到8.3后 用命令进行打包 提示下面这个错误
xcrun: error: unable to find utility “PackageApplication”, not a developer tool or in PATH
后面根据对比发现新版的Xcode少了这个PackageApplication先去找个旧版的Xcode里面copy一份过来放到下面这个目录:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/
然后执行命令
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
chmod +x /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication
最后附上PackageApplication下载地址:链接: https://pan.baidu.com/s/1jIPw0Iy 密码: 4htw
2.error: Specified application doesn’t exist or isn’t a bundle directory : ‘Build/Release-iphoneos/text.app’
解决方案:
打开你的 Xcode 快捷键Command + ,
选择最后一个 Location 点击 Advanced选择 Custom 选项 Relative to Workspace