watchOS 2 new API and Sample Code

3.2k views Asked by At

Is there any good link explaining about watchOS 2 new features and API?

I have tried few of the API, but I want to explore more.

Thank you

3

There are 3 answers

0
Seyed Parsa Neshaei On

You can find a lot of information in Apple developer portal. There are release notes, videos, guides, etc which you can access them by visiting this website:

https://developer.apple.com/watchos/pre-release/

WWDC15 videos may help you a lot in order to find info about watchOS 2. Visit this website for videos:

https://developer.apple.com/videos/wwdc/2015/

There are a lot of videos about watchOS 2, including Introducing WatchKit for watchOS 2 and a lot other videos.

0
atlwx On

Apple has excellent documentation and sample code available. Always start there first, but here are some initial thoughts from another excellent resource: http://www.raywenderlich.com/108415/watchkit-for-watchos-2

1
shu223 On

WWDC15 videos or Apple's documents are exactly helpful, however there are few buildable sample codes for the new features. Even the Apple's sample code, they are not enough (for example, WatchKit Catalog doesn't include examples of new UI components such as WKInterfacePicker so far).

So I created a open source repository which is a collection of sample codes for new features of watchOS 2.

https://github.com/shu223/watchOS-2-Sampler

This repository includes following examples:

  • Accelerometer
    • Access to Accelerometer data using CoreMotion.
  • Gyroscope
    • Access to Gyroscope data using CoreMotion.
  • Pedometer
    • Counting steps demo using CMPedometer.
  • Heart Rate
    • Access to Heart Rate data using HealthKit.
  • Table Animations
    • Insert and remove animations for WKInterfaceTable.
  • Animated Properties
    • Animate width/height and alignments.
  • Audio Rec & Play
    • Record and play audio.
  • Picker Styles
    • WKInterfacePicker styles catalog.
  • Taptic Engine
    • Access to the Taptic engine using playHaptic method.
  • Alert
    • Present an alert or action sheet.
  • Animation with Digital Crown
    • Coordinated Animations with WKInterfacePicker and Digital Crown.
  • Interactive Messaging
    • Sending message to phone and receiving from phone demo with WatchConnectivity.
  • Open System URL
    • Open Tel or SMS app using openSystemURL: method.
  • Audio File Player
    • Play an audio file with WKAudioFilePlayer.
  • Network Access
    • Get an image data from network using NSURLSession.