Thursday 9 October 2008

Using the unofficial headers with the official SDK

For advanced applications, using the "private" frameworks of the iPhone SDK can be useful, for instance if you want to create a framebuffer for video playback, which isn't normally allowed.

The iphwn.org Wiki has a nice howto on including the headers from the unofficial toolchain in your "official" project. http://wikee.iphwn.org/howto:using_sdk_with_toolchain_headers.

Note that copying their method entirely breaks compatibility to the official framework. I'm working on how to only use part of the unofficial tools for my project.

Here are the modified "other-c-flags" which need to be added to the project in Xcode, update to iPhone 2.0:

-I/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS2.0.sdk/include -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include -I/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/arm-apple-darwin9/4.0.1/include -F/System/Library/Frameworks -F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/System/Library/Frameworks -F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/System/Library/PrivateFrameworks -DMAC_OS_X_VERSION_MAX_ALLOWED=1050

No comments: