我有一個項目具有多個構建配置和構建腳本,最近從Xcode 8遷移到Xcode9。它的構建和運行都適用於Xcode的模擬器和設備,並且可以正確存檔。但是,當我嘗試從命令行構建或存檔時,它會成功,但是應用程序在打開時(模擬器上)崩潰或給出錯誤消息(在設備上打開時)。Xcode 9:xcodebuild -exportArchive錯誤讀取文件:info.plist
從詹金斯持續集成歸檔,我跑
'xcodebuild -exportArchive -archivePath myApp.xcarchive -exportOptionsPlist ./build/exportArchive.plist -exportPath myApp.ipa'
,並創建一個IPA,但是當我嘗試打開IPA,它給了我這個錯誤:
"Unable To Install 'Error Reading File: info.plist' Please try again later."
and the app name itself is "ErrorReadingFile:info.plist"
當我打開導出的.ipa文件時,它沒有dSYMs或info.plist,只有一個帶有.app文件的Products文件夾,而.app文件除了一些iPad圖標圖像以外完全是空的(這應該是一個通用應用程序)。
此外, 當我運行構建和部署模擬器的命令:
xcodebuild -sdk iphonesimulator -configuration Debug -project myApp
xcrun simctl install <whatever device id> myApp.app
xcrun simctl launch <whatever device id> com.whatever.myApp
它成功地安裝應用程序,然後用無錯誤代碼發射後立即崩潰。 這是在報表中顯示的模擬器崩潰後:
Crashed Thread: 0 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: DYLD, [0x9]
我如何得到這個命令行正確編譯/運行/歸檔?