WWDC15. Second day. Details

The material will be of interest primarily to developers for the iOS and Mac OS platforms, but perhaps everyone will like something here.
watchOS 2
The Watch App and WatchKit Extension code set now live in one place on the clock (before extension was on the phone and created a mountain of problems with this). And this is not an option, but an obligation. Such native watch applications have solid advantages: access to hardware (Digital Crown, microphone, speaker, accelerometer and others), battery life, lack of brakes and an “eternal spinner”, real-time operation. Nevertheless, the watch application is still required to be part of a full-fledged phone application, it cannot be distributed separately.
The connection between the phone and the watch is now implemented using the WatchConnectivity Framework. This is essentially a bus to which you can send messages with text or files to and fro. In addition to this method of receiving information, the watch can use all the functions of NSURLSession, that is, independently surf the Internet and download data. Even in the absence of a phone, this happens via WiFi.
Added setters for all settings (properties) of all interface elements of the clock. This means that now you can control the interface from the code and change it "on the fly", and not only during design development in the interface builder, as it was before. WatchKit now also has animations added using animateWithDuration . You can animate all the settings that appeared in the system. Compared to the image sequenc animation from watch OS 1, this is already something.

Our applications can duplicate interface events using the taptic engine . A whole range of different “moves” is available: Notification, Start, Stop, DirectionUp, DirectionDown, Click, Failure, Success.
The watch can now play videos . The Coub prototype for watches, which was announced six months ago, can now become a reality, not just a fairy tale.
In watchKit SDK added methods openSystemURL . Using them, third-party applications can make calls, send messages, etc., and all this without leaving the clock interface.
Watch keychain, which stores all the same passwords as on the phone, is automatically unlocked when the watch is on hand, and is locked when it is removed. This solves a whole heap of problems that we encountered when developing the application of My Beeline, you can sympathize .
The new ClockKit framework is made for the development of Complications - gadgets on the watch dial that display any data. Interestingly, the data from our complications is not requested individually, but by the timeline vector. Thanks to this, TimeTravel appears - the ability to spin the wheel and see what happened 3 hours ago or will be in 10 hours. Pretty cool feature.
Objective C and Swift
A migrator is already ready for the announced Swift 2, which will gently and accurately adjust projects for new designs. Promise that everything will happen automatically, and the Swift compiler such developer is it possible not to trust:
Playgrounds Swift Playgroundsgot a lot of opportunities that will allow you to create training materials on programming directly in them. This is support for markdown markup in comments (with pictures, highlighting and layout), multi-page projects, the ability to connect external libraries (which are even precompiled so that the playground does not slow down). The error handling mechanisms have been redone, autocomplete has been improved, APIs have been added to conveniently call new methods so that this in no way breaks on older OSs. In general, the language is developing quite actively, and all the better because it will soon be available in openSource.
At the same time, a lot of things have been added to objectiveC so that it is better combined with a swift and is convenient in itself.
For example, directives were added to combine swift optionals with traditional nil objects: nonnull (a property can never become a nil), nullable (can), null_resettable (such a property can be set to nil, but it will never return it, but will return it default value instead).
Added generics to all ObjC collections :
NSArray *array There is even a special __kindof keyword for designating collections that can store not only class objects, but also its subclasses (especially convenient for front-end frameworks):
NSArray <__kindof NSView*> *arrayiOS 9 and Xcode
In iOS, added the things that many were waiting for (or not really waiting for):
- The ability to change the blur radius and make effects like opening Spotlight
- Real-time blur and vibrancy rendering in storyboard
- Dividing the application interface into several storyboard with a link and transitions between them
- Record UI tests directly in Xcode interactively, code coverage calculation for XCTest tests
- Getting crash logs in Xcode directly from iTunesConnect and the ability to load them into the emulator in debug mode (!)
- The ability to enter text in push notifications (as done in SMS) of our applications, and this will also work on the clock
Many announcements at the conference have not yet been fully disclosed, but we will keep you posted. Stay tuned!
See also the overview report from the first day of the conference: WWDC15. The first day. Keynote
