Slide 1

Slide 1 text

Petro Korienev iOS Engineer What’s new in WatchOS 2. Three different ways of iphone-watch interconnectivity

Slide 2

Slide 2 text

The task Well, go grab some data from a backend Сache it Show inside UITableView And we need a Watch App!

Slide 3

Slide 3 text

Watch app?

Slide 4

Slide 4 text

Well, let’s go step by step 1. Create XCode project 2. Setup backend (import.io) 3. Create entity classes 4. Setup CoreData 5. AFNetworking 6. SDWebImage 7. UI 8. …

Slide 5

Slide 5 text

Recall WWDC videos and… 1. Setup Application groups 2. Add correct entitlements 3. Use containerURLForSecurityApplicationGroupIdentifier: 4. Save in host 5. Fetch in watch 6. Empty :( 7. Compare store URLs 8. Read the docs and facepalm

Slide 6

Slide 6 text

Read the docs more thoroughly..

Slide 7

Slide 7 text

So, what’s new? 1. Complications 2. WatchConnectivity 3. Much more API’s..

Slide 8

Slide 8 text

Complications Simple WatchFace customizations

Slide 9

Slide 9 text

Kinds of complications

Slide 10

Slide 10 text

How to:

Slide 11

Slide 11 text

WatchConnectivity (unpredictable on Simulator)

Slide 12

Slide 12 text

Just use network

Slide 13

Slide 13 text

Network self.sessionManager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:@"https://api.import.io"]]; [self.sessionManager GET:path parameters:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) { [[CoreDataManager sharedInstance] parseAndStorePage:weakSelf.currentPage withObjects:responseObject[@"results"]]; On watch

Slide 14

Slide 14 text

MMWormhole (OS 1 only) Listen Send

Slide 15

Slide 15 text

Links Project - https://github.com/soxjke/WatchOSEventTimeline Watch OS 2 transitioning guide - https://developer.apple.com/ library/watchos/documentation/General/Conceptual/ AppleWatch2TransitionGuide/index.html#//apple_ref/doc/uid/ TP40015234-CH2-SW1 import.io - https://www.import.io

Slide 16

Slide 16 text

THANK YOU FOR YOUR ATTENTION! Questions time!