[UPDATE: InvokeEventReason.NOTIFICATION added for accessing the notification payload when application was not running in the background. Latest AIR build containing these changes available here]
Push/Remote Notifications support for iOS platform has been made available in latest release of AIR 3.4. This blogpost will cover everything you need to do to get remote/push notifications working in your AIR application: subscribing for remote notifications, configuring your application in the iOS Provisioning Portal, sending notifications to Apple’s Push Notification Service (APNS), and handling them in your application. Another detailed article discussing Push Notifications Support in AIR can be found at http://www.adobe.com/devnet/air/articles/ios-push-notifications.html
Remote notifications, or server push or push notifications, describe a style of Internet-based communication where the request for a given notification is initiated by the publisher or central server. It contrasts with pull technology, where the request for the transmission of information is initiated by the receiver or client (device in our case). Push technology has the advantage over pull notifications that device battery and network bandwidth are saved when no new data is available. Continue reading…
One must have come across many mobile applications(mostly games) that remain in landscape orientation across their lifetime. They start in landscape orientations and remain in landscape orientations irrespective of the orientation in which the device is held or moved. A landscape only application should ideally support both landscape orientations namely Landscape_Left and Landscape_Right and should not auto rotate to any portrait orientation if the device is held in one of the portrait orientations.
Prior to AIR 3.3, StageAspectRatio supported two public constants PORTRAIT and LANDSCAPE. Using one of these values in the aspectRatio tag in the application descriptor would only lead to the application opening up in PORTRAIT or LANDSCAPE orientation respectively. However, the Stage would re-orient in all orientations as per the new device orientation. For example:- with StageAspectRatio set to PORTRAIT, an app would open in PORTRAIT orientation but would reorient to LANDSCAPE_LEFT orientation when device orientation was changed to LANDSCAPE_LEFT.
Update in AIR 3.6: PreventBackup Property introduced for File Objects. More Details here.
AIR applications targeted for iOS may get rejected in the application review process with the reason “Rejection: 2.23 Apps must follow the iOS Data Storage Guidelines or they will be rejected“. Usage of File.applicationStorageDirectory or Local Shared Objects (LSOs) in the application might be the reason. Recently, Apple has updated the Data Storage Guidelines with the release of iOS 5. Since the guidelines are accessible only to registered iOS developers, let me summarize the key points below:-
- The entire home directory is backed up to iCloud by default, except the Application bundle itself, Caches directory and the tmp directory.
- In order to minimize the data that needs to be backed up, Apple expects the developer to adhere to the following guidelines:
- Only user generated data, which other wise cannot be recreated like an image capture or voice recording should be stored in Documents directory.
- Application Support Directory must be used to store only application specific data files. For example:- application configuration files or game levels. Data stored here is not vulnerable to be purged under low memory conditions. Continue reading…