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

Monday 6 October 2008

Using iPhone Developer Program (Standard) with more then one developer

We only have the standard edition of the iPhone developer program. So to get another developer up and running with another machine, some trickery needs to be applied, i.e. copying the private key and the certificate over to the other machine and doing some configuration.

Furtunately, MacRumors.com has a useful solution to this problem:

Provisioning now becomes simple. You need one Provisioning Profile for development and another one for distribution. One and only one of each type of provisioning profile. Each profile uses your one App ID. Put your development provisioning profile in ~/Library/MobileDevices/Provisions. Start XCODE and drag your distribution provisioning profiles to the xcode icon once it is running. XCode does something to distribution profiles (renames them at least) and puts them for you in ~/Library/MobileDevices/Provisioning Profiles/. But you cannot drag your distribution profiles into this folder directly.

That seemed to do it for me. The only thing I did different was put my .mobileprovision file in ~/Library/MobileDevices/Provisioning Profiles/ and drag it into XCode from there. No idea why that's necesary, but its working now
The last sentence seemed to do the trick for my colleague!

Compiling Unix Libraries

The iPhone has a Unix subsystem, so it shouldn't be too hard to port unix libraries to the device, so I assumed.

It turns out that it is not that trivial, as some tweaks are needed to properly compile third-party code for the device.

This Blog presents an excellent solution to the problem - enabling the use of the libraries both on the emulator and on the device, compiling with the official SDK.