Following today’s “Let’s Talk iPhone” media event Apple has released the GM (Golden Master) seed of iOS 5 to developers via the Dev Center. Downloads will follow shortly. This will be the final shipping version that is released next week. Release Notes inside.
iOS SDK Release Notes for iOS 5.0
iOS SDK 5 provides support for developing iOS applications and includes the complete set of Xcode tools, compilers, and frameworks for creating applications for iOS and Mac OS X. These tools include the Xcode IDE and the Instruments analysis tool among many others.
With this software you can develop applications that run on iPhone, iPad, or iPod touch running iOS 5. You can also test your applications using the included iOS Simulator, which supports iOS 5. There are two Xcode iOS SDK 5 images, one for installing on a Macintosh computer running Mac OS X 10.6.7 (Snow Leopard) or later, the other for installing on a Macintosh computer running Mac OS X 10.7 (Lion).
This version of iOS is intended only for installation on devices registered with Apple’s developer program. Attempting to install this version of iOS in an unauthorized manner could put your device in an unusable state.
For more information and additional support resources, visit:
Please report any bugs not mentioned in the “Introduction” section using the Apple Bug Reporter on the Apple Developer website (http://developer.apple.com/bugreporter/). Additionally, you may discuss these issues and iOS SDK 5 in the Apple Developer Forums: http://devforums.apple.com. You can also access more information about iCloud for Developers at: http://developer.apple.com/icloud
Notes and Known Issues
The following issues relate to using the 5 SDK to develop code.
- When creating an iCloud account, you can use any Apple ID as long as it is a full email address and not a MobileMe account. If you have a MobileMe account, you can move that account to iCloud. You can find more information at: http://me.com/move
- Starting in iOS 5, AirPlay is enabled by default for video content in applications and websites.
- In iOS 5, AV Foundation adds support for video playback via AirPlay.
NSNetServiceclass and CFNetService APIs do no include P2P interfaces by default. To browse, register, or resolve services over P2P interfaces, an application needs to use the Bonjour
DNSService*()APIs noted below.
- Setting the interfaceIndex parameter to
kDNSServiceInterfaceIndexAnyin the following API’s will not include P2P interfaces by default. To include P2P interfaces, you must now set the
kDNSServiceFlagsIncludeP2Pflag when using
kDNSServiceInterfaceIndexAnyor set the interfaceIndex to
kDNSServiceInterfaceIndexP2P. The affected APIs are:
- In the iOS 5 development tools, it is possible to extract APIs used by an application and have them checked for use of private APIs. This option is offered when you validate your application for app submission.
- The Apple TV Software enables users to mirror the contents of an iPad 2 to an Apple TV (2nd generation) using AirPlay. This software also enables Photo Stream on Apple TV so users can access photos stored in iCloud. Apple TV Software beta is being provided to test the latest AirPlay functionality with your iOS 5 apps and web sites. If you wish to install Apple TV Software beta on your device, you must first register your device UDID in the iOS Developer Program Portal.
Automatic Reference Counting
- In Xcode, if the configuration is set to Device and there is a space in the path of one of the source files (more commonly, the project is inside a directory with spaces), the “Convert to Automatic Reference Counting” step (after Precheck) will fail with error:
Error in format of file: <path>.
If encountered, the user should switch to Simulator and retry the migration.
- On applications linked against the iOS 5 SDK, scroll view content offsets will no longer be rounded to integral pixels during a pinch gesture.
- Match data for turn-based matches is limited to 4 KB.
- FIXED: Auto-matching with the turn-based view controller does not work. Invites or the direct auto-match API can be used as a workaround.
- Backups made prior to September 22nd are no longer available. It is strongly advised to upgrade to this version of iOS 5 in order to continue backing up your devices
- In the iCloud key-value store, the maximum number of keys has been raised to 256.
- All newly generated provisioning profiles are now automatically enabled for iCloud. If you are using an Xcode managed Team Provisioning Profile, click refresh in the Xcode Organizer to obtain a new iCloud-enabled profile. To enable all other provisioning profiles for iCloud, simply regenerate your profiles in the iOS Provisioning Portal.
- If your application is using the
NSMetadataQueryclass, you must set a predicate and the predicate is now honored. But the predicate is an
NSPredicate-style predicate, not a Spotlight-style predicate. An example of the difference is that you must use
=for wildcard matching. The differences are defined in more detail at:http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Predicates/Articles/pSpotlightComparison.html#//apple_ref/doc/uid/TP40002370-SW1.
NSMetadataQueryis not supported.
- To enable iCloud storage within your apps in iOS 5, click the Enable Entitlements checkbox in the Summary pane of your project. Xcode creates a custom entitlements file for your project that automatically includes your Team ID. You can add additional iCloud Container values as required by your application. (Note that you must regenerate your existing provisioning profiles, either with Xcode or in the iOS Provisioning Portal, to use iCloud storage.)
- The container identifier string you pass to the
NSFileManagermust include the team ID at the beginning of the string. As a convenience, you can pass
nilto retrieve the first document container ID specified in your app’s entitlements.
- In iOS 5, files that are protected via Data Protection cannot be used with iCloud Storage APIs.
- File presenters—objects that adopt the
NSFilePresenterprotocol—do not receive some of the messages that they are supposed to receive, including:
As a work around, implement the
relinquishPresentedItemToWriter:method and check to see if the writer actually wrote when your file presenter reacquires the file.
- If you report a bug related to the iCloud storage interfaces, please include the logs collected during your debugging session. To generate these logs, you must install a special debug profile on your device.
The debug profile can be obtained from http://connect.apple.com. This profile enables the generation of debug logs that are needed to diagnose any problems using iCloud storage. The instructions to collect the logs are:
- Install the profile. (The easiest way to do this is to mail it to yourself and open the attachment on your device.)
- Reproduce the bug.
- Sync with iTunes to pull the logs off your device.
- Attach the logs to your bug report. You can find the logs in
These logs can grow large very quickly, so you should remove the profile after you have reproduced the problem and pulled the logs of your device.
- File names are case-insensitive in Mac OS X but case-sensitive in iOS. This can lead to problems when sharing files between the two using iCloud. You should take steps on iOS to avoid creating files whose names differ only by case.
- The version of iTunes that comes with the GM release cannot sync devices that have the beta 7 software installed. To avoid this problem, do the following:
- Sync any devices that have beta 7 installed to the version of iTunes that came with beta 7.
- Upgrade iTunes to the version that comes with the GM release.
- Connect the device and install the GM software. (Understand that you might see a failure to sync error when you first connect the device.)
- After installing the GM software, restore from your backup you made in step 1.
- FIXED: When deleting a song or video from Music/Videos on the device, the Music Player app crashes.
- In iOS 5, the signing of certificates with MD5 signatures is not supported. Please ensure that certificates use signature algorithms based on SHA1 or SHA2.
- Push and local notifications for apps appear in the new Notification Center in iOS 5. Notification Center displays notifications that are considered “unread.” To accommodate push and local notifications that have no unread status, set your application’s badge count to 0 to clear that app’s notifications from Notification Center.
- When using the
UIATargethave been replaced with the
- In iOS 5, you can now trigger the execution of a UI Automation script on an iOS device from the host terminal by using the instruments tool. The command is:
instruments -w <device id> -t <template> <application>
- When using the cli instruments for UI Automation you can now target the default Automation Template and pass the script and results path into the tool as environment variable options. For example:
instruments -w <device id> -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate <application> -e UIASCRIPT <script> -e UIARESULTSPATH <results path>
- Rotation callbacks in iOS 5 are not applied to view controllers that are presented over a full screen. What this means is that if your code presents a view controller over another view controller, and then the user subsequently rotates the device to a different orientation, upon dismissal, the underlying controller (i.e. presenting controller) will not receive any rotation callbacks. Note however that the presenting controller will receive a
viewWillLayoutSubviewscall when it is redisplayed, and the
interfaceOrientationproperty can be queried from this method and used to lay out the controller correctly.
- In iOS 5, the
UIPickerViewclass doesn’t send its
pickerView:didSelectRow:inComponent:delegate message in response to the programatic selection of an item.
tableView:viewForHeaderInSection:method (or its footer equivalent) is no longer sufficient to hide a header. You must override
0.0to hide a header.
- In iOS 5, the
UITableViewclass has two methods to move one cell from one row to another with defined parameters. These APIs are:
- Using the
UIWebViewclass in Interface Builder, setting a transparent background color is possible in iOS 5. Developers compiling against the new SDK can check their XIB for the
- In iOS 5, the
UITabBarimplementations have changed so that the
drawRect:method is not called unless it is implemented in a subclass. Apps that have re-implemented
drawRect:in a category on any of these classes will find that the
drawRect:method isn’t called. UIKit does link-checking to keep the method from being called in apps linked before iOS 5 but does not support this design on iOS 5 or later. Apps can either:
- Use the customization API for bars in iOS 5 and later, which is the preferred way.
UINavigationBar(or the other bar classes) and override
drawRect:in the subclass.
NSUInteger, so that these types match with methods defined on
- The behavior of the
scrollToRowAtIndexPath:atScrollPosition:animated:method has changed. If a scroll position of
UITableViewScrollPositionBottomis specified, the method now adjusts for the top and bottom portions of the
- In releases prior to iOS 5, the
UIPopoverControllerclass would unconditionally set the autoresizing masks of view controllers that provided the content for the popover controller. It would also unconditionally set the autoresizing masks of the views of view controllers pushed on to a
UINavigationControllerobject which was the content view controller of the popover controller.
UIPopoverControllerclass no longer does this for applications linked against iOS 5 or later. Developers should ensure that the autoresizing masks of views are set properly to allow for arbitrary resizing within any container, not just popovers. A mask of
- The completion handler for
saveToURL:forSaveOperation:completionHandler:is called outside of the coordinated write block.
autosaveWithCompletionHandler:method is now only called for period-based saves when it is safe to return without saving. Documents must save, though, if the
saveToURL:forSaveOperation:completionHandler:method is invoked.
Safari and WebKit
- In iOS 5, a new inherited CSS property,
-webkit-overflow-scrolling, is available. The value
touchallows the web developer to opt in to native-style scrolling in an
overflow:scrollelement. The default value for this property is
auto, which allows single-finger scrolling without momentum.
- The WebKit framework has been updated to a version which closely matches the engine used by Safari 5.1 on the Desktop. There are some areas to be aware of with the new WebKit framework on iOS 5. Specifically, for web sites and native apps that use UIWebView:
- There is a new HTML5-compliant parser.
- Text layout width may change slightly because word-rounding behavior now has floating-point-based precision.
- There is improved validation of the
<input type=number>form field, which includes removing leading zeros and number formatting.
- Touch events are now supported on input fields.
<input type=range>is now supported.
window.onerroris now supported.
- There is a new user agent that does not have locale information in the User Agent string.
- URLs are now canonicalized by making the scheme all lowercase. If a fake URL is used to pass information from a
UIWebViewback to native code, make sure that the scheme is always lowercase, or that the native code compares the scheme in a case-insensitive manner.
- Wireless syncing support requires Mac OS X 10.6.8 or Lion. You will see an option to enable wireless syncing when you connect your device to iTunes with the USB cable. It is recommended you perform your initial sync with a cable after restoring your device.
- Wireless syncing is triggered automatically when the device is connected to power and on the same network as the paired computer. Or, you can manually trigger a sync from iTunes or from Settings > General > iTunes Sync (same network as paired computer required).
- If you find issues with apps, media and/or photos synced to your device, you can reset then resync. From Settings > General > Reset, choose Erase all Content and Settings. Then reconnect to iTunes and sync again.