WWDC summary: what developers need to know about iOS 9 SDK new features

Source: Internet
Author: User
<span id="Label3"></p><p><p>http://blog.csdn.net/uxyheaven/article/details/46470801</p></p><p><p>Editor's note: WWDC 2015 The Apple Developer Conference is the annual event for mobile developers, Infoq Chinese Station In addition to the first time to organize keynote content to share to everyone, but also invited senior frontline developers to share their harvest. This article summarizes the new features of iOS 9 SDK revealed on WWDC by Wang Wei (@onevcat) and shares it with the vast majority of iOS Developers.</p></p><p><p>Year-old Flowers similar, year-old people are different every year. This year's WWDC, as always, has benefited from Apple's random lottery mechanism, which has given more Chinese developers a chance to experience the scene in the past two years and to communicate more with global Developers. More developers may be able to focus on this global Apple developer event at home or at the company, but this does not diminish the enthusiasm for Development.</p></p><p><p>Life is endless, learning is more Than. Since WWDC began to receive the attention of developers, this is an important way for developers to learn and Improve. It can be felt that the average level of domestic developers in recent years has become more and more high, I hope this trend can be maintained, after all, only with the support of the community, developers will be the most powerful existence.</p></p><p><p>Without further ado, let's take a look at some of the things developers may need to focus on in this year's WWDC.</p></p><p><p>General overview</p></p><p><p>The biggest challenges and the most urgent tasks for developers in the IOS 9 era are likely to be two, starting with the use and adaptation of the new IPad Split-screen multitasking feature, followed by how to build the native Watch app with watchOS. Another new topic is the derivation and expansion of existing frameworks, ranging from unit testing to UI testing, how to further capture and use the System's notification hubs and search pages, and the use of Swift 2.</p></p><p><p>It can be said that the iOS 7 and iOS 8 in two successive heavyweight changes and updates, for ordinary app developers, the IOS 9 SDK is a bit of moderation and calm, the new SDK in the API and overall design has not happened like the two previous systems as the same changes. Developers are also taking the opportunity to take a breather and get familiar with and at least transition to using the IOS 8 SDK to build their apps (such as trying to use Size Class and Presentation Controller, etc.) during the year. Maximizing your professional skills and making app levels, and keeping up with the rolling Apple wheels, should be a major task for COCOA developers this year. From the WWDC technology roadmap in recent years, Apple development is a piece of the picture, and if your technology stops at any point in the year, then trying to catch up with what you're likely to pay is a lot of energy.</p></p><p><p>Multitasking</p></p><p><p>This can be said to be the biggest selling point of IOS 9. Multitasking features, especially the Split-screen multitasking, make the IPad truly look like a worthy pc. While the jailbreak plugin has long been available to allow the IPad to run multiple programs at the same time, Apple is wary of having to install this feature on its most powerful mobile device by 2015. The multitasking in IOS 9 is divided into three representations, namely, a temporary pull-up overlay (Slide over), a picture-in-pip mode for video playback, and a real split view with two apps at the same time. Only the latest ipad Air 2 in a device that can now run IOS 9 supports split view, but it is believed that as the device is updated, the use of segmented views is likely to become a mainstream way for people to use the ipad on a daily basis, so early preparation is a required lesson for Developers.</p></p><p><p>While it's very complicated to look at the first glance to support a multi-tasking view, it's easy to actually keep up with Apple's pace the previous year. Apps that swipe to overlay and split views use the Compact Width and Regular Height settings in the Size Class introduced by IOS 8, with AutoLayout for Layout. That said, if your app was previously generic to the IPhone and iPad, and you've already used the Size Class for layout, basically you don't need to do anything extra to support the multi-tasking view of IOS 9. But if you're not yet using these technologies, you may need to move to this layout as soon as possible to be perfectly supportive.</p></p><p><p>The PIP mode of the video app is relatively simple, and if you use Avplayerviewcontroller or Avplayerlayer to play the video, then nothing is Supported. But if your previous choice is MPMoviePlayerController or mpmovieplayerviewcontroller, you may also need to move to the Avkit framework this morning because Media Player will be labeled in IOS 9 Recorded as deprecated and no longer maintained.</p></p><p><p>WatchOS 2</p></p><p><p>In the new WatchOS 2, the Watch App architecture has changed dramatically. The extension of the watch App in the new system will not be present in the iPhone, but will be installed directly into the watch, with Apple watch evolving from a simple interface display to a device that can execute developer Code. Thanks to this, developers can also access information such as the digital crown and (though all are just rudimentary access, but better than Nothing) heartbeat counts in Extension. Despite the progress, Apple's attitude toward the WatchOS 2 is still very cautious, which may have a lot to do with the device limitations of the first generation of Apple Watch, so the amount of power and performance space that is actually left to app developers is not very wide. But being able to run away from the IPhone is a great step in itself, compared to the current watchkit. And in order to communicate with the iPhone, now also added watchconnectivity this new Framework. There are plenty of reasons to expect Apple Watch and WatchKit to perform in the next two or three Years.</p></p><p><p>UI Test</p></p><p><p>In the field of development, testing has always been the key to ensure product Quality. Since Xcode 4, testing has been a growing place in app Development. From the introduction of the XCT framework, to testing target as the default when creating new projects, to the asynchronous code tests and performance tests that were added last Year. It can be said that Xcode's own test framework has been able to meet the needs of most unit testing.</p></p><p><p>But That's not enough. Developing an IOS app has always been a more UI and user experience, and simple unit testing makes it easy to ensure that the model layer is correct, but it's hard to make a difference in the Ui. How to write UI tests for an app has always been one of the Cocoa Community's Challenges. The previous words were like kif,automating, or even the fbsnapshottestcase of this kind of brain hole big open Plan. This year Apple has given a more enticing option, which is a series of tools from the xcuitest that Xcode brings.</p></p><p><p>Like most of the existing UI test tools, Xcui uses the accessibility tag to determine the view, but because it's Apple's home, it automatically records your process, so you just need to write the final verification section, which is much more convenient than the other UI testing Tools.</p></p><p><p>Swift 2</p></p><p><p>Swift has improved and progressed over the past year and is now well-established as an app Developer. I have also used Swift as the main language of daily work for more than half a year, the overall feeling of the six months is more comfortable writing. The main changes in Swift 2 are the error handling changes that Apple has changed from Cocoa's traditional nserror-based error handling to the exception handling mechanism for throw Catch. This transition does make the program more secure, and the new ErrorType also makes it a good way to unify the error Description. But after two days of actual contact, the grammatical feeling is more than the original processing of the written Code. It may have been the habit of using nserror for a long time, and I have not been able to fully accept the exception mechanism in Swift 2. But this time Apple is doing a relatively aggressive job of replacing the error in the Cocoa API with a throw. So regardless of the reluctance, the transition to exception handling is what Swift developers have to Face.</p></p><p><p>In addition, Apple has added some control-flow keywords such as guard and defer, which are also useful in some other languages, making Swift's writing more streamlined and more fluid to READ. To address the availability of different SDKs at run time, Apple has also added avaliable blocks to Swift 2, which previously required us to remember the usability of the API and do this by checking the system version and comparing it. Now with avaliable detection, the compiler will check for API calls that may appear to be version mismatches, and the security of app development is further Safeguarded. To make the SDK more suitable for Swift's grammatical habits, Apple has finally introduced generics in OBJECTIVE-C. This appears to be a objective-c enhancement, but in fact it is actually a way for Swift unified Apple to Develop. With the Objective-c generics, the swift access to the Cocoa API is basically no longer anyobject type, which makes Swift's security feature a step further.</p></p><p><p>finally, the Swift 2 open source Message. Swift's compilers and standard libraries will open up at the end of the year and may not be a big change for general app developers, but it does mean that Swift will transform from a dedicated language made by an app into a common language. The easiest thing to think about is the Back-end development based on swift, and perhaps we'll feel the power of Swift's full stack before we see Javascript eminence?</p></p><p><p>APP thinning</p></p><p><p>I work in japan, because this way everyone traffic is monthly and overflow, so basically no one on the size of the app mind, is nothing more than download 5 seconds or 10 seconds difference. But in the exchange with domestic counterparts, found that domestic app development on the size of the requirements of nearly Harsh. Because the IOS app is compatible for back-up, it now includes both the two-bit and A-bit slice. In addition, in the image resources, it is 1x 2x 3x of images readily (well, now 1x should not be needed). When users use the app, they only need one set of resources because the device is SPECIFIC. But now when you buy and download it, you download the entire app Package.</p></p><p><p>Apple finally realizes how silly this is, and IOS 9 is finally ready to download only what you need (slicing). This is great for users, as they only need to upgrade to IOS 9, which can save a lot of traffic. For developers, there is not much to do, just use asset catalog to manage the footage tag 2x 3x.</p></p><p><p>Another way to slim the App is to submit bitcode to Apple instead of the final binary. Bitcode is the median of LLVM, and when the compiler updates, Apple can optimize it with the bitcode you submitted earlier, so you don't have to submit your app again after the compiler updates, and you'll enjoy the benefits of compiler Improvements. Bitcode support is turned on by default in new projects, and you don't need to turn it off intentionally for no particular reason.</p></p><p><p>finally, the resources are loaded on demand. This may be more in the game than in the application Scenario. You can use tags to organize resources such as images or sounds, such as marking them as level1,level2. Then just download the Level1 content at the beginning and download the Level2 during the Game. Or you can use this to postpone downloading the resource files that need to be purchased in order to get Them. This is a very common optimization method in some large-scale games and is now easy to use in IOS 9.</p></p><p><p>AI and search API</p></p><p><p>If there is anything left for me to impress on this WWDC Keynote, I will vote for a more intelligent mobile phone Assistant. While it looks very rudimentary, like playing your favorite music when inserting headphones, recommending people you might be contacting and opening apps, and so on, this is a really meaningful step. Now Siri is just a question-and-answer system, and if the context breaks, she doesn't even remember what the previous two words say. A secretary who doesn't remember Boss habits must not be a good nurse, and Apple is getting the iPhone to work on it. The good news is that we probably don't have to worry about a machine that intentionally doesn't pass Turing testing, so There's still a lot of room to play on Ai.</p></p><p><p>The search API essentially gives the app a more likely entry. Some users will use the search interface very frequently, which is a great opportunity to showcase your app and improve the opening Rate. This is an additional feature that is well worth doing if the app type is Appropriate.</p></p><p><p>Game related</p></p><p><p>Game apps are the easiest to cross-platform because the user experience on different mobile platforms does not have a gap, and now no one developer can ignore Android's share. That's why Apple's own SpriteKit and SceneKit have been a tepid game frame. Rather than being confined to the Apple platform, more developers Choose a cross-platform scenario like Unity or cocos2d-x. But this year, Apple has continued to strengthen its game development tool support, including the Gameplaykit framework for state machine maintenance and pathfinding, the Replaykit framework for recording and replaying game processes, and the model I/O framework for physical modeling.</p></p><p><p>These are in fact the Apple game development system supplemented by some of the game industry already mature algorithms and tools, for developers to save a lot of Time. For individual Developer-made games, Apple's tools offer a relatively low threshold and are easy to get started With. But now that most game development needs a cross-platform era, it is still necessary to see whether the Apple system will go on smoothly.</p></p><p><p>Other</p></p><p><p>Homekit,cloudkit,healthkit and so on assorted frame. If IOS only app, using CloudKit to do BaaS may be a good choice, but also face the risk of future cross-platform data difficult to Share. Several other frameworks professional relatively strong, most need to cooperate with hardware support, in fact, has always said that intelligent hardware is the next burst point, but at least now has not been able to burst the big sound, more but has entered into the cheap competition (hand ring What you understand), can only say look forward to these equipment follow-up performance bar.</p></p><p><p>finally, there is a benefit for a friend who is just getting started or is going to be involved in Apple Development. Now you can deploy apps to your device without having to join a paid developer program, which in the past requires you to add at least $99 a year to the developer program, which can be said to further reduce the threshold for Apple Development.</p></p><p><p>Summarize</p></p><p><p>As mentioned above, for developers, this year's WWDC is not as disruptive as 13 and 14, mostly in addition to existing features and enhancements to the development tool Chain. This year can be said to be a good opportunity for COCOA developers to precipitate their knowledge and improve their skills. Now the WWDC 15 is still in full swing. If you are planning to embrace the changes of the new SDK as soon as possible, don't hesitate to visit the Apple developer site to find and watch the topic you are interested IN.</p></p><p><p>WWDC summary: what developers need to know about iOS 9 SDK new features</p></p></span>

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.