This is a proof-of-concept implemenation of a UIKit based
QPA plugin. Note that this is completely unsupported, and it is probable
that many parts of QtCore and other Qt Modules don't work properly.
There have no tests been run whatsoever.

0) What the platform plugin provides

* Open GL ES 1/2 based backend
* Single touch
* Text/font drawing using system fonts (CoreText)
* Text input (Opening/closing software input panel
  Application has to perform necessary layout changes itself.)
* Initial showing/hiding of status bar (as defined in the Info.plist)
* Interface orientations as defined in the Info.plist of the application
* Sound via phonon

Only Declarative/QML/Qt Quick based UI has been verified working quite well, no
idea about the state of widgets.

Building/Deploying the application has to be done in Xcode. You need to generate
necessary moc_ files in advance and add these to the Xcode project. More details
on the Xcode setup see below.

1) Known Issues

* Console message
  "QEventDispatcherUNIX: internal error, wakeUps.testAndSetRelease(1, 0) failed!"
  seems to appear sometimes for some people for unknown reasons and
  unknown effect
* JavaScript XmlHttpRequest doesn't work reliably even though networking
  in general seems to

2) Build Qt

The example Xcode project in the examples subdirectory requires that you do shadow
builds of Qt in qt-lighthouse-ios-simulator and qt-lighthouse-ios-device directories
parallel to the sources. To build for simulator make sure that both the Simulator
configuration *and* the simulator specific target are active. To build for device
make sure that both the Device configuration *and* the device specific target are
active.

The setup tries to figure out the Xcode and SDK version itself. If the autodetection
does not work for your setup, you can explicitly set values in
mkspecs/common/ios/versions.conf

You need to choose one of the iOS mkspecs:
For Xcode 4.3 and later:   macx-ios*-clang
                           macx-ios*-g++ (not installed by default)
                           macx-ios*-llvm
For Xcode 4.2 and earlier: macx-ios*-clang-legacy
                           macx-ios*-g++-legacy (not installed by default in 4.2)
                           macx-ios*-llvm-legacy

The configure options below use macx-ios*-clang by default.

After configuring and building Qt you need to also build src/plugins/platforms/uikit.

Simulator:
----------
configure -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

Device:
-------
configure -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

3) XCode setup:
- there are examples in the examples subdirectory of the platform plugin
- to create something fresh do something like:
  - Xcode: Create a "View-based Appplication"
  - remove the nibs and view controller and app controller files
  - remove the reference to "Main nib file" from plist file
  - create a main.mm like in the examples
  - add the qmlapplicationviewer sources to your project (including the moc_*.h)
    (best to link, not copy), the code for this is from the Qt Creator
    mobile Qt Quick application template
  - Add the Qt .a libraries, uikit platform plugin and libz (v1.2.3) to Frameworks
  - add "$(SRCROOT)/../../../../qt-lighthouse-ios-device/include" (or -simulator)
    to the include search paths.
  - add "$(SRCROOT)/../qmltest" to the include search path if you didn't copy but
    linked to the qmlapplicationviewer
  - for device set the architecture to armv7 only
  - to use sound in your application, Q_IMPORT_PLUGIN(phonon_av),
    #include <phonon/private/factory_p.h>,
    and call Phonon::Factory::setBackend(qt_plugin_instance_phonon_av());
    Link to libphonon and to plugins/phonon/phonon_av

4) Done: Build and Run.

