Back to Blog home

New proof-of-concept UIKit based Lighthouse platform

Published on Friday March 11, 2011 by Eike Ziller in Qt Lighthouse | Comments

Also not quite as exciting as the Android port (but maybe a tiny bit more exciting than the new INTEGRITY platform, at least for me ;) ), I just pushed a new proof-of-concept implementation of a UIKit based Lighthouse plugin to the qt-lighthouse repository.

This means that, if you carefully follow the instructions in the accompanying README file (in src/plugins/platforms/uikit/ of the qt-lighthouse repo), you should be able to build (parts of) Qt for iOS Simulator and Device targets, and run a few simple example Qt Quick applications. I can't emphasize enough that this is not a real port to iOS though, and is not supported in any way. Chances are that many parts of Qt don't work, even the parts that do compile, not to speak of the parts that I didn't even try to compile.

That said, the goal of the little project was to get some simple QML applications running on a iPhone to check if Lighthouse is technically up to the task, and because QML is so cool technology.

Compiling and linking Qt (so it actually runs)

That was the most tedious part which required a high frustration threshold. I faced issues from link errors complaining that some processor instructions were not available, to method return values and variables suddenly being changed or zeroed while the code ran, until I figured out that the base gcc mac mkspecs set desktop related environments that confuse the iOS parts then. After getting that more or less right, since iOS is mostly a POSIX platform most things actually "just worked".

Lighthouse platform plugin

I took the easy route and did what the example Cocoa platform plugin does, i.e. blip a QImage onto a UIView. Certainly not the most performant way (as can be easily seen when running the QML flickr demo), but suited the purpose of a fast proof-of-concept. There have been a few challenges though, for example while integrating the event loop - an iOS application is killed by the system if it doesn't call UIApplicationMain fast enough.

The result

Lighthouse is up to it (at least now, after a few little patches), and QML is cool technology ;). And I must say that from the Lighthouse parts it was a quite nice and from the other parts at least an enlightening (haha) experience.

Subscribe to Our Blog

Stay up to date with the latest marketing, sales and service tips and news.

We are updating our comment system and you could face some issues. Please write to us at feedback@qt.io to report issues/bugs.