apple-watch

How to share data between iPhone and Apple Watch using groups?

十年热恋 提交于 2019-12-07 10:03:47
问题 i am new to Watchkit development and unable to find solution to share data between iPhone and iWatch, please help me i am looking to share data using groups. 回答1: We can pass the data between iPhone & iWatch using groups. Basically iWatch can not do any processing and we need to share the data. We can share data using the NSUserDefaults . But for that you need to enable Appp Groups from capabilities section in both your project target and your iwatch app target, as showed below Below is the

WatchKit handleActionWithIdentifier : forRemoteNotification is not called

牧云@^-^@ 提交于 2019-12-07 08:04:16
问题 I have a Simple Static Interface for the apple watch notification as follow: and in the PushNotificationPayload are as follow: { "aps": { "alert": { "body": "123You have a new message", "title": "myApp" }, "category": "respond" }, "WatchKit Simulator Actions": [ { "title": "View Message", "identifier": "viewMsgBtn" } ], "customKey": "customKey" } and implement the method in InterfaceController - (void)handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *

Apple Watch Not Passing Data to iPhone - Swift

☆樱花仙子☆ 提交于 2019-12-07 07:29:22
I'm trying to pass a String from my Apple Watch to an iPhone but it seems like it's not connecting. Here's my code: ViewController.swift : import UIKit import WatchConnectivity class ViewController: UIViewController, WCSessionDelegate { @IBOutlet weak var lablel: UILabel! var string = "Hello World" let session = WCSession.default() override func viewDidLoad() { super.viewDidLoad() session.delegate = self session.activate() } func session(_ session: WCSession, didReceiveMessage message: [String : Any]) { let msg = message["StringValueSentFromiWatch"] as! String lablel.text = "Message : \(msg)"

Xcode 7 Install of Apple Watch Application never finished

こ雲淡風輕ζ 提交于 2019-12-07 07:23:35
问题 I want to try the new Apple Watch OS2. Opened my existing project Added a target Changed bundle Identifiers to remove error messages The Watch App never launches. I get this error message in Xcode after around 5 minutes. I didn't add any Swift code yet. All I did was add the target and did the above steps. Anyone else facing similar situations? 回答1: I was able to finally get the app on the simulator by going into the Apple Watch app on the iPhone simulator and toggle the switch back and forth

Failed to install error: Invalid Bundle - No Apple Watch Binary [duplicate]

爷,独闯天下 提交于 2019-12-07 07:15:26
This question already has answers here : Failed to install app error: Invalid Bundle - No Apple Watch Binary (10 answers) Closed 4 years ago . Update to iOS App + Apple Watch App works locally, but when downloaded via the App Store, users complain that the Watch App fails to install, with the following screenshot attached. How can this problem be resolved? Restart the Apple Watch. As far as I can tell, this appears to be an issue for Apple to resolve. 来源: https://stackoverflow.com/questions/31497554/failed-to-install-error-invalid-bundle-no-apple-watch-binary

Change App ID of Apple Watch App

孤街浪徒 提交于 2019-12-07 05:06:12
问题 I have recently transferred some of my apps from one account to another. When I did this the App IDs also transferred. However, the App IDs did not transfer for the WatchKit Apps or WatchKit Extensions. I have tried to upload and after the upload has completed and appears in iTunes Connect Prerelease I receive an email about CFBundleIdentifier Collision . I then tried to change the App ID for the Apple Watch app and see this error when uploading: Attempting to change bundle identifier from

Xcode 7.0 Beta fails to launch a watchOS 2 App on Apple Watch

依然范特西╮ 提交于 2019-12-07 03:58:47
问题 Tried a public sample code project and my own project. Observe no problem with watchOS 1. watchOS 2 App installs and operates successfully on the real Apple Watch and the simulator, but it won't support the debug mode launching the app on the device by Xcode. Tried to allow the system to create the Provisioning files and manually create the Provisioning files for the development mode. Test on 10.10, 10.11. Steps to Reproduce: Set up the Provisioning files on build settings, watchOS 2

AppleWatch Messages URL works hard coded but not with variables

无人久伴 提交于 2019-12-07 02:59:24
问题 TLDR When I hard code phone numbers into a URL it opens in watch messages correctly, but when I use a variable string with the numbers typed in exactly the same way inside of it, it doesn't. Example: NSURL(string: "sms:/open?addresses=8888888888,9999999999,3333333333&body=Test") Above code works but below code doesn't: let hardCode = "8888888888,9999999999,3333333333" NSURL(string: "sms:/open?addresses=\(hardCode)&body=Test") FULL DETAILS: I am making a URL from variables to open messages on

Where to find Taptic feedback API documentation or capabilities for watchOS 2?

十年热恋 提交于 2019-12-06 18:58:22
问题 I'm interested in building an app for watchOS 2 using haptic feedback. Currently I do not have the Apple Watch, but I have access to the Apple Developer Program. I've tried looking at the watchOS Developer Library and watchOS 2 Release Notes. I do not see any mention of how to access the Taptic engine programmatically or what it is capable of in the current watchOS 2. How can I access the Taptic engine programmatically or understand what the new Taptic API is capable of doing? 回答1: You can

Detect physical movement of iPhone/Apple Watch

爱⌒轻易说出口 提交于 2019-12-06 13:37:01
I'm trying to detect the movement (to the right or left) performed by users. We assume that the user starts with his arm extended in front of him and then moves his arm to the right or to the left (about 90 degrees off center). I've integrated CMMotionManager and want to understand detecting direction via startAccelerometerUpdatesToQueue and startDeviceMotionUpdatesToQueue methods. Can anyone suggest how to implement this logic on an iPhone and then on an Apple Watch? Apple provides watchOS 3 SwingWatch sample code demonstrating how to use CMMotionManager() and startDeviceMotionUpdates(to:) to