Nov 24, 2008

Combining C++ and Objective-C on iPhone Open Toolchain

After a few hours hacking, I found it possible to combine a Cocoa UI and wikisrvd from Wiki2Touch, and it works!

Briefly, wikisrvd is initiallized with a Objective-C object by replacing the codes in Main.cpp. A trival hacking to correct _basePath is also needed. And the service is triggered with [NSThread detachNewThreadSelector:...] from [Application applicationDidFinishLaunching].

If everything goes smoothly, a standalone wikimedia reader would be possible.
The screenshot on the left demonstrates a page from wikia.com (Forgotten Realms Wiki).