watchkit

Parse Query in WatchKit

我是研究僧i 提交于 2019-11-26 22:02:43
问题 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 = [@[]

Heart Rate data on apple Watch

*爱你&永不变心* 提交于 2019-11-26 21:48:31
Can we access the heart rate directly from the apple watch? I know this is a duplicate question, but no one has asked this in like 5 months. I know you can access it from the Health App but I'm not sure how "real-time" that will be. There is no direct way to access any sensors on the Apple Watch. You will have to rely on access from HealthKit. An Apple evangelist said this It is not possible to create a heart monitor app at this time. The data isn't guaranteed to be sent to iPhone in real-time, so you won't be able to determine what's going on in any timely fashion. See https://devforums.apple

Detect when a unicode character cannot be displayed correctly

流过昼夜 提交于 2019-11-26 21:26:06
问题 Some unicode characters cannot be displayed on iOS but are displayed correctly on macOS. Similarly, some unicode characters that iOS can display cannot be displayed on watchOS. This is due to different built-in fonts installed on these platforms. When a character cannot be displayed it appears as a ? inside a box, like so: I've also seen some characters display as an alien instead (not sure why the difference): Is there a way to know when a specific unicode character will not be displayed

Access Apple Watch's microphone

陌路散爱 提交于 2019-11-26 20:14:46
问题 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? 回答1: 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

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

家住魔仙堡 提交于 2019-11-26 19:58:18
问题 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

NSUserDefaults not working on Xcode beta with Watch OS2

对着背影说爱祢 提交于 2019-11-26 19:01:10
I just installed the latest beta of Xcode to try Swift 2 and the improvements made to the Apple Watch development section. I'm actually having an hard time figuring out WHY this basic NSUserDefaults method to share informations between iOS and Watch OS2 isn't working. I followed this step-by-step tutorial to check if I missed something in the process, like turning on the same group for both the phone application and the extension, but here's what I got: NOTHING . Here's what I wrote for the ViewController in the iPhone app: import UIKit class ViewController: UIViewController { @IBOutlet weak

Is it possible to position views on top of each other

狂风中的少年 提交于 2019-11-26 15:56:47
问题 I am building an Watch app where I want to overlay WKInterfaceImage with a group with a bunch of WKInterfaceLabel objects. Can't seem to be able to do this in StoryBoard editor. Has anyone ever been able to achieve laying out views on top of each other for Watch App? PS. I am aware of WKInterfaceGroup setBackgroundImage method. Since I want to do some animation inside WKInterfaceImage, setBackgroundImage is not going to woe for me 回答1: You can't layout WKInterfaceObjects on top of each other.

Passing data to Apple Watch app

删除回忆录丶 提交于 2019-11-26 12:25:40
问题 I am trying to pass data from my app into my Apple Watch app. Basically, I am using the same method as I used for creating the today widget and so I am passing data through NSUserDefaults. The problem is, that when I run my app, the data does not update the labels in the Watch app as I would expect it to. Here is what I have... override init(context: AnyObject?) { // Initialize variables here. super.init(context: context) // Configure interface objects here. NSLog(\"%@ init\", self) var

Watchkit Extension - No matching provisioning profiles found

心已入冬 提交于 2019-11-26 11:48:39
I have created an iPhone app that also includes a WatchKit extension, I can run this fine in the simulator but when trying to deploy to an iPhone I get a provisioning issue for the WatchKit Extention target: "The provisioning profile specified in your build settings (“XXXX”) has an AppID of “XXXX” which does not match your bundle identifier “XXXX.watchkitextension”. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center." Xcode automatically created the WatchKit targets with the suffix .watchkitextension and .watchkitapp but this seems to cause the issues

Is transferCurrentComplicationUserInfo more suitable for complication update?

白昼怎懂夜的黑 提交于 2019-11-26 11:26:06
问题 What is the difference between transferCurrentComplicationUserInfo and transferUserInfo ? I want to send data from my AppDelegate to a clock kit complication. transferCurrentComplicationUserInfo seems to do exactly the same thing as transferCurrentUserInfo . Am I missing something? 回答1: The distinction between these two WCSession methods involve when the data is sent, and whether the watchkit extension is woken up or not. transferCurrentComplicationUserInfo: is specifically designed for