Multitasking not supported, with no warning, when CFBundleName is mismatched

Originator:me
Number:rdar://11439955 Date Originated:2012-05-11
Status:Open Resolved:
Product:iPhone SDK Product Version:5.1
Classification:Other Bug Reproducible:Always
 
Summary:
If the CFBundleName does not match the CFBundleExecutable in an iOS app's Info.plist file, everything will appear to work and it builds without warnings, but the application will not be allowed to multitask or enter the suspended state.

Calls to [UIApplication beginBackgroundTaskWithExpirationHandler:] will be refused with UIBackgroundTaskInvalid, and the application proceeds immediately from applicationDidEnterBackground to applicationWillTerminate.

Updating CFBundleName to match the value of CFBundleExecutable in Info.plist immediately resolved this problem.

Steps to Reproduce:
I was able to reproduce it going back and forth with the mismatched keys in Info.plist.

Expected Results:
- A mismatch between CFBundleName and CFBundleExecutable should generate a compiler warning.
- Maybe multitasking should work or fail in a more informative way when such a mismatch exists, but that's up to you.

Actual Results:
This was not a fun bug to find. I'm going to get a beer.

Regression: n/a

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!