XcodeGen生成单目标(iOS16和Xcode14)watchOS应用程序不工作

wwtsj6pe  于 2023-02-13  发布在  iOS
关注(0)|答案(1)|浏览(179)

我发现,新(iOS16 Xcode 14)引入的单目标watchOS应用程序在我试图用XcodeGen实现它时不起作用。
我收到以下错误:

Prepare build
note: Building targets in dependency order
error: Multiple commands produce '/Users/martin/Library/Developer/Xcode/DerivedData/WatchTestGen-eqtccuxbzqoyuncgwdiwyamlfkpb/Build/Products/Debug-watchsimulator/WatchTestWatch Watch App.app/WatchTestWatch Watch App'
    note: Target 'WatchTestWatch Watch App' (project 'WatchTestGen'): CopyAndPreserveArchs /Users/martin/Library/Developer/Xcode/DerivedData/WatchTestGen-eqtccuxbzqoyuncgwdiwyamlfkpb/Build/Products/Debug-watchsimulator/WatchTestWatch Watch App.app/WatchTestWatch Watch App
    note: Target 'WatchTestWatch Watch App' (project 'WatchTestGen') has a command with output '/Users/martin/Library/Developer/Xcode/DerivedData/WatchTestGen-eqtccuxbzqoyuncgwdiwyamlfkpb/Build/Products/Debug-watchsimulator/WatchTestWatch Watch App.app/WatchTestWatch Watch App'

Multiple commands produce '/Users/martin/Library/Developer/Xcode/DerivedData/WatchTestGen-eqtccuxbzqoyuncgwdiwyamlfkpb/Build/Products/Debug-watchsimulator/WatchTestWatch Watch App.app/WatchTestWatch Watch App'

Build failed    2022-08-30 16:41    1.2 seconds

我创建了一个包含失败的project.yml的样例项目,如下所示:https://github.com/MartinP7r/xcodegen-watch-sample
WatchTest.xcodeproj工作正常,而生成的WatchTestGen.xcodeproj则不正常。
这需要Xcode 14测试版。
我很乐意得到任何关于在我的项目或其他地方寻找错误的建议。🙏

pkwftd7m

pkwftd7m1#

我能够让这个工作。看起来目标类型应该简单地是application,而不是application.watchapp2

type: application
platform: watchOS

相关问题