How to compile an iOS application in Qt?
-
wrote on 8 May 2019, 12:24 last edited by
Hi!
How to compile an iOS application in Qt? -
-
wrote on 10 May 2019, 07:20 last edited by Freder89
This shows how to compile qt5 for the iOS simulator.
Based on qt build instructions for iOS. TellPopeyes
-
This shows how to compile qt5 for the iOS simulator.
Based on qt build instructions for iOS. TellPopeyes
@Freder89 said in How to compile an iOS application in Qt?:
This shows how to compile qt5 for the iOS simulator.
Based on qt build instructions for iOS.
It does not.
I linked to start page of the documentation for Qt on iOS
Your link is broken btw, as the snapshot page is no longer valid.
The build Qt(for iOS) from sources guide is here:
https://doc.qt.io/qt-5/ios-building-from-source.htmland the only differences between iOS devices and iOS simulator is the -sdk argument
If you do not specify an sdk, then Qt is automatically build for both cases.
-
wrote on 17 May 2019, 14:47 last edited by
I compiled a project in MacOS. It works on MacOS. Will it work in iOS? Or do I need to somehow collect the project?
-
Hi,
You will have to build it for iOS. macOS and iOS are two different platforms currently.
-
wrote on 18 May 2019, 08:15 last edited by
How to compile an application on iOS?
I have Xcode and a project in MacOS. -
As @J-Hilk already pointed you to: The Getting Started Guide for iOS in Qt's documentation.
The very short way:
- Open the project with Qt Creator
- Select the iOS Kit
- Build your application as usual
-
wrote on 19 May 2019, 08:07 last edited by
I did not understand where to choose the iOS kit?
-
Did you select Qt for iOS when you installed Qt on your machine ?
-
wrote on 20 May 2019, 07:21 last edited by
I dont know. I installed Qt for MacOS. How to check it? If everything is fine, then what to do next?
-
I dont know. I installed Qt for MacOS. How to check it? If everything is fine, then what to do next?
wrote on 20 May 2019, 07:40 last edited by@Mikeeeeee run Qt Maintenance tool and check if Qt for iOS is installed
-
wrote on 20 May 2019, 08:33 last edited by
Qt for iOS is installed
-
wrote on 20 May 2019, 09:12 last edited by Laszlo LG
You cross compile on the MacOS for the iOS.
- connect your iOS device with USB cable to the MacOS
- let Xcode to recognise it, start with an Xcode example and run on your iOS device
- in QtCreator click to Projects then ensure that Qt .... for iOS2 kit is available
- in QtCreator choose the "Qt .... for iOS2 kit" target by clicking to the icon above the green triangle
- in QtCreator click to the run icon (green triangle) to start the application on your mobile device
If QtCreator can't upload the app to the iOS device then from the build folder of QtCreator open the compiled project (folder with .xcodeproj extension) from Xcode and run the app from Xcode.
I hope it helps, ask if anything needs clarification.
Distribution of the app to the appStore is a different story. -
wrote on 20 May 2019, 10:21 last edited by
Projects has only Desktop Clang 64 bit
-
wrote on 20 May 2019, 10:28 last edited by
Can I build without an iOS device?
-
wrote on 20 May 2019, 10:55 last edited by
Yes, build should work without running on the device after selecting the kit as SGaist wrote. In the QtCreator's Projects view on the top there is a button "Manage Kits..." , use this to add one for iOS.
-
wrote on 20 May 2019, 11:40 last edited by
I tried setting up a new set for iOS. Got an error : Could not resolve SDK Path for "iphone os" using --show-sdk-path. How to configure the compilation set correctly?
-
I tried setting up a new set for iOS. Got an error : Could not resolve SDK Path for "iphone os" using --show-sdk-path. How to configure the compilation set correctly?
wrote on 20 May 2019, 12:00 last edited by Laszlo LGWhen I open the "Manage Kits..." window it shows several sub menus starting with Kits, Environments,.....
The Devices tab allows to set the Android SDK and it has a download link as well. I think the iOS build on macOS does not need the Android SDK so I guess if you stay on the Kits tab and add a new kit then the Sysroot setting contains the sdk. For me it is set to:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdkThen in the projects configurator click to the newly created kit to add it to your project. Then Build / "Open Build and Run Kit selector" menu should offer it as a target.
-
wrote on 20 May 2019, 12:26 last edited by