My first QML app's problem on macOS High Sierra
-
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. -
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? -
Hi,
Yes, Xcode is mandatory. You have to set it up once to get your iOS development going.
As for the signing stuff see QTBUG-38782
-
Hi,
Yes, Xcode is mandatory. You have to set it up once to get your iOS development going.
As for the signing stuff see QTBUG-38782
-
The signing errors are vanished now:
I also built the following easiest project and it was run successfully without any errors unlike the prior times:
My first question is, where in the project's directory is the test_1.ipa file for which this QML project has been built by the iOS kit, please?
The second question, why can't I still run the project using the iOS kit:
In the developer menu of my iPhone, I don't see any on/off, but I think it's enabled.
-
@SGaist
Thank you really very much. You solved my issue and I finally could install that simple project on my iPhone.After that I tested one of my recent complete projects. So I transferred it onto macOS and opened it by Qt Creator. And while my iPhone was connected to macOS, ran the project, then I got the error:
xcodebuid failed
.Then I opened the projects .xcodeproj file. Firstly it was this way, with signing errors once again:
Then I changed the string of "Bundle Identifier" by adding a word as shown below, and the signing errors were vanished afterwards:
Then closed that menu and went back to Xcode -> Devices -> Setup device complete.
Then ran the project once again:
Still get this error:xcodebuid failed
.So I got back to the .xcodeproj file and saw astonishingly the previous settings, shown in the first screenshot above, has returned!
Should I have saved that change in the Bundle Identifier before closing it? If so, what is the appropriate way of this, please?
Apparently the problem is much more vast that affected Apple, Facebook and many more companies! [And me too, just right this time when I went for iOS developing for the first time! :( ]
-
@SGaist
Thank you really very much. You solved my issue and I finally could install that simple project on my iPhone.After that I tested one of my recent complete projects. So I transferred it onto macOS and opened it by Qt Creator. And while my iPhone was connected to macOS, ran the project, then I got the error:
xcodebuid failed
.Then I opened the projects .xcodeproj file. Firstly it was this way, with signing errors once again:
Then I changed the string of "Bundle Identifier" by adding a word as shown below, and the signing errors were vanished afterwards:
Then closed that menu and went back to Xcode -> Devices -> Setup device complete.
Then ran the project once again:
Still get this error:xcodebuid failed
.So I got back to the .xcodeproj file and saw astonishingly the previous settings, shown in the first screenshot above, has returned!
Should I have saved that change in the Bundle Identifier before closing it? If so, what is the appropriate way of this, please?
Apparently the problem is much more vast that affected Apple, Facebook and many more companies! [And me too, just right this time when I went for iOS developing for the first time! :( ]
@tomy that is not unexpected, the Xcode project file is generated on each compile.
But to battle your issues.
Make the changes you want in Xcode (it has the better editor for this)
go to your build folder and find the Info.plist file.
Copy and paste that file to your source files
inside your pro file add the following:ios{ QMAKE_INFO_PLIST =Info.plist // if it's inside a folder specify that too e.g. myFolder/Info.plist }
now, your settings are not generated each compile time, but are taken from the info.plist file
-
@tomy that is not unexpected, the Xcode project file is generated on each compile.
But to battle your issues.
Make the changes you want in Xcode (it has the better editor for this)
go to your build folder and find the Info.plist file.
Copy and paste that file to your source files
inside your pro file add the following:ios{ QMAKE_INFO_PLIST =Info.plist // if it's inside a folder specify that too e.g. myFolder/Info.plist }
now, your settings are not generated each compile time, but are taken from the info.plist file
-
Copy and paste that file to your source files
Do you mean the project's original directory, where the .pro file exists, by "source files", please?
-
@tomy It doesn't really matter where exactly you paste the file. But if you place it besides the pro file (same folder) you can simply write
QMAKE_INFO_PLIST =Info.plist
without specifying an absolute or relative path on your own.@J.Hilk said in
After these, I used the "build and then run the current scheme" button on Xcode to install the app on my iPhone. Xcode firstly responded by a message to me that I need to trust the developer (myself) on the iPhone => I did this and re-ran that button (on Xcode). This time it says:
-
@J.Hilk said in
After these, I used the "build and then run the current scheme" button on Xcode to install the app on my iPhone. Xcode firstly responded by a message to me that I need to trust the developer (myself) on the iPhone => I did this and re-ran that button (on Xcode). This time it says:
@tomy never had this one oO
but check this thread
https://stackoverflow.com/questions/45421179/xcode-9-error-iphone-has-denied-the-launch-requesthas a couple of different solutions offered
-
@tomy never had this one oO
but check this thread
https://stackoverflow.com/questions/45421179/xcode-9-error-iphone-has-denied-the-launch-requesthas a couple of different solutions offered
@J.Hilk said in
I unchecked "product->scheme->edit scheme->info->debug executable" checkbox and Xcode installed the app on the iPhone.
Is it a correct choice, according to your experience, please?
One other problem is, when installing this app on Android its icon is shown on the device, but on my iPhone the icon is not shown:
-
@J.Hilk said in
I unchecked "product->scheme->edit scheme->info->debug executable" checkbox and Xcode installed the app on the iPhone.
Is it a correct choice, according to your experience, please?
One other problem is, when installing this app on Android its icon is shown on the device, but on my iPhone the icon is not shown:
@tomy that is because for android, you define the icon inside the AndroidManifest.xml in iOS you define the icon via th info.plist
for example:
<key>CFBundleIcons</key> <dict> <key>CFBundlePrimaryIcon</key> <dict> <key>CFBundleIconFiles</key> <array> <string>AppIcon20x20</string> <string>AppIcon29x29</string> <string>AppIcon40x40</string> <string>AppIcon60x60</string> </array> <key>CFBundleIconName</key> <string>AppIcon</string> </dict> </dict>
how ever Xcode has a nice drag and drop handling for the icons,
-
@tomy that is because for android, you define the icon inside the AndroidManifest.xml in iOS you define the icon via th info.plist
for example:
<key>CFBundleIcons</key> <dict> <key>CFBundlePrimaryIcon</key> <dict> <key>CFBundleIconFiles</key> <array> <string>AppIcon20x20</string> <string>AppIcon29x29</string> <string>AppIcon40x40</string> <string>AppIcon60x60</string> </array> <key>CFBundleIconName</key> <string>AppIcon</string> </dict> </dict>
how ever Xcode has a nice drag and drop handling for the icons,
@J.Hilk Hi, thank you.
I put two .png files for LaunchImage (1792 X 828) and AppIcon (size: 120X120), as shown below:
When installing the app was finished by hitting the play button on Xcode, the AppIcon is set nicely on the app on my iPhone 5s, but the LaunchImage doesn't appear when running the app!
Where have I made a mistake as the reason for this please?
-
@J.Hilk Hi, thank you.
I put two .png files for LaunchImage (1792 X 828) and AppIcon (size: 120X120), as shown below:
When installing the app was finished by hitting the play button on Xcode, the AppIcon is set nicely on the app on my iPhone 5s, but the LaunchImage doesn't appear when running the app!
Where have I made a mistake as the reason for this please?
@tomy mmh
I'm unsure.
Personal I use a LaunchScreen.storyboard for that
Here an example from stack overflow on how to create that:
https://stackoverflow.com/questions/37951817/launch-screen-storyboard-with-centered-image-ios/2 -
@tomy mmh
I'm unsure.
Personal I use a LaunchScreen.storyboard for that
Here an example from stack overflow on how to create that:
https://stackoverflow.com/questions/37951817/launch-screen-storyboard-with-centered-image-ios/2