Monday, September 13, 2010

Modifying XCode to Run the TapLynx Sample

With the release of the new iPhone SDK 4.1 Apple has eliminated the 2.2.x build options but has also oddly eliminated the ability to build in 4.0. I've never seen this before, but that is the way. Now, the default build of TapLynx doesn't work without a few (thankfully simple) changes.

If you try a build and run with the current TapLynx sample code (as of Sept 13, 2010) and XCode with a 4.1 SDK, you will get this error
before you even try to Build and Run you should notice this in the menu bar and know that your build will fail
What XCode is telling you is that it doesn't know what SDK 4.0 is anymore.

To fix this and run your shiny new TapLynx sample you need to tell your project file that it should run with the 4.1 sdk. To do that select the project document and right click (or control click if your mouse has but one button)
or under the "Project" menu. Select "Edit Project Settings"

You should notice in bold letters that "iOS Device 4.0 (missing)" is the value for Base SDK. This is the cause of the error. However, if you just change that to "iOS Simulator 4.0 or "iOS Simulator 4.1" you will might still get the error if the Build Configuration is at anything other than "Debug". So, the fastest way to "Yay!" is to set All Configurations to have a Base SDK of either "iOS Simulator 4.0" or "iOS Device 4.1".

If you choose to set your base SDK to iOS Device then make sure that you set the active SDK to either the simulator or the device depending on how you are testing the app. Either use the Project menu to "Set Active SDK" or use the Overview dropdown to set either "Device" or "Simulator".

Good Luck.

No comments:

Post a Comment