Tag Archives: api

App Store Tip: Don’t Forget to Include Network Error Alerts in Your Code

If your application provides functionality that requires access to a network, it’s very important that your code include a customer alert or notification when the network is not available. The Reachability sample application demonstrates how to use the System Configuration Reachability API to monitor the network state of an iPhone or iPod touch. Use this sample code to learn how to detect the absence of Wi-Fi and Wireless Wide Area Network (WWAN) services so your application knows when it’s necessary to produce a network error alert. Your users will appreciate knowing when an application has no network access — and missing “network alerts” is the third most common reason for applications being returned to developers for modification. Read more app submission tips

Adding iPhone OS 3.x Features to Your iPhone OS 2.x-compatible Apps

You can add great new iPhone OS 3.x features to your application — In App Purchase, Push Notifications or the mail compose view — while maintaining compatibility with iPhone OS 2.x. By using “weak linking” in your Xcode project, you can include frameworks you’ll need for the newer features, and check for API availability when your application is running. This technique provides you with the broadest possible audience for your application. You can offer a game that runs great on iPhone OS 2.x, while adding the ability to buy new levels for users on iPhone OS 3.x. Or have a note-taking app that sends notes via the built-in Mail client on iPhone 2.x, and uses the Mail Composer Window within your application when it’s running on iPhone 3.x. Just be sure to clearly identify any version-specific features of your app in your marketing description. The MailComposer sample code demonstrates this technique of targeting older OS versions while building with newly released APIs, using the mail compose view (from the MessageUI framework) as an example. For more information on weak linking in Xcode, see the SDK Compatibility Guide .