在AppCenter上构建iOS应用和watchOS应用失败

时间:2020-06-03 14:26:44

标签: ios continuous-integration xcodebuild watchos

我在Xcode 11.5中向我现有的iOS应用程序添加了watchOS应用程序和扩展。这样做之后,我在AppCenter上的构建失败。

我使用CocoaPods在iOS应用程序中包含AppCenter SDK,但这可能无关紧要。

这是我得到的错误:

error: unable to resolve product type 'com.apple.product-type.watchkit2-extension' for platform 'iphoneos' (in target 'Watch Extension' from project 'MyApp')
error: unable to resolve product type 'com.apple.product-type.watchkit2-extension' for platform 'iphoneos' (in target 'Watch Extension' from project 'MyApp')
error: unable to resolve product type 'com.apple.product-type.application.watchapp2' for platform 'iphoneos' (in target 'Watch' from project 'MyApp')
error: unable to resolve product type 'com.apple.product-type.application.watchapp2' for platform 'iphoneos' (in target 'Watch' from project 'MyApp')

这是AppCenter用于存档项目的命令:

/usr/bin/xcodebuild -sdk iphoneos -workspace /Users/runner/runners/2.169.1/work/1/s/MyApp.xcworkspace -scheme Watch clean archive -archivePath /Users/runner/runners/2.169.1/work/1/output/build/archive/MyApp.xcarchive CODE_SIGNING_ALLOWED=NO

我可以在本地重现错误并通过删除-sdk iphoneos参数来解决它。但是,我看不到告诉AppCenter不要设置此参数的方法。任何建议将不胜感激。

0 个答案:

没有答案