What developers need to know about the IOS SDK new features

Source: Internet
Author: User

Transferred from: https://onevcat.com/2016/06/ios-10-sdk/

It's very well written. Ha ha haha

General overview

It has been 9 years since the IPhone was born, and the IOS version number has entered double digits. As we look back on the development of the IOS system over the past four or five years, we cannot help but lament the rapid pace of change and the short iteration cycle. iOS 7 is a completely new design, the advent of Size Classes in iOS 8, application extensions, and the addition of Cloud kits, split-screen multitasking features in iOS 9, and more. Apple has released new systems and software in WWDC in recent years, and then held hardware products in the fall and winter (or spring). Every software update in WWDC actually indicates the direction of the corresponding hardware, I believe this year is no exception.

The good news for developers is that IOS 10 does not include too much content. iOS development in the coming year should be at least starting with iOS 8 or even iOS 9, and we'll have time to better sort, digest, and practice the previous version features. In contrast to open territory, IOS 10 is more focused on improving existing content to compensate for some of the problems that have been left behind by rapid development, which is what Apple needs to do right now.

Ecological integration and Extension development

In IOS 10, Apple continued its strategy for the last few years, that is, platform integration. No other vendor in the world has mastered a complete set of layouts, from the operating system to the application software to the software store, while mastering a range of hardware devices, including desktops, moving to wearable. Apple is clearly aware of what this advantage means. So Apple has been emphasizing platform consolidation in recent years, and if your app can work on both Ios,watchos and MacOS, it will undoubtedly be easier to attract users and Apple's favorites.

The other point is the integration and interaction between the various applications. It is not hard to see that, with the rise of extension development in recent years, Apple has gradually shifted from the idea that app is the "core of user experience" and that users should also be able to do the necessary interactions in notification hubs, desktop pendants or watches. The interaction between apps was previously a restricted area for IOS, but last year with the success of Workflow, Apple has a clear understanding of how the interaction between applications can improve user productivity. Some of the major updates in the SDK this year are all centered around this topic.

In iOS 10, Apple has added a lot of extension to our new template so that it's just a joke between colleagues that we're going to lose the iOS app developer's job and turn it into iOS extension developers. The type and number of newly added extensions are sufficient to illustrate the importance of using application extensions and expanding development in future IOS development. If you don't know anything about extended development, you can take a look at this introductory article, which provides a brief introduction to the basic concepts of extensions, how to share code between different target development, and a general approach to extended development.

SiriKit

The Siri API's openness is naturally the most exciting and bright-eyed feature of the IOS SDK. SiriKit provides us with a complete set of processes from speech recognition to code processing, and finally showing the results to the user. Apple has added a new set of framework intents.framework to represent the results Siri gets and resolves. Your app needs to provide some keywords to show that you can accept the input, and Siri extensions only need to listen to the system's identified user intent (intent), make appropriate responses, modifications, and actual actions, and finally provide feedback through intentsui.framework. The whole process is very clear, but it also means that developers can have limited freedom.

In IOS 10, we can only use SiriKit to do six kinds of things, namely:

    • Voice and video calls
    • Send Message
    • Send or receive payments
    • Search for photos
    • About the car
    • Manage Fitness

Adding Intents Extension support can be a great choice if your application happens to be dealing with problems in these areas. It will increase the likelihood of users using your app, as well as allowing users to use your services in other system-level applications like maps.

SiriKit notes (Pending pits)

User Notifications

The notification center has always been a battleground on IOS. How to provide timely and effective notification often determines the likelihood of user activity and retention. On IOS 10, Apple has enhanced and innovated notifications. Now, to better handle and manage notifications, the APIs associated with local and push notifications are encapsulated in the new framework usernotifications.framework. In IOS 10, the developer's server has the opportunity to make changes before local or remote notifications are sent to the user.

In addition, IOS 10 added the ability to add audio, images, and even video to notifications, based on the previous addition of notification action and text input. Now, your notifications not only remind users to go back to the app's portal, but also become a window to showcase the app's content and deliver multimedia information to the user.

User Notifications Notes-long-lived refactoring-iOS usernotifications Framework Parsing

IMessage Apps

The Message app is probably Apple's most focused part of promoting IOS 10 o'clock. While new stickers, auto-translate, and send full-screen effects are cool, it may be more interesting for program developers than IMessage Apps. In Xcode 8, Apple added a new type of project to the IOS application template, Messages application. At the same time, the simulator has even developed a new two-person dialogue mode for developers to debug such apps.

Although it is nominally a standalone app, it actually works as a extension. In this extension, Messages.framework will assume the primary responsibility for interacting with the system's message interface. You provide a custom View Controller to get the context in which the user is talking while using your message app, as well as send and receive actions, and respond appropriately. This extension is fun to use for some custom sharing directly in the Message app. But given that Apple has no intention of Message.app cross-platform for the time being, it may also be destined to be a supplement, not a mainstream.

IMessage Apps Note (pending pits)

IDE and tool improvements

In addition to some of the SDK changes under the integrated platform strategy, this year is more about development tools and innovation related to IOS developers.

Xcode 8

Xcode 8 shows a lot of interesting new features, such as the more powerful View debugging, which can help us to trace memory debugging, and so on. These tools are very powerful and will help us identify problems early in the development process, rather than bringing them into the final product.

In terms of app signing, Apple is finally aware of the mistakes they made in Xcode 7. I think maybe more than one person was caught in the Fix Issue button when the certificate and description file went wrong. This button will not only correct the problem, but will simply log off the existing developer certificate, and then "take the Liberty" to re-apply. In most cases, this makes things worse. Especially for newly added developers, they don't understand Apple's certificate system, the wrong operation and disposition, and often make the development environment irreversible. In Xcode 8, the same developer account now allows multiple development certificates, while the fully re-made app signature system is good enough to avoid the possibility of mis-operation. It is definitely worth a bit of flexibility to provide a flexible configuration space for large projects and complex CI environments, based on automatic configuration.

In addition, Xcode finally provides the ability to expand the Code Editor. Developers can now create XCSourceEditorExtension extensions to Xcode, and the history of creating plugins for Xcode without documentation help and official support is about to end.

Xcode 8 Notes (pending pits)

Swift 3

Swift Open source has been in the past half year. In Swift 2.2 We have seen the profound impact of the Community power of open source on language, and the effect of this effect will be more pronounced in swift 3.

The biggest change is the re-introduction of the Foundation framework, which may take a while to look back, which will mark Swift's complete separation from OBJECTIVE-C. The APIs in the Foundation framework are now imported into the language in a way that is more Swift-compliant. Broadly speaking, these changes include removing the NS prefixes, converting most of the classes to structs (although the underlying is still a copy-on-write reference implementation, you can see ReferenceConvertible the contents of the protocol), removing the repetitive semantics in the API, and so on. If at the moment you can see that swift and objective-c are homologous when using Foundation or developing apps, it may be a lot different when Swift 3 is officially released.

The conversion of a reference type to a value type will also lead to a change in how we think when using Swift development. The variability of the type in the previous Foundation framework is distinguished by the immutable type and its mutable type version (for example NSData , and NSMutableData ). In Swift 3, in general, only as immutable types of structs (for example Data ), changes to such structures would be more secure based on the behavior of write-time replication, rather than the risky memory operations of the original mutable objects. This is a lot of the time, in addition to ensuring the security of data sharing, internal reference features also guarantee the call speed. In fact, because you reduce unnecessary replication (such as creating a Mutable object based on an immutable object), you actually use the Foundation faster than the original with the Swift 3 API!

For more on Swift 3, I'll explain it in my "Swifter-100 Swift Essentials Tips" book in the form of a supplemental section. At the same time, the existing Swift 2-related descriptions and examples of the book will also be updated to accommodate the latest version in accordance with the syntax specifications and features of Swift 3. You can visit swifter.tips to get more information about this book.

Apple Ecology and other

In addition, the more significant news is that the ATS introduced in IOS 9 will be more stringent in the coming year. Since 2017, the newly submitted app will no longer be allowed HTTP access, and all Web requests within the app must be encrypted and done via HTTPS. So if your home app's server or some of the access pages are HTTP, you need to get over to HTTPS as soon as possible.

In addition, WatchOS 3 and TvOS also have some new content. The most important of these is the use of SceneKit and SpriteKit in the genus WatchOS. While the two frameworks are meant to be games, watch's small screen and low performance may not be enough to support our work on such a restricted platform. But these two frameworks can provide a good animated complement to the interactive WatchOS, which may be more appropriate for their use on WatchOS.

Finally, OS X is renamed MacOS, and some media and developers interpret it as going to jobs, but I'm more inclined to think of it as a basic need for obsessive-compulsive disorder and perfectionism. No matter how the name changes, Apple's layout of the four product lines, Ios,macos,watchos and TvOS, is complete, and the whole ecosystem now looks healthy. Apple's focus on user rights and privacy, as well as its push on HTTPS, is undoubtedly the driving force of this era.

Summarize

As in previous years, I will gradually add the session notes later, using some simple examples to illustrate how the new framework is used. You can also find the relevant link in this article, or by subscribing to ensure that the first time to obtain the relevant content (please do not use QQ mailbox when subscribing, will not receive mail). However, direct access to the Apple developer site WWDC related content will be a quicker way to get that knowledge.

Happy WWDC. Happy coding!

What developers need to know about the IOS SDK new features

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.