Could not find qml file after deployment on iOS device
-
Hello,
I have an issue when I try to deploy a app written with qt on my iPad 4.
It always says that the main.qml file can not be found at the path given.So here are the steps leading to this issue:
-
Installing Qt like described here: "Qt for iOS Preview":http://blog.qt.digia.com/blog/2013/03/05/qt-for-ios-preview/ on my MacBook.
After installing I build Qt Quick 1 as mentioned at the end of the article
The installation was successful and I could deploy the demo up on my iPad. The demo app works properly there. -
Installing Qt Creator
-
Creating a HelloWorld Projekt with the QtQuick 1 Template with Qt Creator
I just used the option for creating a Qt Quick 1 which shows up a "Hello World" -
Executing qmake to build the project for later deployment with Xcode
This gives me a project to be loaded by Xcode. -
Build and run the project with Xcode
The project is built and the app starts running on the iPad.
The screen reamains white (no Hello World !) and a log messages shows up:
"file:///private/var/mobile/Applications/1C6EF2EA-336A-457C-925D-06CF167D96C5/Resources/qml/HelloWorld/main.qml: File not found" -
I then tried some settings in Xcode to copy the qml a bundle or file but without success.
So can someone help me to solve this ?
Thanks for your help
DaBoba
-
-
I don't have Mac to test it. but you can simply add your qml file to qrc resource file and is it as resource in your app....
-
Hello AcerExtensa,
first of all I thank you very much for your answer. Adding the qml to the resource file fixed the issue!
But nevertheless I'm still wondering why this basic stuff does not work right away. I had to made a change to main.cpp, too. I'm a newbie to Qt so may be I have to get used to it.
BTW: I cannot find much examples or tutorials about programming for iOS with the Qt framework. Does anybody has more information ?
Best regards
DaBoba
-
I think the deployment path is somehow wrong on iOS, or qml file is not deployed on device at all, like I've said I can#T test it because i don't have Mac... iOS Port is still in development, so don't expect too much from it until Qt 5.2... I don't know any tutorials special for iOS, but if you have got it working you can just look at any QML Qt tutorial.... They should work...
-
You can check my post here... "Qt_iOS":http://qt-project.org/forums/viewthread/30646/#135884
-
With Qt 5.2 and iphonesimulator, whether i create a project with only QtQuick 2.0 i have no problem, but if i use QtQuick.Controls 1.0 i have file:///Users/nicola/Library/Application Support/iPhone Simulator/7.0.3/Applications/355738E3-753D-4C5A-9F4A-DF18196F0D7A/Resources/qml/untitled6/main.qml:-1 File not found.
I have tryed with qrc or with
APP_QML_FILES.files = ../untitled6/qml/untitled6/main.qml
APP_QML_FILES.path = Contents/Resources
QMAKE_BUNDLE_DATA += APP_QML_FILESin .pro file, but nothing.
What's happen?