Solved Qt is dropping the SUPPORTED_PLATFORMS flag from the Xcode Project
-
I have updated to the latest Xcode and Qt. This has left me with deployment issues to iOS
xcodebuild: error: Unable to find a destination matching the provided destination specifier: { generic:1, platform:iOS } Available destinations for the "app" scheme: { platform:macOS, arch:x86_64 } { platform:macOS, arch:i386 } make: *** [xcodebuild-debug-device] Error 70
I can open the generated Xcode project file, set the parameter
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
It then builds and deploys in Xcode.
However, every time I hit build in Qt Creator, it wipes the Xcode project file dropping the platform parameter.
Is there a way I can get this to stick by putting it in my Qt .pro file, or some other way I can fix this issue?
-
Fixed it by putting this in my project file
QT_SUPPORTED_PLATFORM.name = SUPPORTED_PLATFORMS QT_SUPPORTED_PLATFORM.value = "iphonesimulator iphoneos" QMAKE_MAC_XCODE_SETTINGS += QT_SUPPORTED_PLATFORM
-
Hi,
Out of curiosity, which version of Qt is that ?
-
Qt 5.9.1, Qt Creator 4.4.0.
It was working fine until I updated Xcode to the latest version ( 9.0.1 ).Another person here did the same upgrade and his is working, so I don't think its a necessarily an issue with Qt or Xcode itself. I assume it is some obscure setting bug which is causing it for me, but I have been unable to find it.
We also compared Xcode project files generated by both boxes. His working version is also missing the SUPPORTED_PLATFORM flag. However, when this project file is opened in Xcode it says the supported platform in the build settings is "iOS", whereas mine says "macos". This is where I have to manually change it each time, or use my fix from above.
I think I have stumbled on something obscure.
-
Did you try to nuke the build folders and delete de .pro.user file ?
-
Yep. And created new empty projects as tests.