DevBy. Apple Watch Kit 1.0 (RU) & NFC

28
WatchKit + NFC Dmitriy Groschovskiy Senior Software Engineer Vladimir Hudnitsky Senior Software Engineer

Transcript of DevBy. Apple Watch Kit 1.0 (RU) & NFC

Page 1: DevBy. Apple Watch Kit 1.0 (RU) & NFC

WatchKit + NFCDmitriy GroschovskiySenior Software Engineer

Vladimir HudnitskySenior Software Engineer

Page 2: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Apple Watch, what is that?Is a computerized wristwatch with functionality that is enhanced beyond timekeeping. While early models can perform basic tasks, such as calculations, translations, and game-playing, modern smartwatches are effectively wearable computers.

Work hard, play hard on Watch OS (iOS-based)

Page 3: DevBy. Apple Watch Kit 1.0 (RU) & NFC

SiP• NAND - 4 GB• RAM - 512 MB• Wi-Fi 802.11b/g• Bluetooth 4.0 +

HS• NFC

Page 4: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Apple iPhone pair with Watch

๏ Bluetooth 4.0 + HS & FM๏ Wi-Fi 802.11 b/g pair

Page 5: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Input Methods• Digital crown• Multi-touch• Force touch• Microphone

Page 6: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Output Methods

• Speaker• Vibration• Display

Page 7: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Sensors in Watches• Sensors Accelerometer• Gyroscope• Heart rate sensor• Barometer• Walk-meter (via your iPhone)

Page 8: DevBy. Apple Watch Kit 1.0 (RU) & NFC

NFC - Near Field Connection

• Совершение платежей• Загрузка Passbook• Открытия Apple MFi замков

Page 9: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Технология зарядки часов

• Для зарядки часов используется коннектор Apple’s MagSafe® с магнитом для прилипания к часам

Page 10: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Using ResearchKit at Apple Watch

Page 11: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Hierarchical view

Page 12: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Page-based view

Page 13: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Template images that you can use for menus

• WKMenuItemIconAccept , // checkmark

• WKMenuItemIconAdd , // '+'• WKMenuItemIconBlock , // circle

w/ slash • WKMenuItemIconDecline , // 'x'• WKMenuItemIconInfo , // 'i'• WKMenuItemIconMaybe , // '?'• WKMenuItemIconMore , // '...'• WKMenuItemIconMute , //

speaker w/ slash

• WKMenuItemIconPause , // pause button • WKMenuItemIconPlay , // play button • WKMenuItemIconRepeat , // looping

arrows • WKMenuItemIconResume , // circular

arrow • WKMenuItemIconShare , // share icon • WKMenuItemIconShuffle , // swapped

arrows • WKMenuItemIconSpeaker , // speaker

icon • WKMenuItemIconTrash , // trash icon

Page 14: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Menu Images

Page 15: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Internationalizing Your Text Code

• Use the NSLocalizedString family of macros to retrieve localized strings programmatically.

• Use the NSNumberFormatter class to format numerical values using the user’s region and locale settings.

• Use the NSDateFormatter class to format dates using the user’s region and locale settings.

Page 16: DevBy. Apple Watch Kit 1.0 (RU) & NFC

UI Design at default app’s

Page 17: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Development time

Page 18: DevBy. Apple Watch Kit 1.0 (RU) & NFC

WatchKit App Architecture

Page 19: DevBy. Apple Watch Kit 1.0 (RU) & NFC

WatchKit App Architecture

Page 20: DevBy. Apple Watch Kit 1.0 (RU) & NFC

App Target Structure

Page 21: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Launching a WatchKit app

Page 22: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Communicate with iOS App

• InterfaceController.openParentApplication(["getProgress": "1"], reply: {(response, error) -> Void in

• func application(application: UIApplication!, handleWatchKitExtensionRequest userInfo: [NSObject : AnyObject]!, reply: (([NSObject : AnyObject]!) -> Void)!)

Page 23: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Configuring the dynamic notification

Page 24: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Difference between static and dynamics notifications

Page 25: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Configuring the dynamic notification interface

Page 26: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Glance• Design your glance to convey information quickly• Focus on the most important data• Do not include interactive controls in your glance interface.• Avoid tables and maps in your glance interface• Be timely with the information you display• Use the system font for all text. Avoid custom fonts• App has only one glance interface controller

Page 27: DevBy. Apple Watch Kit 1.0 (RU) & NFC

Development Review

Page 28: DevBy. Apple Watch Kit 1.0 (RU) & NFC

About speakers

Dmitriy GroschovskiyE-Mail: [email protected]: https://fb.com/groschovskiy

LinkedIn: www.linkedin.com/pub/dmitriy-groschovskiy/7b/797/1/GitHub: github.com/groschovskiy

Vladimir HudnitskyE-Mail: [email protected]: https://fb.com/xputnikx

LinkedIn: www.linkedin.com/in/vladimirhudnitsky/ruGitHub: https://github.com/xPutnikx