Giter Site home page Giter Site logo

watchos-2-sampler's Introduction

watchOS-2-Sampler

Language License Twitter

Code examples for new features of watchOS 2.

Requirements

  • Xcode 7
  • iOS 9 and watchOS 2

How to build

  • Change the "Team" setting on [General] for each target.
  • Enable HealthKit for the parent app and WatchKit extension target.
  • Enable App Groups for the Watch app and WatchKit extension target.
    • Edit "AudioRecAndPlayInterfaceController" with your group identifier.
  • Build & Run with Xcode 7

Contents

Animated Properties

Animate width/height, alpha and alignments.

Table Animations

Insert and remove animations for WKInterfaceTable.

Picker Styles

WKInterfacePicker styles catalog.

Taptic Engine

Access to the Taptic engine using playHaptic method.

Audio Rec & Play

Record and play audio.

Animation with Digital Crown

Coordinated Animations with WKInterfacePicker and Digital Crown.

Draw Paths (Updated by hoppenichu)

Draw paths with Core Graphics.

Gradations (Updated by hoppenichu)

Draw gradations with Core Graphics.

Heart Rate (Created by kitasuke)

Access to Heart Rate data using HealthKit.

Accelerometer

Access to Accelerometer data using CoreMotion.

Gyroscope (Not Available)

Access to Gyroscope data using CoreMotion.

These APIs are available, however CMMotionManager always returns false for gyroAvailable. So actually it's not available for now.

Device Motion (Not Available)

Access to DeviceMotion data using CoreMotion.

These APIs are available, however CMMotionManager always returns false for deviceMotionAvailable. So actually it's not available for now.

Pedometer

Counting steps demo using CMPedometer.

Alert

Present an alert or action sheet.

Interactive Messaging

Sending message to phone and receiving from phone demo with WatchConnectivity.

Audio File Player

Play an audio file with WKAudioFilePlayer.

Need to pair a Bluetooth headset on your Apple Watch.

Open System URL

Open Tel or SMS app using openSystemURL: method.

Network Access (Created by KAMEDAkyosuke)

Get an image data from network using NSURLSession.

Known Issues

  • Open System URL
    • Phone doesn't launch...
    • It's based on the Apple's document.
    • sms: works with same way. I have no idea why it doesn't work!

iOS-9-Sampler

You can check the examples for iOS 9 new features on iOS-9-Sampler!!

Author

Shuichi Tsutsumi

iOS freelancer in Japan. Welcome works from abroad!

Special Thanks

The icon is designed by Okazu.

watchos-2-sampler's People

Contributors

kitasuke avatar shu223 avatar spoonik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

watchos-2-sampler's Issues

Watch App hangs on load

This would be a pretty awesome sampler app... if I can get it to work. :)

Running XCode 7 beta 5. Followed the build instructions: updated teams, set up health kit, app groups and edited AudioRecAndPlayInterfaceController, and even went into the app's plist to update the WKCompanionAppBundleIdentifier (not in built instructions).

Unfortunately the watch app hangs when it's run. The iOS app runs fine, but can't reach the watch. Break points in the watch app's delegate don't break. I made a gif to demonstrate: http://cl.ly/image/140q2J2c0M3m

Would love some insight into what might be happening. Thanks!

Fail to use XCode to boot up the App on Watch Device

This app is installed on the device, but the device remains unresponsive to Xcode with a blank screen in a kinda inactive state.

I can manually open the app, this method is very unproductive on development mode.

FinishLauching

When I run watchOS2Sampler WatchKit app on iPhone6 + Apple Watch, The app crached and writes in the logs: "Extension [2153:56375] Extension received request to wake up for complication support applicationDidFinishLaunching"

Problem building app - App Groups entitlements

Hi, I'm very new to app building so a lot of this is confusing to me.

So far, I have successfully opened your repo in Xcode and I've replaced all the Identifiers to my own name.

When I try to build, it tries to fix this issue:
None of the valid provisioning profiles allowed the specified entitlements: com.apple.security.application-groups, com.apple.developer.healthkit.

but then it fails and says this:
"Communication with Apple failed"
"Your account does not have sufficient permissions to modify containers."

Can you please explain why this is, and what can i do to fix it?

I'm not paying for the Developer Program so I'm only a free account. Is this the problem? Does this mean I can't install anyone's example code on my device at all?

Appreciate any help you can give to a new Xcode user.

Thanks

Fails to build on device.

Hey! So I changed all the teams in all targets to mine, changed identifiers from com.shh.xxx.xxx to com.dv.xxx.xxx, Added app group entitlements to parent app and extension, changed that in Audio controller code.

But I'm getting this mysterious error.

error: WatchKit App doesn't contain any WatchKit Extensions whose WKAppBundleIdentifier matches "com.dv.sampler.watchos2.watchkitapp". Verify that the value of WKAppBundleIdentifier in your WatchKit Extension's Info.plist matches the value of CFBundleIdentifier in your WatchKit App's Info.plist.

I tried doing just what it wants, also renaming and any combinations of those. Nothing helps.
This is on Xcode 7 beta 4. Regards

I LOVE YOU

THIS ISNT AN ISSUE I JUST WANTED TO SAY THAT YOUR PROJECT IS SAVING MY LIFE!

Cannot select target to be iPhone6 + Apple Watch

After cloning the project from github and importing to xcode7, I can only select the target device to be either iOS device or iOS simulators. As a result only the phone extension app is being executed, and the watch app did not show up. Is there any way that I can choose to execute the native watch app only?

Thanks.

motionManager.gyroAvailable

I'm using Xcode 7 Beta 2 and watchOS 2 Beta 2, iPhone 6 Plus
For me, gyroAvailable and gyroActive is always false!

Error in Extension Info.plist when submitting to TestFlight / iTunesConnect

Has anyone able to submit a watch OS2 app using healthkit to Apple successfully? I keep running into this error:

ERROR ITMS-90362" :Invalid Info.plist value. The value for the key 'UIRequiredDeviceCapabilities' in bundle {bundle name} is invalid. Expecting array with a single string value of watch-companion'

Have been using the same entry as in the example:

<key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>healthkit</string>
    </array>

That is what won't submit. If i change the string to watch-companion then the watch app will never start and is broken.

screen shot 2015-08-29 at 9 23 31 am

CMGyroscope and CMDeviceMotion

Thanks a lot for this repo. Actually this was for me the best answer that CMDeviceMotion is unavailable on watchOS2 yet despite it being mentioned in the official documentation as available. Maybe later on new hardware or a future software upgrade.

Thumbs up!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.