 How many of you have played with the existing WatchKit so far? Or at least have built some apps? So I'll give an introduction of what the current WatchKit does. Then I can jump what's new in WatchOS. Obviously there are a lot of new stuff. I can't cover everything. But we'll see the highlights and what it means to kind of build a Watch app. And soon you build a Watch app and if you build a Watch app, what kind of apps you'll build. So I mean we have been doing this meetup for four years. But recently we moved to Meetup.com so I see a lot of new faces. Those of you who haven't met me before, my name is Subh and I basically organize this meetup. And so you'll see me speaking every now and then. I usually try to advise it or some other speakers from the community. I currently work in PayPal. I lead the wearable steam in PayPal. Outside of my day job I write for reyventilis.com. If you have been building iOS apps for few years, you probably have bumped into one or two articles from reyventilis.com. So let's see how we basically build a Watch app and what's kind of the architecture of a Watch app. Let me quickly build an app in export 6. Then I can show you what's the difference in export 7. So it's like creating any new project. You create a new project and just create a single view project. Those of you who haven't been using Swift, you should use Swift now. This is the time you should learn Swift. Objective C is going to go away in a couple of years. Too bad for you who are sticking to Objective C. This is a normal single view-based app. To create a Watch app, the only thing you need to do is create a new target for those extensions. In your project here, you just click and select Apple Watch. With the existing version, it won't allow you to change the name. It will automatically pick up a name for you and you click Finish. So what it did is it created two different things. One is the Watch app itself and another one is the Watch extension. If you see the Watch app basically has a storyboard. This is where you create your user interface. It's basically dragging and dropping stuff. The main thing is the interface controller. You can drag and label. There is an extension which is basically your controller's stained extension. Now the previous version of Watch. What happened is your Watch app runs on the Watch. The extension runs on your phone. The code of the extension runs on your phone along with your iPhone app. Obviously you need to have an iPhone app for all the Watch apps that you are going to write. You can't have an Watch app without an iPhone app. The same for the new version as well. I will take what's the difference. The extension runs on your phone and the app itself runs on the Watch. Now what happens is because they are communicating through Bluetooth and there are a bunch of inputs that Apple provides and they still don't have for the new OS. Things like keyboard. You probably won't need a keyboard. But let's say you are building a calculator app. Basically you need a calculator. Which is probably a bad idea to build on a Watch app. But let's say you are building a calculator app. There is no keyboard provided by Apple for the Watch kit. I was experimenting with a few ideas earlier. For one of the ideas I needed is some kind of input method. There are voice commands and you can speak with Siri. You can do all those things. You can have buttons. You can tap buttons. But for calculator the solution that we came up with is a button. Basically you have 1, 2, 9 or whatever buttons. You have buttons for plus, minus, whatever. The buttons might look tiny. But the thing is that when you tap a button it goes to your phone, it executes the code, it comes back to your watch and it updates the label. Now it's not very responsive. If you run on a simulator it might look instant. You can build it and run it on the actual watch. There is a lag behind it. You want to calculate quickly 100 plus 100. You probably want to wait 5 seconds for that too. Just calculate 100 plus 100. That's a really big problem that the first version of the Watch kit had. But let's run this. Because we just built a Hello World app on Watch. Let's see how it looks. Because I have 6 and 7 running. But this is the iPhone app. This doesn't have anything. And the Watch app, you need to... Sir, maybe you have to go down on the packet. But which one do you play? So, especially when you select, right? The default one is the phone one. Then you have at least one. If you select notifications, if your app needs notifications, it will have notifications. But remember when I created the target, it asked me whether I want a notification or not. If you don't want a notification, you can disable it. And there are basically 3 ways to present your content in an Apple Watch. One is the app itself. There is notification. And there is glance. Glance is what you see from the bottom. Let's say you are running and you want to quickly... So, if I just drag from bottom, I can see different glances here. So, those are the glances that quickly present some information to your users. But I am going to run the Watch app. And by default, the previous version, the Watch is not displayed. So, it's a select external display. From the simulator, you go to the hardware external display and you select the Watch display, either 38 or 42. And you run again. That's how you basically present an app. There are various guidelines here. I can't cover all of them. But you need to know that unlike iPhone, this is a different set of components. You need to deal with them separately. For example, on iPhone, you can overlap views on top of each other. You can't overlap things up here. This is a flow-based layout they follow. So, if I, let's say, drag another label, I can't overlap here. I can put either on top or bottom. If you want to put on the side, you need to use something called group, which is here. You can use group. You can use a group and then, let's say, put two labels here. If you select the group and just change the layout from horizontal to group, group needs to be horizontal. Then it comes side by side. So, that's how we put contents side by side on the existing one. But let's say, what's the difference? What's the difference with the new ones? Now, a bunch of these articles are opened here. Let me see. So, if you see, this is what I was talking about. WatchOS 1, you had this. You had your extension running on the iPhone. Now, the biggest difference is on WatchOS 2, which is coming up still in beta, the extension runs on the watch itself. So, it makes things like this calculator app more responsive. You can do things whatever you want to do and it runs on your watch. You can basically, which means you can have some apps that doesn't require the iPhone. You can go for a running app or whatever. You can capture data, you can store this data literally on the watch. And you can later sync when it's connected to the iPhone. Now, this is the biggest difference on the WatchOS 2 from the architecture point of view. A bunch of new things. Let's see what they have covered on WatchOS. But before that, I'll show you a video of a hackathon that I went to right after attending the conference, the WWDC conference. And this is an app we built in like three, four hours. So, basically, let me talk about the app a little bit. This is a micro-donation app, which is like you have an app on your wrist and you are concerned about different causes of, let's say, saving people's life or whatever. We named the app, Smile. But basically, whenever somebody needs some money, there are a lot of donation apps or this campaign app out there where you donate certain money for a cancer patient or something. But those are generally people contribute like $100 or $50 or whatever they're capable of. But sometimes some people need some urgent money. Let's say there is an operation that's happening next week and you need to raise some $1,000 or $2,000 within one week's time. So, the moment you raise this campaign, let's say on a portal, immediately it will broadcast as a notification to all ages who have installed this app. And you can choose to donate $1, $2, $5 or whatever. You want to donate and you can have your own threshold. Let's say you want to donate less, maximum up to $20 or $50 a month. And once you raise the threshold, then we won't send you a notification. Let's start with notification, basically. And you basically can tap their donate one and it should be done. You don't need to open the app. These are all actionable notifications. Notification is a great use case or great feature of Apple Watch. All the apps that are there on the Watch existing app, they are pretty useless. Apart from few. But notification is something that's really useful. And basically if you can provide targeted notification to your users, something that matters to them, then you can probably capture their interest and they will do something. There are apps which are trying to literally port their iPhone app into the Watch app. Then those apps are never going to work. And they will probably install them and probably delete them after a few days. But those apps are really probably a bad use case for an Apple Watch. Okay, so you basically tap there and that's done. You get a confirmation that $1 is paid. Otherwise you can go to the app. You click on donate and this is where the digital crown API comes in. You can use the digital crown to change the amount. And you will see some kind of animations are there as well. The first version of the Watch kit, to use animations, you needed to use a sequence of images like GIF. You are creating GIF images. You need to use a sequence of images to create animations. Whereas you can do some animations here. Like scaling, changing color and all those things. Just using groups. But then this rely on a concept that you have different quotes here on this page. Which are hidden at this moment. Which basically have height 1 or 0. And when I do or tap on something, I display other things. Then this tells you how many people you have contributed to or donated money for. So this is about the app itself. But with WatchOS 2, you can also do this thing called complications. Which are basically ways to add custom components to your watch page. The first version did allow you that. So you can create your custom complications on the watch page. If you see what I mean. Now I can see user can select my complications. User has selected my complications. Then I can update user. Let's say the user is caring about this cause. And wants to know how much money this particular campaign has raised over a period of time. And as you... They have this thing called time travel. Travel back and forth in time. And you can see how much money this person has raised over a period of time. If you see the amount is kind of changing. And there are different kinds of complications you can use. And depending on the clock phase. Over here is the normal analog clock is there. You can see a complication on the top left corner that the amount is also changing. So complication is another big feature of watchOS. You have basically... So this was my team. And this guy I think he used to work for Win Trist. Or he's still working. And he's a guy from CMU. So this was my team and we built this app together. And one of the guy in the hackathon is this guy. If you see him. He basically have been building this sampler app for iOS 7 and iOS 8. And look into the number of stars that people have given him. He built this watchOS sampler which is a great place to start looking into some of the sample ports. Rather than going to documents you can literally find more information. So let's see what more is there in the watchOS. You have access to core motion now. You can get the gyroscope, accelerometer data. You can get even parameter data. And you can use them as you want on your app. One of the very clever use case of core motion I saw in the hackathon. There was one guy who built a drummer app. That's basically you move your hand and it will create music as you move your hand depending on different gestures. And how much you are moving on what direction. That's a very, very interesting use case. Let's say you are wearing two apples in two ways and you can literally create music just by moving your hand. You can have access to healthcare data. You can now play audio or video with the watchOS too. So for audio you can play full podcast. For video I think they have certain restriction how much, how long video you should play. I think I can't remember the duration but it's very short. So usually you should use video to display some meaningful content. You shouldn't play a movie. You shouldn't have like a 2 GB movie on your Apple Watch. Nobody is going to watch that. Then this is picker style. Picker style is for the digital crown. Later I will show you some more examples of different pickers that are there. Then you can have access to the tactics engine which is basically a vibration. The different way the watch vibrates giving some certain kind of feedback to users. And it has different sounds also. So it's like there are some other sounds you can give. There are some confirmation sounds you can give. Let's say you have a running app and based on when the user hits certain goal you can play a different, you can use a different haptic. The picker and digital crown they kind of work together. Things like you can now run or make a network call from the watch app itself. So once your iPhone is connected to a Wi-Fi, your watch can connect to that Wi-Fi even though the iPhone is not within the range. So you can make literally NSC civilization call from the watch. But then they suggest that you shouldn't use it that much otherwise it will drain the battery. You should download like a hundred and your file from somewhere. But for meaningful updates you can use NSC civilization on the watch itself. If it makes sense for your user to download certain smaller contents on the app watch. Let's see the crown example. So if you see the storyboard. So basically there is this new component called picker which is something similar to your UI picker view on iOS. But there are different styles that you can choose and different way how you can fit data to this picker. There is a list style and there is a sequential style and there is a stack style. Let's see how they look like. So let me choose like 42mm. So this is a list view where you can kind of use the digital crown to browse through a different list. It can be text, it can be emoji, it can be whatever you want, it can be background color. And you can have some kind of guidelines or caption for you just depending on what has been selected. For here if you see I have a label that gets updated when I select an item. And this is what I am using a page based kind of controller. Sequential is generally I am using it wrongly here. Sequential is literally being used for sequence of emojis. When you see apple emojis different sequence of emojis. So when I have seen the videos. But again if you have a sequence of image you can kind of use the sequential to just use the digital crown. Present user different contents. Stack again this is what I created the demo during the conference. I did it completely wrongly. You should use stack in full screen. These are meant for photos. And as you scroll through this will a new photo will appear. Especially you should use it in full screen. I think I didn't have the full image. Or maybe I should use this. But I think the image size is still small. So if it is even more if it is occupying even more space then it will look nicer than the kind of effect. So this is the digital crown if you have. The complications that I was telling. Let me run the other app. For complications itself you can select what kind of families you want to support. There are different kind of watch face and each of them have different styles. Some of them have two line of text. Some of them have round complication. Some of them have a smaller text. We will see those in a while. But this is an analog clock. Anything that is not part of the clock itself are basically modifiable and can be changed into complication. For example, so I can modify these things. So these are all complications that I can modify and I can select my custom complication. For example, over here I think I should have my complication that we created. So this is for the smile app that we have used. So I have this thing now in the watch face. The control is always used. You can select what complications make sense to them. And as I go back in time travel and you can see this complication data being changed. For complications you provide a set of data. You can have a beginning and you can have an ending. So basically whenever the data is not available it can be grayed out and it won't be displayed. For example, there is a match going on and you want to update the user about the scores. And only for the duration of the match it might matter for you to list the score. And when the match is over it can be grayed out. So similarly depending on the use case you can provide a time range for which user can see the complication. For example, if you have an airline app you won't want to update the user about the boarding gate. So if the user can see the boarding gate whatever is there right when they look into the watch face. For this one the advantage is the user doesn't need to tap anything. It just needs to look into the watch face and then they see something. For example, if I go back to the other one. Now this one has some more types that I can use. Some of them will have some images, some of them will have some text. I can modify here. If I go in the time travel mode I can see the amount changed. And users can find this information. Let me see if I am missing anything. One of the issues that I faced was installing the OS itself. It was the first week and then I had to basically give my Apple OS to Apple Store because it didn't boot up after installing the beta OS. But I think this has been fixed in iOS 9 beta 2. So you basically need to install the configuration file. You need to download this configuration file and email it to you or something. Or download this configuration file on your iPhone which is running iOS 9 beta 2 at least. And then you can install the configuration file to your Apple Watch. Not to the iPhone. You need to install the configuration file to your Apple Watch. Then after that you will be able to update to watchOS 2. But once you upgrade there is no going back. So I think within version 2 you can go back to a different version of watchOS 2. But so far nobody has figured out how to go back to watchOS 1 from watchOS 2. Let me show you an app that I am using regularly now. And there are a couple of apps that I use regularly. There are notifications obviously which are kind of interesting. It is Connecting Connect again. So one of the app that I was using on iPhone is an app called Knock. Basically double tap on your phone to unlock the Mac. Now with watchOS hopefully it works. I can unlock the Mac. Okay let's do it again. Let's slightly move. Thanks a lot. Usually you don't need to tap so many times because otherwise it doesn't make sense. And you unlock using just your watch. Now within the proximity it detects from the Bluetooth and you can just tap a button and you can unlock the Mac. Now you can have your password like 128 digit password and you don't need to remember that. Any questions from you guys? So the data you need to have in the extension. Let me show you the app itself. So basically you have this complication controller which is part of the extension. You can download a JSON file from network but that data needs to... You shouldn't download when the user is calling the ground. You should have the data. For this use case what we have is we just hard-coded this data. If you see there are literally date points with a label. So it's basically a JSON. It needs to be a JSON format. But you have a key value mapping with a particular date and time with somewhere that you want to display. And then you basically show in the complication, depending on what complication family you are supporting. You can display that next. But this data needs to... Usually what you need to have is you download the data, store it somewhere local in the file system. And then phase it as needed by the code choice. And the offline functionality that we mentioned. When the iPhone is not around you. So even the saving of some future data in which I want to see back to the phone. You can have it in the extension. You can save it in the extension. Because the extension is now running on the watch. You can... But little thing about this is say... Watch you shouldn't build a very complicated app. You shouldn't store code data for example on watch. You shouldn't have a database on the watch. You probably need to have a JSON file where you store minimum data. Or a file system where you store. But you can literally... I think you can have a code data on the watch. I need to check though. But I think you can also have code data. But I think you say overkill this. You shouldn't have a code data on the watch. Some file system, some JSON. For example for the app itself. The conference app, WWDC app. They had an Apple Watch app. So the main app displays all the details of the... You know talks, right? Whatever talks and you can see the slides. You can download the videos and everything. Whereas on the watch app you can see what are the talks that are happening today. It's like you don't need to see even for the week. You can see it was... There's a stripped down portion of all the data that's available. But yeah, if you have a developer license go and explore this. The videos are really nice. You can watch all the... There's something called watch connectivity which basically is being used to save data between the watch and the iPhone app. But other than that, Clockkit which is basically for complications that's the major thing. Digital crowd may pay this, another major thing. And code motion is there. Animation is there. Yeah. You will see a lot of interesting apps. So watch connectivity. She has the same data with her phone? You can save certain data with your phone and using the watch connectivity. And then there's another way you can do a handoff. It's basically if you want you have to do certain thing on the iPhone instead of the watch, you can use the handoff API. So it's basically user is doing something here and the moment user unlocks, it will go to specific screen of the app. So it's basically you can use the handoff. Watch connectivity actually, I haven't personally explored that much, but I know it's been used to save data between the phone and the watch. So the watch connectivity, is that something kind of Apple built in the release of the MMORPOOL library? I'm not sure, I haven't used MMORPOOL. And I haven't actually explored the watch connectivity a lot also. But yeah, those are the main updates. You can download the sample app. So what you mentioned, the extension, right? So it just looks like any other extension, like this extension. You can think of it like that. You can think of it like that. So the MMORPOOL is for which key? The first version or is for? No, just search is MMORPOOL. So I come across this big one. I need to do something with my extension. The extension needs to talk to my main app and do some manipulation. So yeah, this library does something like save notification towards the app zone and use that watch to control your app. I think I saw something similar that was using the peer-to-peer connectivity. I'm not sure if it builds using something like this, whether the app will be proper or not. But you have officially now connectivity which can do this stuff. So maybe this library of God cannot be replaced for the app, which is the source. If nothing else, I would like to invite you guys if you have anything to share any new apps that you have built that you want to quickly showcase and just go and come forward and give a short presentation. And get feedback of your apps that you're building. So Deep is going to say something. Okay. Anyone else? We can talk a little more regarding the conference. Yeah, so the conference, I think from... From your website? Well, this will be... This, I was called for SG, but I need to do a lot more here. This is still not... The website is not updated, but iOS content is the website. But if you know iOS Dev Scout Facebook group, this is where most of our very activities happen. Either you add a new work extension to your password. So, those of you who came from the meetup.com, this is where our regular interaction happens. You should join the group and we have like how many, I don't know, 3,000 people now? Yeah, 2795. And all the discussions are purely related to iOS. We kick out people who post random stuffs. And this is where I'll basically announce the conference. I think in maybe three, four days, I'm just sorting out a few final things. A lot of guys are helping me. A bunch of guys from the community are helping me. But yeah, I think the conference will be super interesting. The guy I was talking about, Javier, I'm not sure if you're following his Twitter. He speaks at Swift Summit. He spoke last year. And he's speaking this year as well. So, he previously worked at Payable. He's now the favorite team of Twitter. So, if you use Fabric or Crashlytics, you know probably about Fabric. So, he's one of the main speakers. And he built a watch. It's like a chase game program. But he will be speaking about Swift in the conference. There is a few other guys. I can't find their name now. But the other guy who is from Dropbox he used to previously work at Spotify. So, guys who really have worked in a lot of different popular apps. I might speak something related to wearables if I find some time to prepare for a talk. But yeah, look out for the dates and the announcement. What was the date? 24th of October. That's a Saturday. October. It's like three months from October? Yeah. When are you going to prepare? When you are still finalizing. It's either to be held... We're trying for anyways in the School of Computing or ISS. But we still need to get confirmation. Because these guys can't fit like 150. We are planning for 150. Otherwise, the alternative would be the Paypal office. But the Paypal office is also... I don't think it can fit 150. If it happens in Paypal, we might need to reduce the number of patents. If you know the questions, then thank you all for coming. I'll be here for the next 10-15 minutes if you have any questions for me. Feel free to ask. If you have any questions related to filters, feel free to ask ISIS. And we'll be around for a few minutes. Thank you all.