1This is a proof-of-concept implemenation of a UIKit based
2QPA plugin. Note that this is completely unsupported, and it is probable
3that many parts of QtCore and other Qt Modules don't work properly.
4There have no tests been run whatsoever.
5
60) What the platform plugin provides
7
8* Open GL ES 1/2 based backend
9* Single touch
10* Text/font drawing using system fonts (CoreText)
11* Text input (Opening/closing software input panel
12  Application has to perform necessary layout changes itself.)
13* Initial showing/hiding of status bar (as defined in the Info.plist)
14* Interface orientations as defined in the Info.plist of the application
15* Sound via phonon
16
17Only Declarative/QML/Qt Quick based UI has been verified working quite well, no
18idea about the state of widgets.
19
20Building/Deploying the application has to be done in Xcode. You need to generate
21necessary moc_ files in advance and add these to the Xcode project. More details
22on the Xcode setup see below.
23
241) Known Issues
25
26* Console message
27  "QEventDispatcherUNIX: internal error, wakeUps.testAndSetRelease(1, 0) failed!"
28  seems to appear sometimes for some people for unknown reasons and
29  unknown effect
30* JavaScript XmlHttpRequest doesn't work reliably even though networking
31  in general seems to
32
332) Build Qt
34
35The example Xcode project in the examples subdirectory requires that you do shadow
36builds of Qt in qt-lighthouse-ios-simulator and qt-lighthouse-ios-device directories
37parallel to the sources. To build for simulator make sure that both the Simulator
38configuration *and* the simulator specific target are active. To build for device
39make sure that both the Device configuration *and* the device specific target are
40active.
41
42The setup tries to figure out the Xcode and SDK version itself. If the autodetection
43does not work for your setup, you can explicitly set values in
44mkspecs/common/ios/versions.conf
45
46You need to choose one of the iOS mkspecs:
47For Xcode 4.3 and later:   macx-ios*-clang
48                           macx-ios*-g++ (not installed by default)
49                           macx-ios*-llvm
50For Xcode 4.2 and earlier: macx-ios*-clang-legacy
51                           macx-ios*-g++-legacy (not installed by default in 4.2)
52                           macx-ios*-llvm-legacy
53
54The configure options below use macx-ios*-clang by default.
55
56After configuring and building Qt you need to also build src/plugins/platforms/uikit.
57
58Simulator:
59----------
60configure -qpa uikit -xplatform unsupported/macx-iossimulator-clang -arch i386 -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations -little-endian -host-little-endian
61
62Device:
63-------
64configure -qpa -xplatform unsupported/macx-iosdevice-clang -arch armv7 -no-neon -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations -little-endian -host-little-endian
65
663) XCode setup:
67- there are examples in the examples subdirectory of the platform plugin
68- to create something fresh do something like:
69  - Xcode: Create a "View-based Appplication"
70  - remove the nibs and view controller and app controller files
71  - remove the reference to "Main nib file" from plist file
72  - create a main.mm like in the examples
73  - add the qmlapplicationviewer sources to your project (including the moc_*.h)
74    (best to link, not copy), the code for this is from the Qt Creator
75    mobile Qt Quick application template
76  - Add the Qt .a libraries, uikit platform plugin and libz (v1.2.3) to Frameworks
77  - add "$(SRCROOT)/../../../../qt-lighthouse-ios-device/include" (or -simulator)
78    to the include search paths.
79  - add "$(SRCROOT)/../qmltest" to the include search path if you didn't copy but
80    linked to the qmlapplicationviewer
81  - for device set the architecture to armv7 only
82  - to use sound in your application, Q_IMPORT_PLUGIN(phonon_av),
83    #include <phonon/private/factory_p.h>,
84    and call Phonon::Factory::setBackend(qt_plugin_instance_phonon_av());
85    Link to libphonon and to plugins/phonon/phonon_av
86
874) Done: Build and Run.
88
89