Solved How to compile an iOS application in Qt?
-
Looks like the compiler didn't tune in automatically. How to add a new compiler for iOS?
-
@Mikeeeeee Are you sure your XCode is set up properly (meaning support for iOS development installed)?
Do you see "Apple Clang (arm64)" as compiler on the "Compilers" tab? -
I see that. Where is the "Compiler" tab ?
-
@Mikeeeeee I'm talking about Compile tab in QtCreator, not XCode.
-
I showed hfyttscreen compilers. I don't have an iOS compiler.
-
Did you check your Xcode configuration to see if there's anything related to that ?
-
How to do this?
-
@Mikeeeeee You can open XCode and create a default app for iOS and see whether you can build it. I already suggested this before.
-
I told you I could do it. After running the project in Xcode, the iPhone emulator starts.
-
How do I add a new iOS compiler from Xcode to Qt?
-
Xcode manages the changes automatically so I don't know whether there were any config changes or installations when I first connected my developer iOS device with USB to the MacOS machine. As I remember Qt picked up the config from Xcode automatically as well. Each QT version has a list of supported devices. You should use that specific QT version which contains your phone's architecture in its supported platforms page.
Execute the following command from terminal to see whether you have the same compiler as me:
find /Applications/Xcode.app/Contents/Developer/Toolchains -name clang++For me it lists:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++This same compiler is in use for both armv7 and x86_64, which is specified with the flag "-arch armv7" or "-arch x86_64".
-
Is there only one file in the Toolchain folder? Should be different?
-
But the platforms have a Clang folder for each platform
-
Because clang is used for all platforms.
How did you install Xcode ?
-
I installed from a virtual disk. If I write the path of the compiler to Clang, will it work?
-
This post is deleted! -
Maybe this version of Qt does not work, I need to install another version?
-
How did you install Xcode ?
Since your configuration seems to be broken, I'd go with a full removal and new installation of the Qt SDK. Only install Qt for macOS and Qt for iOS.
-
Reinstalled. Works compiler emulator ios. The IOS compiler does not work. Compiled a project for the IOS emulator. What to do next? What files can I use on ios? Or I need something else to do with .xcodeproj file?
-
Then the first you have to do is to build a dummy project within Xcode and make it run on your device. There's no use trying to setup Qt if Xcode doesn't work properly in the first place.
And again, how did you install Xcode ? What exact version is it ?