Saturday, February 13, 2010

iPhone App Compiles For Simulator And Not For Device

I was writing a quick app using the MKMapView and CoreLocation. The application compiled fine for the simulator and pulled up the correct view when running on the simulator. Once I changed the config to compile to the device, all hell broke lose. The compiler started generating link errors. After a couple of hours of hitting my head against the wall I was able to find the solution here. But essentially, the project.pbxproj file contained items that shouldn't have been in the file. After I updated the framework search path, the application compiled correctly. Below is the fix

FRAMEWORK_SEARCH_PATHS = "$(inherited)";