pricerest.blogg.se

Wwdc 2015 video
Wwdc 2015 video





wwdc 2015 video

Work his way through the pairing, setting these devices up. So at that point you might as well stop doing any Watch-specific work.īut the user will go out and buy a new Watch, and he will go through the pairing process.

wwdc 2015 video

Next, it will want to check, is this device paired with a Watch? If it's not paired, then it's almost as if this is running on an iPad, there's nothing more to do. Something that pulls down the most recent interesting articles.Īnd it's going to first go through the setup process that we just discussed. So for this example, we will use a news app. So you don't need to use this in your Watch app, and they are mostly not available. It's informing the iOS app what its relationship with the Watch is. So these properties are only available on the iPhone app. This will inform your app about what the current relationship between the iOS app and the Watch is. The next thing is you are going to want to do, once you completed that step, is look at the session states. So make sure you do these steps up front. There might be content waiting to be delivered to your app. That's another reason why you want to do this very early and always. This will go and set up the WCSession object, initialize all the properties, and once this call returns, all the properties will be updated with the correct initialization values.Īnd also at this point, any delegate callbacks, any cued-up content can start coming in. And then you want to set a delegate on the session object, and then finally you want to call Activate. The next thing you want to do is create an instance of our object, and you do that by calling Default Session. So check this up front before you do any Watch-specific work because we don't want you to waste a bunch of CPU doing work that won't be used anywhere.

Wwdc 2015 video code#

Which means this code may be executing on an iPad, where WatchConnectivity is not available. So the first thing you want to do in your iOS app is you will check to see if the WCSession is supported. So, don't put it inside, like, a view controller's View Did Load, because when you're being launched in the background, those won't get called. You want to make sure you do this setup in a code path that will be executed even if you are being background launched. We recommend that you set this up very early in your app's life cycle on both sides, both on the WatchKit extension, running on the Watch and in your iOS 9 apps. The first thing you want to do when you are starting to adopt WatchConnectivity is you want to go through the setup.

wwdc 2015 video

There are couple of iPhone-specific APIs that we will get into. It's available in both platforms, and pretty much all of the APIs are available in both sides. So this is the new framework we introduced in watchOS 2 and iOS 9. So let's get started with discussing WatchConnectivity. You can see there's a wide range here, and we hope that every one of you will be able to identify with at least one of these. This is exemplified by the amount of examples that we will be using in our presentation today. We think the topics we are going to discuss today apply to most Watch apps, and we think it's going to apply to most of you. These are still available to your WatchKit extension, and it's now available native on watchOS 2. There's the new WatchConnectivity framework, which we are introducing in watchOS 2 and iOS 9.Īnd then there's the NSURLSession APIs available in Foundation. So we are going to show you two main ways to deal with this problem, of getting the data to the Watch. The obvious next question is going to be: How do we get data over to the Apple Watch? That's what we will discuss today.

wwdc 2015 video

This has a lot of benefits, but it also means they now each have their own data store. In watchOS 2, we've moved the WatchKit extension over to the Watch, and now your app is running natively on the Watch. Your iOS app and your WatchKit extension were both living on the iPhone, and we were taking care of the communication to the WatchKit app, and they could both share a data store. To do a brief recap of where we are coming from, let's look at what the world looked like in watchOS 1. We think what we are going to talk about today is going to help you make more responsive and better user experiences for your Watch apps. We are excited to show you what we have been working on for both watchOS 2 and iOS 9. Today I'm joined by my coworker Alex, who will join me on stage later. Welcome to Introducing WatchConnectivity.







Wwdc 2015 video