On the 9th of September the new iPhone 6 and some other equally cool devices are expected to be presented. The new iPhone will ship with the new version of iOS (iOS8) which was presented at the Apple WWDC on the 2nd of June.
This new OS will also be available to update the following devices:
- iPhone 4s (and all newer devices)
- iPod touch 5th generation
- iPad 2
- iPad mini
This article summarises the key developer-related features introduced in iOS8, which could have an impact on app development, as well as provide possibilities for upcoming new features, and Service2Media’s M2Active Platform.
iOS 8 lets you extend areas of the system by supplying an app extension, which is essentially code that enables custom functionality within the context of a user task. For example, you might supply an app extension that helps users post content to your social sharing website. After users install and enable this extension, they can choose it when they tap the Share button in their current app. Your custom sharing extension provides the code that accepts, validates, and posts the user’s content. The system lists the extension in the sharing menu and instantiates it when the user chooses it.
What are extensions?
- They are not apps, not even a piece of the app. They have their own code signature, own set of entitlements and own container.
- To distribute an extension, you must submit a containing app to the app store. The app should be a functional app, it can not just be a bundle of extensions.
- Always accessed via Apple framework code.
- They do not facilitate app 2 app IPC (inter-process-communication)
iOS8 supports app extensions for the following areas, which are known as extension points:
- Share. Share content with social websites or other entities.
- Action. Perform a simple task with the selected content.
- Today. Provide a quick update or enable a brief task in the Today view of Notification Center.
- Photo editing. Perform edits to a photo or video within the Photos app.
- Storage provider. Provide a document storage location that can be accessed by other apps. Apps that use a document picker view controller can open files managed by the Storage Provider or move files into the Storage Provider.
- Custom keyboard. Provide a custom keyboard that the user can choose in place of the system keyboard for all apps on the device.
Extensions in M2Active
Extensions could be very powerful in combination with M2Active. They add a wide range of possibilities to create custom apps, which extend the native share possibilities, provide custom widgets and even support custom keyboards and alternative storage providers. Some of the most interesting extensions that we see coming in future M2A projects are:
The share extension is a very significant addition to the platform. It is now possible to extend the native share sheets to present a way to upload text, photos, videos, audio, and links from within any other app. Our platform had been widely using custom components to allow content sharing in the different social networks. Recently, we introduced the Platform.share() method in the platform, which makes use of the native share features of the OS. Even if this new feature frequently facilitates the use and implementation of share functionalities in our projects, it is not sufficient. (LinkedIn, Google +, …)
|Native share functionalities in iOS 5.0 , 6.0 and 8.0|
As you can see in the image above, the native share functionalities of iOS have been evolving from version to version. iOS8 makes it possible to no longer depend on what Apple and its partners provide in the share sheet, but to create our own share extensions, which will also appear in the same native share sheet.
There have been widgets in the notification center of iOS for a while, but now for the first time iOS8 gives developers the opportunity to develop their own widgets. For our Platform this means alignment with Android and the option to create custom widgets.
|Today view in notification center|
Notifications in iOS8 offer many new possibilities for developers. Starting with the payload of push messages, which has increased from 255 characters to 2KB max size, therefore 2048 bytes (characters). This is about an A4 page of ordinary text.
|iOS 8.0 Notifications|
Before iOS8 there was only one default action when clicking in a notification. This was to open the application to the foreground (when launching the app it is possible to check if it was being opened because of a notification). iOS8 makes it possible to have more actions on receiving a notification. This enables developers to exploit the use of push notification even more in M2A projects and the CERTA service.
Local notifications are now available to work with the location framework. It is possible to define geographic areas and display an alert or a pop-up message when the user arrives at a certain location.
- Uses UILocalNotification
- Fire when user enters or exits a region
- Fire-Once or Fire-Always
- Requires Core Location registration
It is also possible to set beacon regions or any kind of subclass to trigger actions in the application.
Additional Framework Changes
In addition to the major changes described above, iOS 8 includes other improvements.
Many frameworks on iOS have adopted small interface changes that take advantage of modern Objective-C syntax:
- Get and set methods are replaced by properties in most classes. Code using the existing get and set methods should continue to work with this change.
- Initialisation methods are updated to have a return value of instance type instead of id.
- Designated initialisers are declared as such where appropriate.
In most cases these changes do not require additional work in Objective-C code. However we are working to implement these changes in your own platform when appropriate. In particular, if we may want to modernise our Objective-C code for the best experience when interoperating with Swift code.
AV Foundation Framework
The AV Foundation framework (AVFoundation.framework) enables you to capture metadata over time while shooting video. Arbitrary types of metadata can be embedded with a video recording at various points in time. For example, you might record the current physical location of a video created by a moving camera device. This will be a great improvement to the Media class in M2A.
This new framework minimizes the effort required to create user interfaces for apps that take advantage of inter-app audio. We can make use of these new native frameworks inside M2Active applications.
Core Image Framework
The Core Image framework (CoreImage.framework) has the following changes:
- You can create custom image filters in iOS.
- Core image detectors can detect rectangles and QR codes in an image.
QR code detection is an interesting new feature to extend the platform and be able to directly read QR codes using native frameworks.
Core Location Framework
The Core Location framework (CoreLocation.framework) has the following changes that extend the possibilities of the Location class in the platform:
- You can determine which floor the device is on, if the device is in a multi-story building.
- The visit service provides an alternative to the significant location change service for apps that need location information about interesting places visited by the user.
The UIKit framework (UIKit.framework) includes the following enhancements:
- Collection views support dynamically changing the size of cells. Typically, you use this support to accommodate changes to the preferred text size, but you can adapt it for other scenarios too. Collection views also support more options for invalidating different portions of the layout and thereby improving performance.
- The UINavigationController class has new options for changing the size of the navigation bar or hiding it altogether by using gestures.
- The new UIVisualEffect class enables you to integrate custom blur effects into your view hierarchies.
|UI visual effect in iOS 8.0|
- The new UIPresentationControllerclass lets you separate the content of your view controllers from the chrome used to display them.
|UI Presentation controller in iOS 8|
- The newUIAlertController class replaces the UIActionSheet and UIAlertView classes as the preferred way to display alerts in your app.
|UI Alert controller in iOS 8|
- You can take the user directly to your app-related settings in the Settings app. Pass the UIApplicationOpenSettingsURLString constant to the openURL: method of the UIApplication class.
Other Additions in iOS8
There is a lot of new stuff coming on this release of iOS. For now we will not go deep on each of these additions, so lets give a quick summary for some of them. Below is possible to find many of these new functionalities and frameworks with a short description of each one. It is possible to think about particular use cases for clients that might need these new functionalities available in the new OS.
Touch ID Authentication
Your app can now use Touch ID to authenticate the user. Some apps may need to secure access to all of their content, while others might need to secure certain pieces of information or options. In either case, you can require the user to authenticate before proceeding. Use the Local Authentication Framework (LocalAuthentication.framework) to display an alert to the user with an application-specified reason for why the user is authenticating. When your app gets a reply, it can react based on whether the user was able to successfully authenticate
Health Kit Framework
Health Kit (HealthKit.framework) is a new framework for managing a user’s health-related information. With the proliferation of apps and devices for tracking health and fitness information, it’s difficult for users to get a clear picture of how they are doing. Health Kit makes it easy for apps to share health-related information, whether that information comes from devices connected to an iOS device or is entered manually by the user. The user’s health information is stored in a centralized and secure location. The user can then see all of that data displayed in the Health app.
Home Kit Framework
Home Kit (HomeKit.framework) is a new framework for communicating with and controlling connected devices in a user’s home. New devices being introduced for the home are offering more connectivity and a better user experience. Home Kit provides a standardized way to communicate with those devices.
iCloud includes some changes that impact the behavior of existing apps and that will affect users of those apps. Cloud Kit Cloud Kit (CloudKit.framework) provides a conduit for moving data between your app and iCloud. Unlike other iCloud technologies where data transfers happen transparently, Cloud Kit gives you control over when transfers occur. You can use Cloud Kit to manage all types of data. Apps that use Cloud Kit directly can store data in a repository that is shared by all users. This public repository is tied to the app itself and is available even on devices without a registered iCloud account. As the app developer, you can manage the data in this container directly and see any changes made by users through the Cloud Kit dashboard. Document Picker The document picker view controller (UIDocumentPickerViewController) grants users access to files outside your application’s sandbox. It is a simple mechanism for sharing documents between apps. It also enables more complex workflows, because users can edit a single document with multiple apps. The document picker lets you access files from a number of document providers. For example, the iCloud document provider grants access to documents stored inside another app’s iCloud container. Third-party developers can provide additional document providers by using the Storage Provider extension.