stanfy madcode meetup#6: apple watch. first steps

85
1

Upload: stanfy

Post on 13-Jan-2017

278 views

Category:

Software


1 download

TRANSCRIPT

1

Apple WatchFirst Steps

2

Apple Watch

3

Apple WatchXcode 6.2+, iOS SDK 8.2

4

Apple Watch Users

5

Marketing

6

Developers

7

What do we need for

Apple Watch App?

8

What do we need for Apple Watch App?4 iPhone app

9

What do we need for Apple Watch App?4 iPhone app

4 Xcode

10

What do we need for Apple Watch App?4 iPhone app

4 Xcode

4 Good idea

11

What do we need for Apple Watch App?4 iPhone app

4 Xcode

4 Good idea

4 Apple Watch*

12

Three Main Parts of

Apple Watch Application

13

Notifications

Glances

The App14

Notifications

15

Notifications

16

Glances

17

The App

18

1

1 source (https://medium.com/mobile-design-and-ux/smartwatch-user-interaction-39601215a1b1).

19

Structure of Apple Watch Application

20

Application Structure

21

Application Structure

22

Application Structure

23

Restrictions24

What should you be aware of

25

Storyboards

26

Storyboards

27

2 Sizes

28

Static Layout*Write-only interface :)

29

Per frame Image based animations // I wonder if I can do like this [UIView animateWithDuration:5 completion:^{

}]

30

Per frame Image based animations

31

There's no such things as UItouchNo custom Gestures, Swipes,

Recognizers

32

No sensors API33

Limited text inputDictation API

34

Apple Watch SDK

Do your best!

35

Tasks To SolveHow do I ...

36

Tasks To Solve & Best Practicies

37

Tasks To Solve & Best Practicies4 Images

4 Lifecycle

4 Networking

4 Communication

4 Animations

4 Code reusage38

It's "slow"

39

It's "slow"

And you can make it even slower

40

Be careful with ImagessetImage:

setImageNamed:

41

Be careful with Images

42

Be careful with Images

43

Be careful with Images

44

Be careful with Images

45

You will forget, anyway

46

Be careful with Life Cycle

47

Be careful with Life CycleawakeWithContext:

willActivate:

willDeactivate:48

Network

49

Network

50

Network

51

Network

52

App and Extension Communication

53

App and Extension Communication

Who is in charge?

54

We can

55

We can not

56

Use shared groups for communication

57

Use shared groups for communicationhttps://github.com/mutualmobile/MMWormhole wormhole = MMWormhole(applicationGroupIdentifier: "my.ident") wormhole?.listenForMessageWithIdentifier("context") { ctx in

}

wormhole?.passMessageObject("Message", identifier: "ID")

58

MMWormhole4 Fast, reusable, any data

4 Notification based

4 App should notify about each change

4 WatchKit App should be running

4 openParentApp + MMWormhole

59

Handoff60

Handoff4 when we need somehting to be done in the app

4 When permisssions is about to be asked

61

Animations

62

Animations4 Designer task

4 Custom navigation (all in one)

4 2 devices, pixel perfect

4 hard to debug

4 static->static transitions

63

Animations4 There are tools for that

4 https://github.com/andydrizen/UIViewRecorder

64

Code reusage

65

DRY66

Code reusage4 Use View model from MVVM architecture

4 http://www.objc.io/issue-13/mvvm.html

4 http://techblog.thescore.com/2015/05/20/reducing-watchkit-traffic-with-view-models/

67

Code reusage

68

Code reusage

69

Speed it up

70

Speed it up4 Rethink your Watch App

71

Speed it up4 Rethink your Watch App

4 Dynamic vs static content

72

Speed it up4 Rethink your Watch App

4 Dynamic vs static content

4 Show content as fast as you can (use cache)

73

Speed it up4 Rethink your Watch App

4 Dynamic vs static content

4 Show content as fast as you can (use cache)

4 Show partial information if available (Static + Dynamic)

74

Ready to start?

75

Some notes before you start

76

Some notes before you start4 Think hard about best usage

77

Some notes before you start4 Think hard about best usage (twice)

78

Some notes before you start4 Think hard about best usage (twice)

4 It's different from iPhone (User is getting bored way faster)

79

Some notes before you start4 Think hard about best usage (twice)

4 It's different from iPhone (User is getting bored way faster)

4 Know your user

80

Run!

81

Links for Inspiration4 http://thinkapps.com/blog/development/5-new-things-learned-apple-watch-apps/

4 http://watchaware.com/watch-apps

4 https://realm.io/news/building-watchkit-apps-swift/

4 http://natashatherobot.com/

82

Thank you!It's questions time

83

Apple WatchFirst Steps

by Paul Taykalo, Stanfy# Stanfy MadCode Meetup 2015

84

85