New features for IOS 8

Source: Internet
Author: User
Tags compact traits spritekit

This article describes the key features associated with IOS8 development.

APP Plugin

By supporting plug-ins, IOS8 allows us to extend the area specified by the system, that is, to provide a customized approach to the specific needs of the user. For example, you can use the app plugin to help users share their content to social networking sites. After the user installs the plugin, he can choose the plugin when he clicks the Share button in the app. Custom plugins provide the ability to accept, certify, and publish User content. The system lists them in the share menu and instantiates them after the user clicks.

In Xcode, you can create it by adding a pre-configured app with plug-ins. When a user installs a plugin app, the user can enable it in the settings. When the user is using another app, the system displays the plugin in the appropriate system interface, such as the Share menu.

iOS supports plugins in these areas:

share: share content to social networks

Action: perform a simple task with the selected content

Today: provide quick updates or perform simple tasks in today's notification hubs

Photo editing: Perform an edit of a picture or video in a photo-type app.

provides storage: provides file storage for other apps. The app uses a file selection controller to open or move files to a file storage provider.

Custom Keyboard: provides a keyboard that users can use in all apps.

Each plugin defines the APIs that they can use. When you start development with the plug-in template, a template with default values is created automatically.

Touch ID Authentication

The app can now use Touch ID to authenticate users. Some apps can require a secure login to view content, some apps may require a secure login, or, in either case, require the user to authenticate and then do something else. You can use the Local authentication Framework (localauthentication.framework) to eject a popup box (specifying why authentication is required) for the user to authenticate. When the app gets a reply, it can perform the next action based on whether the user is authenticated successfully.

Passkit

The Passkit framework supports payment vouchers and payment requests. Payment requests allow users to securely provide their payment information to pay for physical goods or services. Payment vouchers are used for online payments.

Photo

Take better photos in the app, provide new editing capabilities for the Photo class app, and provide a more efficient way to access user photos.

Photo Frame

Photo Frames (Photos.framework) provide new APIs for photos and videos, including access to icloud photos managed by the photo app. This is a more powerful framework, with key features including thread-safe, getting and caching thumbnails and large images, and modifying pictures.

You can use this framework to create plugins for editing pictures and videos

Manual camera Control

AV Infrastructure (avfoundation.framework) allows us to easily take good photos. The app can directly control the camera focus, white balance, exposure and other settings. In addition, the app can use exposure to automatically be exposed to different exposures.

Improved Camera method

Use down API to discover new camera properties in IPhone6 and IPhone6 Plus

New properties (videohdrsupported) to detect whether a device supports high-speed motion capture

New video Stabilization Mode (avcapturevideostabilizationmodecinematic) provides a better mode of shooting movies

The new attribute (highresolutionstillimageoutputenable) lets you set the Avcapturestillimageoutput object to shoot high-definition static images.

The new attribute (Autofocussystem) can be used to determine how the camera is focused.

Game

Improvements in iOS8 technology make it easier to use graphics and video from the game. The advantages of using the upper frame can be easier to develop, or you can use the underlying technology to improve the capabilities of the GPU.

Metal

Metal provides access to the A7 and A8 underlying GPUs for complex graphical rendering and computational tasks. Metal eliminates a number of technical bottlenecks, such as resource-intensive state validation in traditional graphics APIs. Metal removes all state transitions and comparison operations from critical performance-sensitive code. Metal pre-processes shaders, state objects, and explicit scheduled tasks to ensure that the program achieves the highest possible GPU performance and computational efficiency. This design idea also extends to the tools for creating apps. When you create an app, Xcode pre-compiles the metal shader to eliminate the cost of preparing the shader at run time.

Graphics, calculations, and bit-block transfer instructions are used seamlessly and efficiently. Metal is designed for efficient processing of these transactions, such as multithreaded operations and shared memory, and better use of GPU commands

Using metal, you can use a streamlined API, a unified graphics and computing language, Xcode-based tools, so you don't have to learn more about the framework, language, tools to use the GPU.

SceneKit

Scenekit is a high-performance 3D game that Objective C framework uses to create simple games and enrich user interaction. Scenekit is already supported on OS X 10.8 and is now supported on iOS for the first time. The underlying API, such as OpenGL ES, requires detailed logic for rendering the scene. Instead, Scenekit only needs to describe the contents of the scene (shape, material, light, camera) and then add how to animate it.

SpriteKit

The SpriteKit framework (spritekit.framework) adds some new properties to support better game performance. Includes custom OpenGL ES shaders, and scenekit interactions, as well as new physical effects and animations. For example, you can use the Skfieldnode class to create physical regions to simulate gravity, drag, and acceleration effects. Physical collisions can be achieved easily.

AV Audio engine

The Avfoundation framework (avfoundation.framework) adds a lot of upper-level audio methods. These methods are available on both OS X and iOS, including access to audio input and output, audio recording and playback, and audio analysis and conversion. You can also add special effects and filters to control playback speed, stereo and 3D audio effects, as well as MIDI instruments.

OpenGL ES

IOS8 extended the Apple_clip_distance, Apple_texture_packed_float, Apple_color_buffer_packed_float.

HealthKit Framework

HealthKit (Healthkit.framework) is a new framework for managing user health-related information. With a variety of apps and devices to track health data, it's hard for users to know exactly what they mean. HealthKit makes it easier for apps to share data, whether it's from a device or from a user's own input. The user's information data is stored uniformly and securely. Users can see all the data in the Health app.

If the app is ready to support HealthKit, it can access user health-related data and can also provide data without the need for specific health-related hardware. Users can decide what data can be shared with the app. Once the user allows the app to be accessed, the app can register a notification of data changes. The app gets very detailed notifications. For example, you can request a user to measure a blood pressure notification, or a user with high blood pressure to receive notifications.

HomeKit Framework

HomeKit (Homekit.framework) is a new framework for connecting communication and control equipment to the home. Devices in the home can have a better user experience. HomeKit provides a standard way to communicate between devices.

Apps can use HomeKit to communicate between devices in their home. With your app, users can discover and configure devices in the home. They can also create actions that control the device, and users can control them with Siri. Once configured, users can also invite others to join. For example, users can also temporarily join a home network.

You can use the HomeKit emulator to test the HomeKit app on your device.

Icloud

icloud has an update that may have an impact on existing users

File Data Migration

Iclound files and data transfers between the user device and the server are more reliable. When a user installs iOS8 and logs in to an icloud account, the icloud server performs a file and data migration for the current user once. This migration includes copying the user's files and data into a new folder. This folder can only be accessed in iOS8 and OS X10.10. Before the operating system still accesses the previous folder, but changes to the data do not appear under the new folder, the changes under the new folder will not appear in the previous folder.

CloudKit

CloudKit (Cloudkit.framework) is a channel for apps and icloud to transfer data. Unlike other closed Iclound technologies, Cloudkit allows you to control when transmissions are made. And you can use Cloudkit to control all types of data.

Using Cloudkit to store data in a library can be shared by all users. This public library is bound to an app but can be accessed from anywhere on the device (even if you are not logged in to the Iclound account). As a developer, you can manage this data directly and manage all the changes.

Document Picker

The file Selection controller (Uidocumentpickerviewcontroller) allows the user to access the program's sandbox outside of the program. is an easy way to share files between apps. It also supports a number of complex ways, such as users may edit the same file in multiple apps.

File selectors can access files from multiple file providers. For example, Iclound allows you to access files stored in Iclound by other apps, and third-party developers can also provide files.

Handoff

Handoff is a feature that enhances the user experience across devices on OS X and iOS. Handoff allows users to start an activity on one device, then switch to another device and maintain the same activity on another device. For example, when a user browses a long article in Safari and then switches to an iOS device that is signed in to a unified Apple ID, the same Web page opens automatically in Safari in iOS and slides to the previous device's location. Handoff lets you experience seamless connectivity.

To use handoff, the app only needs to implement several APIs in the foundation. The activity that each user is running is represented by an object, and it contains information that needs to be restored on other devices. When the user chooses to resume the activity, the object is sent to another device. Each active object has a delegate that is called to refresh the activity at the appropriate time.

If the continuation of the activity not only requires the data of an active object, the restored app can create a data stream with the original app. The text-based app automatically supports this feature for Iclound-based documents.

Support for new screen size and zoom

The app on iOS8 needs to be ready to support the IPhone6 and IPhone6 plus screen sizes. On IPhone6 Plus, the app needs to support zooming for the new screen at the same time. In particular, apps using OpenGL ES and metal need to choose Caeagllayer or Cametallayer to have a better presentation on IPhone6 Plus.

To let the system know that the app supports IPhone6 screen size, you need to include a Storyboard splash screen file in your app. At run time, the system looks for the storyboard startup screen file. If this file exists, the system will assume that the app supports IPhone6 and IPhone6 Plus and will run in full-screen mode. If it does not exist, the system will use a small screen size (320*480 or 320 * 568) so that the app's screen calculation is still correct. The content is then stretched to fit the screen.

IOS8 also adds new features that make it easier to work with screen sizes and orientations. Creating an interface that supports both the ipad and the iphone makes it easier to adapt to different directions and screen sizes. Using the size class, you can get the overall size information for the device in the current direction. This information can be used to implement what was originally conceived, what content needs to be displayed, and the relative position of these elements and other elements. Then use auto layout to recalculate the size and position. XCODE6 uses the size class and AutoLayout to create storyboards that automatically adapts to different dimensions.

Describes the size class and the scaling of the interface

The size class can specify properties, such as a screen or interface, for an interface element. There are two size classes in IOS8: Regular and compact. Regular users define large areas of the screen, such as on an ipad, or a large picture on the screen, or the scrolling of an iphone. Each device has a size class that includes a horizontal screen and a vertical screen.

The figure below shows the size class for the ipad. Because there is enough space, the ipad's horizontal and vertical screens have a regular size class.

The size class of the iphone varies depending on the direction of the device. Under vertical screen, there is a compact size class on the horizontal screen, and there is a regular size class in vertical. This is a common way to scroll vertically to get updated information. When the iphone is in a horizontal screen, their size class is different. Most iphones have a compact size class in both horizontal and vertical. But IPhone6 Plus has a large enough space in landscape mode to support the regular width.

You can associate the size class with the view. This approach is flexible when the small interface is included in the large interface. Use the default size class to lay out the user interface in a large interface, and then adjust to any of your appropriate locations based on the different size classes.

To support the size class, you can use the following class:

    • The Uitraitcollection class is used to describe the properties of an object. traits Specifies the size class, the zoom displayed, and the properties of a particular object. Classes that support the Uitraitenvironment protocol (such as UIScreen, Uiviewcontroller,uiview, and so on) have a trait collection. You can get the trait collection of objects and execute them when traits changes.
    • The Uiimageasset class is used to group objects such as pictures according to traits. The different traits under the slightly different similar picture grouping then automatically obtains the correct picture under the corresponding trait. The UIImage class has made some modifications to it.
    • Classes that support the Uiappearance protocol can customize the interface of objects based on different trait.
    • The Uiviewcontroller class can get trait collections for sub-interfaces. You can change the layout of the sub-interface in the Viewwilltransitiontosize:withtransitioncoordinator: method.

Xcode6 supports a unified storyboard. Sotryboard can add a delete interface and limit the layout based on the currently displayed interface. A storyboard can be designed for multiple sizes compared to maintaining two different storyboard. First, design a common interface and then fine-tune the different interfaces to take advantage of each size. Can be tested in various sizes using XCODE6 to ensure they are displayed correctly

Support for new screen scaling

IPhone6 Plus uses the new HD screen. To support this resolution, IPhone 6 Plus creates a screen with a screen size of 414 * 736 and a zoom ratio of 3.0 (1242 * 2208 pixels). After rendering the contents of the screen, the uikit automatically adapts to the 1080 * 1920 resolution. To support this rendering behavior, you need to design a new 3x screen diagram. In Xcode6 asset catelogs can contain 1x,2x and 3x size. As soon as the new picture is added, iOS will automatically pick the correct size to run on the IPhone6 Plus. iOS image loading also supports the @3x suffix.

In graphics apps that use metal or OpenGL ES, content can be rendered directly in the current display size. For high-performance 3Dapp, each rendering requires a lot of computation. You can use the cache to render the content you want to display first.

The UIScreen object provides a new property (Nativescale) to view the zoom ratio of the current screen. When the value of Nativesale is equal to the scale value of the screen, the pixel resolution of the rendering is the same as the actual pixel resolution of the screen. When two values are not the same, you can sample the content to be displayed before it is displayed.

If it is an OpenGL ES App,glkview object will be the branch interface size as well as the Contentscalefactor property to automatically create the rendered cache. After the interface is added to the window, set the view's Contentscalefactor value to the Nativescale property of the screen.

Glkview Objects Support Scaling

-(void) didmovetowindow{    self.contentscalefactor = Self.window.screen.nativeScale;}

In the metal app, the app also needs to have similar code. Also, you need to update the Drawablesize property when the size of the interface changes

Cgsize drawablesize = self.bounds.size;drawablesize.width  *=*== drawablesize;

Other Framework Updates

In addition to the major updates above, IOS8 also contains other improvements

API Modernization

Some iOS frameworks have some interface changes to fit the modern objective-c syntax

    • In most classes, getter and setter methods are replaced by the properties. The getter and setter methods have been used to continue to work properly.
    • The initialization method is updated to return the ID type return value.
    • The declared content is initialized by the specified initialization.

In most cases, these changes do not require any extra work by the app. However, you may need to update these changes in your own OBJECTIVE-C code. In other words, you need to optimize your code to better interact with SWIFT code

AV Foundation Framework

The AV Foundation Framework (avfoundation.framework) can record other data while the video is being taken. Various data can be nested in the video over time. For example, you can record the location of the captured video.

Avkit Framework

The Avkit Framework (avkit.framework) in OS X is now supported by iOS. You can use it to play the video.

Coreaudiokit Framework

This framework makes it easy to cross-apply audio.

Core Image Framework

    • You can create your own graphics kernel in iOS
    • Core image to discover rectangles and QR codes in graphs

Core location Framework

    • You can tell which layer the device is on, if the device is on a multi-storey building.
    • Access Service provides location information that some users are interested in

Core Motion Framework

Core Motion provides two new classes (Cmaltimeter and Cmaltitudedata) to access the IPhone6 and IPhone6 plus barometer. On both devices, you can also use the Cmmotionactivity object to determine whether the user is on the bike.

Foundation Framework

    • The Nsfileversion class provides a historical version of icloud documentation. These versions are available in icloud, but can be downloaded.
    • The Nsurl class can store file thumbnails.
    • Nsmetadataquery can search for icloud files opened by the app

Game Controller Framework

    • If the controller is connected to the device, you can receive the device's action data through the game controller framework
    • If you only care about the button click and do not care about pressing the pressure, the button can be passed to the game processing

Gamekit Framework

    • The attributes added in IOS7 are now OS10.10 supported, making it possible to make cross-platform games better.
    • The new Gksavegame class and Gklocalplayer make it easier to save and load the user's game progress. Data is saved to icloud. Gamekit handles file synchronization between your device and icloud.
    • The method used to identify the user with a string is deprecated. Use the Gkplayer object to identify the user.

UIKit Framework

    • Apps that use a local or remote push service need to use the Uiusernofiticationsettings object to explicitly indicate the type of hint. The registration process separates from the process of registering a remote push service. and requires user consent.
    • Push can perform app-defined actions. The custom action is displayed as a button in the prompt. Once clicked, the app will be notified and then done accordingly. Local notifications can also be driven by location information.
    • The collection interface supports dynamically changing the cell size.
    • The Uisearchcontroller class overrides Uisearchdisplaycontroller to manage search-related displays.
    • Uiviewcontroller implements the traits and new computational size techniques to adjust the content.
    • The Uisplitviewcontroller can be supported on the iphone.
    • Uinavigationcontroller has some new options to change the navigation bar and how to hide it.
    • Uivisualeffect can add blur effects to the interface.
    • The Uipopoverpresentationcontroller class handles the content in the PopOver.
    • The Uialertcontroller class overrides the Uiactionsheet and Uialertview classes to display prompt information.
    • The Uiprinterpickercontroller class provides an interface for displaying a printer and selecting a printer. The printer is represented by a Uiprinter class instance.
    • Users can go directly to the app-related Settings screen.

For more information, refer to the official documentation

New features for IOS 8

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.