iOS error: Multiple commands produce conflicting outputs for task LinkStoryboards
Solved
Mobile and Embedded
-
I couldn't see this error reported anywhere so thought it might be helpful to post the solution.
I'm in the process of moving our app from Qt5 to Qt 6.5. When building for iOS, I was getting the error:
error: Multiple commands produce conflicting outputs note: /Users/martin/workspace/camcops/build-camcops-Qt_6_5_1_qt_ios_armv8_64_install-Release/Release-iphoneos/camcops.app/LaunchScreen.storyboardc/ (for task: ["LinkStoryboards"]) note: /Users/martin/workspace/camcops/build-camcops-Qt_6_5_1_qt_ios_armv8_64_install-Release/Release-iphoneos/camcops.app/LaunchScreen.storyboardc/ (for task: ["LinkStoryboards"]) ... warning: duplicate output file '/Users/martin/workspace/camcops/build-camcops-Qt_6_5_1_qt_ios_armv8_64_install-Release/camcops.build/Release-iphoneos/camcops.build/LaunchScreen.storyboardc' on task: CompileStoryboard /Users/martin/workspace/camcops/tablet_qt/ios/LaunchScreen.storyboard (in target 'camcops' from project 'camcops') warning: duplicate output file '/Users/martin/workspace/camcops/build-camcops-Qt_6_5_1_qt_ios_armv8_64_install-Release/camcops.build/Release-iphoneos/camcops.build/LaunchScreen-SBPartialInfo.plist' on task: CompileStoryboard /Users/martin/workspace/camcops/tablet_qt/ios/LaunchScreen.storyboard (in target 'camcops' from project 'camcops')
Reading the iOS platform notes, it turns out that the method I was using to specify the storyboard file in my project .pro file no longer works in Qt6.5
Before the change I was doing this:
ios { ... app_launch_screen.files = $$files($${MY_SOURCE_ROOT}/ios/LaunchScreen.storyboard) QMAKE_BUNDLE_DATA += app_launch_screen ... }
I've now fixed the problem as follows:
ios { ... QMAKE_IOS_LAUNCH_SCREEN = $${MY_SOURCE_ROOT}/ios/LaunchScreen.storyboard ... }
-