现在真的让我筋疲力尽,我所要做的就是使用Xcode命令行工具构建Xcode CLI。
流程如下:
问题是档案部分一直失败,我无法让它发挥作用。令人讨厌的是,如果我在Xcode中打开项目并通过那里存档它,它可以正常工作,但这会破坏这个自动化过程的重点。
这是命令xcodebuild -verbose -scheme EpicHRV1.1.0 -archivePath ios/app.xcarchive archive
这是不断产生的错误。我真的无法弄清楚它的抱怨是什么,我的意思是,它说明了与Alamofire和缺少的模块有关,但为什么这会在Xcode中工作而不是命令行?
Command failed: xcodebuild -verbose -scheme EpicHRV1.1.0 -archivePath ios/app.xcarchive archive
2017-01-07 20:24:04.255 xcodebuild[43780:2460638] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-11754/DVTFoundation/Utilities/DVTFileSystemUtilities.mm:142
Details: lstat('/Users/Justin/Library/Developer/Xcode/DerivedData/EpicHR-dgdtmzwowkyxgkfzmizhuhiaxkrt/Build/Intermediates/ArchiveIntermediates/EpicHRV1.1.0/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework/Modules') failed with errno 2 (No such file or directory)
Function: DVTRecursiveMkdirResult dvt_recursiveMkdir_returningErrorString(NSString *__strong, NSString *__autoreleasing *)
Thread: <NSThread: 0x7f90e8ae7cf0>{number = 7, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
** ARCHIVE FAILED **
这是另一个可爱的错误,也随机出现,但不是每次......
The following build commands failed:
SymLink /Users/Justin/Library/Developer/Xcode/DerivedData/EpicHR-dgdtmzwowkyxgkfzmizhuhiaxkrt/Build/Intermediates/ArchiveIntermediates/EpicHRV1.1.0/BuildProductsPath/Release-iphoneos/Alamofire.framework /Users/Justin/Library/Developer/Xcode/DerivedData/EpicHR-dgdtmzwowkyxgkfzmizhuhiaxkrt/Build/Intermediates/ArchiveIntermediates/EpicHRV1.1.0/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework
有时会出现另一个错误。综上所述,唯一一致的是Alamofire在错误中提到..
The following build commands failed:
Strip /Users/Justin/Library/Developer/Xcode/DerivedData/EpicHR-dgdtmzwowkyxgkfzmizhuhiaxkrt/Build/Intermediates/ArchiveIntermediates/EpicHRV1.1.0/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework/Alamofire
答案 0 :(得分:0)
所以我用以下命令解决了它:
xcodebuild -scheme EpicHRV1.1.0 -archivePath ../ios/app.xcarchive archive
xcrun xcodebuild -exportArchive -exportOptionsPlist exportPlist.plist -archivePath ../ios/app.xcarchive -exportPath ../ios/ipa/