watchkit

App installation failed due to application-identifier entitlement

女生的网名这么多〃 提交于 2019-11-28 02:39:48
I am unable to install a watchOS 2 WatchKit app due to an application-identifier entitlement. This happened after turning on App Groups in the Capabilities tab. Full error: App installation failed This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed. This is running the app in debug mode on a physical device. Running just the iOS app works fine. I have turned App Groups off again and removed the entitlements files that were added, but same error. I had this problem with an iPhone app, and

Parse Query in WatchKit

佐手、 提交于 2019-11-28 01:45:54
I do a Parse query in my iPhone app, but I am getting errors trying to do the same Parse query in my Watch app . This is the query in my iPhone app: - (void)viewDidLoad { // GMT Date from Phone NSDate *gmtNow = [NSDate date]; NSLog(@"GMT Now: %@", gmtNow); // Query Parse PFQuery *query = [self queryForTable]; [query whereKey:@"dateGame" greaterThanOrEqualTo:gmtNow]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (!error) { NSMutableArray *localMatchup = [@[] mutableCopy]; for (PFObject *object in objects) { // Add objects to local Arrays [localMatchup

Why won't app groups work inside my WatchKit extension?

拈花ヽ惹草 提交于 2019-11-27 21:36:34
问题 I've seen all the other posts of SO about sharing NSUserDefaults data between host apps and app extensions, but mine still doesn't work. Here's everything I've done: Enable App Groups on Xcode's "Capabilities" tab for the extension and host app. Set the group name to "group.com.mycompany.foo" and confirmed the extension and host app are added to the group. Confirmed an entitlements file exists for both with the "com.apple.security.application-groups" key set to my app group name. (For what it

WatchKit API for Force Touch / Digital Crown?

ⅰ亾dé卋堺 提交于 2019-11-27 21:33:38
问题 I'm very excited about the new user interaction possibilities introduced by the Apple Watch, among them, Force Touch and Digital Crown. However, I couldn't find mentions of them in the WatchKit API. Are there any ways to receive events from Force Touch / Digital Crown? Is it possible to have custom handlers for the events? 回答1: watchOS 3 adds WKCrownSequencer and WKCrownDelegate to report the state of the digital crown (such as rotational speed), as well as to receive notifications when the

How to check whether iPhone and apple watch are connected

混江龙づ霸主 提交于 2019-11-27 21:13:08
Is there any way to notify user in Apple Watch that the iPhone is now out of range and when it comes back in range. How can we do it in watch extension. Thanks in advance. So on WatchOS 2 that is possible ! You have to do on iPhone side : First : import WatchConnectivity Then : if WCSession.isSupported() { // check if the device support to handle an Apple Watch let session = WCSession.defaultSession() session.delegate = self session.activateSession() // activate the session if session.paired { // Check if the iPhone is paired with the Apple Watch // Do stuff } } I hope It would help you :)

Using Core Data with watchOS 2.0

依然范特西╮ 提交于 2019-11-27 21:06:12
I made an iOS/Apple Watch app with WatchKit 1.0 that uses a shared group container and a custom framework to access the same Core Data store. Now, in the transition guide for watchOS 2.0, Apple says this: If your existing Watch app and iOS app use a shared group container or iCloud to exchange data, you must change the way you exchange that data in watchOS 2. Because the WatchKit extension now runs on Apple Watch, the extension must exchange data with the iOS app wirelessly. You can do that using an NSURLSession object or using the Watch Connectivity framework, which supports bidirectional

Access Apple Watch's microphone

∥☆過路亽.° 提交于 2019-11-27 20:14:22
Now that more and more documentation on the Apple Watch is surfacing has anybody found a way to access and use the device's microphone? You can access the  Watch's microphone on watchOS 2. 1) Create a file URL at which to store the recorded output. NSArray *filePaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES); NSString *path = [[filePaths firstObject] stringByAppendingPathComponent:@"rec.m4a"]; NSURL *fileUrl = [NSURL fileURLWithPath:path]; You may specify the extensions .wav, .mp4, and .m4a. 2) Call the method as follows: [self

Can't install WatchKit app on Apple Watch

◇◆丶佛笑我妖孽 提交于 2019-11-27 19:39:00
I have a WatchKit app that runs fine in the Simulator. But when I try to run it on an actual device it never finishes installing and never provides any error message or feedback. The iOS app installs and runs fine. I bring up the Apple Watch app on the iPhone and it lists the app and shows the correct icon. Selecting that, the "Show App on Apple Watch" switch is on. Underneath it it says, "Installing...". And it stays there. I can also see the app icon on the Apple Watch. Selecting it just shows the spinning wheel indicator as if it is trying to load. Things I've tried based on other

WatchKit apps must have a deployment target equal to iOS 8.2 (was 8.3)?

二次信任 提交于 2019-11-27 19:34:19
I just downloaded Xcode 6.3 beta 4, and my WatchKit app now fails to build with an error: Embedded Binary Validation Utility Error error: WatchKit apps must have a deployment target equal to iOS 8.2 (was 8.3) The iOS app and the project actually have a deployment target of 7.1 and always have, but we've been working with the iOS 8.3 SDK for our WatchKit component (using Swift 1.2) without issue using Xcode 6.3 beta 1, 2 and 3. This error only arose with Xcode 6.3 beta 4. Anyone else have this error, and know how to fix it? Select your project settings and go to "TARGETS". Click on your Watch

Watch os 2.0 beta: access heart beat rate

*爱你&永不变心* 提交于 2019-11-27 17:44:25
With Watch OS 2.0 developers are supposed to be allowed to access heart beat sensors.... I would love to play a bit with it and build a simple prototype for an idea I have, but I can't find anywhere info or documentation about this feature. Can anyone point me on how to approach this task? Any link or info would be appreciated Apple isn't technically giving developers access to the heart rate sensors in watchOS 2.0. What they are doing is providing direct access to heart rate data recorded by the sensor in HealthKit. To do this and get data in near-real time, there are two main things you need