成功clean环境和生成archive文件之后,最后一步导出ipa包,遇到了权限问题:
you don’t have permission to save the file “HelloWorld.ipa” in the folder “HelloWorld
报错如下:
1 apple:HelloWorld wangju$ xcodebuild -exportArchive -archivePath build/HelloWorld.xcarchive -exportPath /build/HelloWorld/HelloWorld.ipa -exportOptionsPlist /Users/5i5j/Desktop/test/build/ExportOptions.plist 2 2019-08-15 13:00:44.623 xcodebuild[8380:246170] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/0l/l9z17kfn7tjb_k9_fmhsr9lr0000gn/T/HelloWorld_2019-08-15_13-00-44.623.xcdistributionlogs'. 3 error: exportArchive: You don’t have permission to save the file “HelloWorld.ipa” in the folder “HelloWorld”. 4 5 Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “HelloWorld.ipa” in the folder “HelloWorld”." UserInfo={NSFilePath=/build/HelloWorld/HelloWorld.ipa, NSUnderlyingError=0x7ff1e06925f0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}} 6 7 ** EXPORT FAILED **
这样改了也没用:https://blog.csdn.net/qq_27127385/article/details/89308551
那好吧,换个思路,既然没有权限往HelloWorld(项目所在文件夹)导出ipa,那我换一个文件夹
导出成功,问题解决了
1 apple:HelloWorld machenglin$ xcodebuild -exportArchive -archivePath build/HelloWorld.xcarchive -exportPath /Users/5i5j/Desktop/test/build/HelloWorld/HelloWorld.ipa -exportOptionsPlist /Users/5i5j/Desktop/test/build/ExportOptions.plist 2 2019-08-15 13:02:56.596 xcodebuild[8630:248915] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/0l/l9z17kfn7tjb_k9_fmhsr9lr0000gn/T/HelloWorld_2019-08-15_13-02-56.595.xcdistributionlogs'. 3 Exported HelloWorld to: /Users/5i5j/Desktop/test/build/HelloWorld/HelloWorld.ipa 4 ** EXPORT SUCCEEDED **