I installed iOS 4.1 just released today.
I downloaded my app to the Phone from the AppStore and ran it and it cant get GPS Location.
I download the new XCode and 4.1 SDK and recompiled under 4.1 and app works fine on 4.1 IPhone.
No code has been changed.
Why doesnt an app compiled under 4.0 work under 4.1.
BASE SDK was 4.0
IOS DEPLOYMENT TARGET : iOS 4.0
NEW Settings
BASE SDK was 4.1
IOS DEPLOYMENT TARGET : iOS 4.0
Bit annoy I need to resubmit even though I havent changed anything...another week of black hole app submission!
After 3 attempts at deploying to the App Store and lots of dissecting the project file I found the following:
The deployment target was different for BUILD and TARGET And base sdk only set in Debug in Target
I got the Debug/Release to work on my phone so presumed if relelase and Distribution had same settings should work in App Store.
But even after setting it and redeploying to appstore it failed to work (app loaded and no GPS).
I tried deleting the Provisioning Profile but didn't work.
Overnight phone lost power and when I restarted app was working.
so not sure if it was a weird combination of all 3.
iOs Deployment Target (IPHONEOS_DEPLOYMENT_TARGET = 4.0;): iOS 4.0
BASE SDK(SDKROOT = iphoneos4.1;): iOS 4.1
for BUILD (Debug/Release/Distribution) (Right click on top level in tree YourApp >> Info menu)
and TARGET (Debug/Release/Distribution) (Right click on Target >> YourApp >> Info menu)
Release the app on 4.0 to app store. 4.1 released Upgraded my app to check it. App ran ok, but failed to get GPS in a number of screens. Recompiled it under 4.1, NO CODE CHANGES, released to store, still wouldn't work.
Debug version ran ok on 4.1
Release didn't
Distribution (version from app store) versions didn't. Failed to get GPS.
Dissected the project file to see whats the difference.
Found that
Target and Build settings weren't identical.
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
Was set for BUILD for Debug/Release and Distribution
but
for TARGET it was set for DEBUG to
IPHONEOS_DEPLOYMENT_TARGET = 3.0;
and NOT set at all in RELEASE and DEBUG
I deleted the build directory and set
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
for BUILD (Debug/Release/Distribution) (Right click on top level in tree YourApp >> Info menu)
and TARGET (Debug/Release/Distribution) (Right click on Target >> YourApp >> Info menu)
Rebuilt Release version now work so had to hope setting same in Distribution would work. Released to app store. Was approved in 2 days both times. Tried it. App ran but no GPS. Tried deleting the provisioning profile, no luck. overnight phone lost power so restarted. Tried the app and it worked. So maybe
To check this yourself. Copy the YourApp.xcodeproj to a safe location. Rename so extention no longer .xcodeproj This becomes a folder. Open and it will have 3 files Build settings are in project.pbxproj
Scroll to the bottom: look for /* Begin XCConfigurationList section */
Notice theres two sections on for Build and one for Target
/* Build configuration list for PBXNativeTarget
...
/* Build configuration list for PBXProject
If youve done a Distribution build then each will have Debug/Release and Distribution settings
1D6058940D05DD3E006BFB54 /* Debug */,
1D6058950D05DD3E006BFB54 /* Release */,
C55BCF5811ADCA470050ABDB /* Distribution */,
The 24 digit hex number point back up to section further up in the file. IF you lay the 3 sections (side by side in a table) you can see the differences.
Only differences TARGET (Debug, Release and Distribution)
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
....
IPHONEOS_DEPLOYMENT_TARGET = 3.0;
....
};
name = Debug;
};
not set for Release/Distribution
BUILD(set for Debug/Release/Distribution)
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
SDKROOT = iphoneos4.1;