Tutorial: Troubleshooting App Testing in Simulator

Some readers of The Web Designer’s Guide to iOS Apps have contacted me regarding a problem: downloading sample code from my book’s web site and having it generate errors when trying to test in Simulator. This can be a common problem after Apple releases an Xcode SDK update or NimbleKit releases a framework update.
My response has been to change a few settings in my sample code downloads and replace them. But beyond that, I would like to help you troubleshoot this on your own, too. Because it is bound to happen again the next time that there is an update to Xcode or NimbleKit — and not just to any sample code that I provide, but it will happen to any app that you’re working on long term where such updates occur midstream (or prior to an app update, too).


Step1: Check Build Settings in Project and Target Files
The above figure shows an app’s Project and Target files highlighted in blue. After downloading sample code, you should select these files one at a time and click on the blue and white Info button in the Xcode toolbar (or select and type Command-I), then click on the Info screen’s Build tab (the second of four).


Step 2: Check Build Settings in Project and Target Files
Once you’re in the Build tab, make sure that Base SDK is set to Latest iOS.


Step 3: Check Based On Settings in Project and Target Files
After verifying the Base SDK setting, check to be sure that the Based On setting is set to NKit.


Step 4: Check Overview Menu
Next, check the Overview Menu to confirm that it is set to Simulator and Debug.


Step 5: Clean All Targets; Build and Run
Finally, I suggest that you always Clean All Targets prior to clicking on Build and Run. This is similar to clearing the cache in your browser when testing a web site, after updating its stylesheet.
Following these steps should prevent build errors after downloading sample code from my book’s web site. It’s also a good workflow to follow any time that you’re working on an app and a variable in the development environment changes — especially if a new release of Xcode or NimbleKit is released.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s