Using the Qt cross-platform APP (iOS)

Using the Qt cross-platform APP (iOS)

 

This article taught you how to use Qt to compile an iOS application.

Qt is an excellent cross-platform development tools. We use Qt application can easily be written once, many times to compile on different platforms, such as Windows, Linux, MAC, Android, iOS, Windows Phone and so on. Developers only need to master the C ++ programming and production methods Qt interface, you can create cross-platform applications, including mobile phones, including the APP.

Note that, Qt support for Android and iOS, UWP and other platforms is not yet perfect. Use Qt to mobile application development, making the finished product either interface, system stability or resource calls, certainly not better to use native development environments. APP students to use Qt to develop software primarily for non-professional, non-APP development industry developers (such as electronic design enthusiasts) to develop APP for debugging , compared to re-learn software development in an even more systems, this is undoubtedly a very save time and effort.

 

 

 

Setting up an environment macOS

IOS want to compile software, first you need a macOS. If you have a Mac would be best friends, or you can choose to install the black apple or using virtual machines. I use a macOS S10.12 lazy bag + VMware12 the latest version of Virtual Machine + unlocker208 way (lazy package will reduce a lot of trouble) (macOS the new version, it needs more new and VMware unlocker).

2. Install Xcode

In the Mac App Store to download and install Xcode search. XCode is very large, you can continue to the next step.

3. Install Qt Creator for macOS

https://info.qt.io/zh-cn/download-qt-for-application-development

Register and click the "Get open source packages" and then click on the "View All Downloads - Qt Online Installerfor macOS" link to download the latest version of the Qt online installer.

4. New or Open a Qt project, check "iphonesimulator-clang- ..." Environmental engineering configuration page.

5. Click the button in the lower left corner of the hammer compiled to close the Qt Creator after successful compilation.

6. When compiled, the output file in the folder will have a "Info.plist" file, use Xcode open.

Launch screen interface shown in Figure delete a row, or a splash screen is particularly ugly black and white screen when APP is turned on.

7. Double-click to open .xcodeproj project file, select the arrow in FIG engineering, the application name to the right can be other configurations, specifically Baidu.

As shown in Figure 8. Click on the "Use Asset Catalog" button to create the icon, splash screen gallery.

We will make a good icon into a different resolution to the appropriate location, the splash screen empathy. So there is not a built-in Qt splash screen.

9. Now configure the project has been completed, we can begin to compile the software. This requires you to sign the software.

If you are an Apple developer, you can bind your developer account, publish directly compiled ipa, etc., which has completed the generation iOS applications. For no developer account (which is not free) amateur players, please continue to read.

We can use Apple ID to register as a developer, using the real test functions provided by Xcode software installed on the device. Specific operation is very simple, just follow the prompts to complete the line. This approach has installed software to limit the number of devices and the installation of only seven days of life, but after the expiration can recompile download.

10. Log, after the binding is complete, we will Apple device into your computer (if you choose to use a virtual machine, the virtual machine will not forget to set the insertion of equipment available to the virtual machine). After connecting the device, click on the menu bar of the "Product-Destination", select your Apple devices.

After compiling the target will become the device of your choice, as shown below.

 

11.  此时Xcode将会获取你的设备信息并联网下载一些资料,过程需要几分钟。等待适配完毕后,点击三角形运行按钮,将会进行程序的编译与生成,并自动安装到你的设备上。第一次安装运行需要你从设备的“设置-通用-描述文件”中选择信任开发者。至此,软件就可以在设备上运行了。

Guess you like

Origin blog.csdn.net/qq_34106574/article/details/90578969