Solved My first QML app's problem on macOS High Sierra
-
Hi all,
Using my Windows 10 x64 on VMware Workstation Player 14, I installed macOS High Sierra version 10.13.6 (17G65), and then Qt 5.12.1 on it. I also installed Xcode which included over 6GB. It mightn't be needed but as a new user of Qt on macOS X, I liked to equip the OS and Qt with all relevant possibilities.
Here is my simple QML project and also the list of kits. As it's shown there's a warning icon next to the Qt 5.12.1 for iOS kit and I can't build my app using that kit on Qt Creator.
How to solve this please?
-
Hi @tomy , first question is the app building for Desktop? can you hover over the warning icon or can you click on the kit, it will display what problem is there with the kit, then we can solve it.And can you even tell what error it is giving while building!
-
hi @tomy , welcome to the walled garden ;-)
The reasons can be manyfold,
what does it say, when you hover over the Warning icon?My guess would be that no iOS device is registered.
They easiest way to check and fix issues related to iOS is, since you installed Xcode, to do a simple build (cmd + b) open the build folder and double click on the Xcode project file.That will launch Xcode and that has a much better build in guide/fix for those issues.
-
Hi @Shrinidhi-Upadhyaya,
Warning: No device set.
And I like to use that kit for devices running iOS, namely iPhones.One more thing, I may not like to attach my iPhone to it, instead, just build the QML project and transfer the .ipa files to my phone afterwards. It's what I do for QML apps .apk files.
@J-Hilk, Hi. :) I like your welcome. :)
Yes, your guess is meaningful, as before.a simple build (cmd + b) open the build folder and double click on the Xcode project file.
Will you explain it more please? I think I should start from Terminal and using the cd commands go to the project file. And then?
-
@tomy said in My first QML app's problem on macOS High Sierra:
Will you explain it more please? I think I should start from Terminal and using the cd commands go to the project file. And then?
the shortcut is cmd + b, (windows key on a non apple keyboard)right click on your *pro file. select show in finder
go one folder upwards (keyboard shortcut cmd+ arrow up) to find the standard build folder of your application
Double click on the Xcode project
-
I built the project, using the hammer and it showed this issue:
Xcodebuild Failed.And here is the output of double clicking on the Xcode project:
-
@tomy alright, click on the "iPhoneXR" button. in the dropdown menu scroll up to the top and select your (connected) device
some kind of wizard should appear and guide you through the setup.
-
@J.Hilk
I hadn't connected the iPhone to the macOS but when I clicked on the iPhoneXR connected my iPhone to the PC using a its USB cable and then selected iPhone 5s. Yet, no wizard has emerged!Should I have previously connected my iPhone to Qt Creator?
-
@tomy the 5s you selected is most likely the simulator (all those in the list are simulators) the top most is always the physically connected device. If no device is connected, the top most is a "noDevice" option
-
@J-Hilk
Yes, your'e right.
Although the phone is connected it shows:How to connect it properly? Do I need any certificate from Apple?
-
@tomy usually that happens automatically,
you connect your iPhone,
the phone asks to you trust this Mac(if it's first time connected)
you tell the phone that you trust it
-> You have than access to itMaybe it's not properly propercated through the VM ? Do you see the iPhone in iTunes ?
-
Hi @tomy , have you configured development team in Xcode? can you show me the build settings for your Qt5.12.1 ios kit?
-
@J.Hilk s
Do you see the iPhone in iTunes ?
I don't see it. It's charging through mac but probably not connected to it properly. It's the first time I use mac and may have made a mistake when the message has come up for the first connect.
-
have you configured development team in Xcode?
No.
can you show me the build settings for your Qt5.12.1 ios kit?
Here it is:
-
Hi @tomy , okay then you need to configure your xcode with your apple developer account and once you do that you will get an option to select the Development team(that will be your mail-id),now you can see its default(Under IOS Settings).
Have a look in the IOS settings, there is warning there at the last, its telling the same thing.
Once you do this, i guess it will build,i guess @J-Hilk has already helped you to configure the Device using Xcode.
-
If configuring Xcode is what which has to be done through double clicking on the .xcodeproj in the project's folder and choosing the connected iPhone by the "iPhoneXR" button and following the wizard's steps, I can't do that now because my iPhone is not shown there.
I think I firstly must solve this problem. Probably I mistakenly have tapped on intrust instead of trust and now I need to retrieve it.
When it's solved I go for the above steps to configure Xcode. -
Hi @tomy , okay do one thing connect your phone, you will see your device name on the list where now you are getting "No Device" and if your device is untrusted it will be something like For example:-
Tom's Iphone(Untrusted) and if it comes like this you need to reset the settings.If you want to reset your settings then in your Iphone:- Settings->General->Reset->Reset Location & Privacy, do this.
NOTE:- Just check once whether its the right method to reset to be on safe side. -
I only says: No device is connected.
I think my phone is not connected to the macOS X. It's still being charged through the connected cable maybe to the host machine (Windows) not macOS.
I suppose I need to find a way to connect my iPhone to the macOS virtual machine which is on VMware workstation player.
-
What I did are these:
1- Enrolled my Apple ID in the developer.apple.com. I needed to set the two factor authentication. My hell country Iran, (managed by the US/UK) is banned so I called one of my relatives' number in Europe. Then it was done.
2- Using Xcode -> Preferences -> Accounts I signed my account. Used a "Personal Team"
3- The phone is also connected to iTunes and Xcode also now recognizes it.
Now there's one error:
In the Projects also:
I think if we solve that no provisioning profile found for the selected team, the job is done and I can build the app by the iOS kit.
Any idea on how to solve that last problem please?
-
Apparently there's not a solution to solve this problem and most probably the reason is that the developer Apple account is free. (If it's a paid one, there will be no issue I suppose)
Now isn't there any other way to build my QML projects using the iOS kit on macOS X and without Xcode?
I mean, is Xcode mandatory?