iOS 8 to Offer App Developers More than 4,000 New APIS, Plus a Host of Other Goodies
|Stuart Parkerson in iOS Monday, June 2, 2014|
Its official, iOS 8 is on its way and the beta version of the operating system is now available for developers to play with. Announced at WWDC, iOS 8, OS X Yosemite, and the new programming language, Swift (available in Xcode 6), were all big news. This article concentrates on iOS 8, which will be available this fall as a free software update for users.
iOS 8 lets developers extend select areas of the system by supplying an app extension code that enables custom functionality within the context of a user task. iOS supports app extensions for the following extension points:
Share: By providing more sharing options, iOS 8 enables an app to share photos, videos, websites, and other content with social websites and other entities.
Photo Editing: Embed filters and editing tools directly into the Photos app, so users can apply effects to images and videos without having to import them into an app.
Custom Actions: Create custom action buttons in the Action sheet to let users watermark documents, add something to a wish list, translate text to a different language, and more.
Today: Apps can now display widgets in the Today view of Notification Center, providing quick updates or enabling brief tasks. For example, posting updates on package deliveries, the latest surf reports, or breaking news stories.
Storage Provider: Developers can now 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.
Document Picker: The document picker view controller grants users access to files outside an app’s sandbox. Documents are shared between apps, enabling users to edit a single document in multiple places.
Custom Keyboard: With iOS 8, developers can provide custom keyboards with different input methods and layouts for users to install and use systemwide.
iOS 8 includes over 4,000 new APIs that lets developers add new features and capabilities to apps:
Touch ID: An app can now use Touch ID to authenticate a user before accessing some or all content in an app. Fingerprint data is protected and never accessed by iOS or other apps.
PhotoKit: Provides new APIs for working with photo and video assets, including iCloud Photos assets, that are managed by the Photos app, so an app can edit photos directly in the Camera roll without having to import them first. Key features include a thread-safe architecture for fetching and caching thumbnails and full-sized assets, requesting changes to assets, observing changes made by other apps, and resumable editing of asset content.
Manual Camera Controls: The AVFoundation framework allows an app to take direct control over the camera focus, white balance, and exposure settings. An app can also use bracketed exposure captures to automatically capture images with different exposure settings.
HealthKit: Allows apps providing health and fitness services to access shared health-related information in one place. A user’s health information is stored in a centralized and secure location and the user decides which data should be shared with an app. An app can access any shared health-related information and can provide information about the user without developers having to implement support for specific fitness-tracking devices. Information can come from devices connected to an iOS device or manual entry by the user.
HomeKit: This is a new framework for communicating with and controlling connected devices in a user’s home. Apps can enable users to discover devices in their home and configure them, or developers can create actions to control those devices. Users can group actions together and trigger them using Siri.
CloudKit: Leverage the full power of iCloud and build apps with the new CloudKit framework. Developers can now securely store and efficiently retrieve app data, like structured data in a database or assets, right from iCloud. CloudKit also enables users to anonymously sign in to apps with their iCloud Apple IDs without sharing their personal information. CloudKit provides authentication, private and public databases, and structured and asset storage services, all for free with very high limits.
Handoff: Using a simple API in Foundation, an app can participate in Handoff to let users start an activity on one device and seamlessly resume the activity on another device.
Technology improvements in iOS 8 facilitate the implementation of a game’s graphics and audio features including the ability to take advantage of high-level frameworks for ease-of-development, or use new low-level enhancements to harness the power of the GPU. These include:
SceneKit. A high-level 3D graphics framework that helps create 3D animated scenes and effects in apps. It incorporates a physics engine, a particle generator, and ways to script the actions of 3D objects so game developers can describe a scene in terms of its content, geometry, materials, lights, and cameras, then animate it by describing changes to those objects. SceneKit’s 3D physics engine enlivens an app or game by simulating gravity, forces, rigid body collisions, and joints. It’s also completely integrated with SpriteKit, so developers can include SpriteKit assets in 3D games.
The SpriteKit framework adds new features to make it easier to create high-performance, battery-efficient 2D games. With support for custom OpenGL ES shaders and lighting, integration with SceneKit, and advanced new physics effects and animations, developers can add force fields, detect collisions, and generate new lighting effects in games. Xcode 6 also incorporates new shader and scene editors that save time creating games. Create a scene’s contents, specifying which nodes appear in the scene and characteristics of those nodes, including physics effects. The scene is then serialized to a file that a game can easily load.
Metal: With extremely low-overhead access to the A7 GPU, Metal enables high performance for sophisticated graphics rendering and computational tasks. Metal eliminates many performance bottlenecks that are found in traditional graphics APIs. It’s specifically designed to exploit modern architectural considerations, such as multiprocessing and shared memory, to make it easy to parallelize the creation of GPU commands. Metal offers a streamlined API, a unified graphics and compute shading language, and Xcode-based tools.
Swift: A new programming language for Cocoa and Cocoa Touch with concise yet expressive syntax. Writing Swift code within an Xcode 6 playground shows instant results, while finished apps are compiled into high-performance native machine code. The Swift language is fast, modern, safe, and interactive.
The iOS 8 beta for developers is available here.
Read more: https://developer.apple.com/ios8/