watchkit

HKWorkoutSession: Not getting Heart Rate when screen is turned off in watchOS 2

随声附和 提交于 2019-11-29 04:46:35
I am using iOS 9 beta 4 and watchOS 2 beta 4. I can't seem to get any heart rate data when the watch screen turns black (locks). I will get a call to applicationWillResignActive and then the heart rate data just stops. It seems that the sensor is deactivating after some time as well (not green anymore), when the screen locks. Anyone else seeing this behavior? I can post my code for initing the WorkoutSession if anyone else getting heart rate data when the screen on the watch is locked. Starting in watchOS 3.0 you can add the WKBackgroundModes entry with the workout-processing value to the

Running Apple Watch in iOS simulator issue

陌路散爱 提交于 2019-11-29 03:18:42
I'm trying to run the Apple WatchKit Catalog example code in iOS simulator. But i have always Apple Watch simulator disabled. What i have to do? Apple Watch is only supported with iPhone 5 and newer phones. Make sure you are running a simulated device that supports pairing with an Apple Watch. Go here and click on your app name, in my case it is "watch kit test" Then click on edit scheme and then this view should show up. Make sure to go to executable and click on "yourappname.app Finally close it and go back to the menu in the first step and click "Your App Name" Watch App Then run your app

Easy way to update app content via apple watch

Deadly 提交于 2019-11-29 02:47:10
I couldn't find an easy way to update the view in my iPhone app when I push a button on the AppleWatch App yet. I tried it with NSUserDefaults Observer like this: iPhone App Viewcontroller(inside ViewDidLoad()): // Create and share access to an NSUserDefaults object. mySharedDefaults = NSUserDefaults(suiteName: "group.sharedTest") //Add Observer NSUserDefaults.standardUserDefaults().addObserver(self, forKeyPath: "test", options: NSKeyValueObservingOptions.New, context: nil) In the Watchkit Extensions InterfaceController I added an IBAction with the button with this code: mySharedDefaults!

Installation Failed: Invalid Argument -iOS Extension

不打扰是莪最后的温柔 提交于 2019-11-29 02:19:59
问题 https://imgur.com/vFn0S7g Hi guys, I am about to build watch app target from existing project. I encountered a strange error upon finishing build that unables me to run the watch app properly. Here is the attached screenshot. Environment OSX 10.10 XCode 6.2 Beta Simulator iPhone 6 iOS 8.2 When I try creating new watch app project and try the Lister demo app they work just fine. So I am suspecting there is something wrong with my existing project but not sure what since the error message is

WatchKit reloadRootControllersWithNames causing error, with pageController or after push/pop

大城市里の小女人 提交于 2019-11-29 02:11:51
I have a basic watchkit app that loads a page based navigation of 3 interface controllers. This works well, but I'd then like to trigger an action to remove the page-control and essentially revert back to the original InterfaceController that was present when the app first loads. // load page based control, with 3 views. this works ok [WKInterfaceController reloadRootControllersWithNames:@[@"pageController1",@"pageController2",@"pageController3"] contexts:@[@"data1",@"data2",@"data3"]]; // attempt to reload original interface controller, identified by storyboard id [WKInterfaceController

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

只愿长相守 提交于 2019-11-29 01:23:05
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's worth, I'm also using the shared keychain capabilities between extension and host app and that is

Access workout data even when apple watch screen turn off

霸气de小男生 提交于 2019-11-29 00:42:56
I success to get heart rate data in live without workout session on apple watch os 2. But when apple watch screen turn off, my completion block is not anymore called. I would like to continue to manage these data in live and to make my phone ring when heart rate is too low. Maybe i can let the app on the iphone perma open and maybe it can access to the healthkit data during this workout ? Do you think this can work ? or do you have another idea ? Regards Arsene Huot Hey i found a solution : i keep iphone app in foreground with : [UIApplication sharedApplication].idleTimerDisabled = YES And

How to transfer a UIImage using Watch Connectivity

三世轮回 提交于 2019-11-28 23:50:28
How can I transfer an UIImage over WatchConnecitivity from the iPhone to the Apple Watch with no user interaction on the phone, and only loads because the watch calls for it programmatically. I need this because the image processing to create the UIImage uses logic unavailable in the Watchkit API, so it must be created from the phone. I have seem some examples of Watch Connectivity using: func startSession() { session?.delegate = self session?.activateSession() } However, I am new to watch kit and iOS in general and am confused on how to use this session manager, particularly to go from the

Apple Watch: Status bar not visible after presenting a modal screen from page based navigation

五迷三道 提交于 2019-11-28 23:45:10
When i present a modal screen from a page in page based navigation, the whole screen shifts up and the status bar is no longer visible. Here is a gif of the issue: I am using xCode 6.2 version. This was not happening in xCode 6.2 Beta 4.. I am not sure if this is a simulator issue or this will actually happen on a real device too. Does anyone have the same issue? Is there a workaround? I reported a bug to apple (20109240) and it was marked as a duplicate of (19862945), and that one is still open. Thanks in advance This is a known issue in the final release that exhibits itself in two cases:

How to export shared container of an iOS App with Xcode6.2?

我与影子孤独终老i 提交于 2019-11-28 21:31:47
In our iOS app we utilize a shared container to share files between our main iOS app and its extension (specifically WatchKit Extension), using [NSFileManager containerURLForSecurityApplicationGroupIdentifier:] method. For debugging purposes we need to access the content of this shared container, so we've tried to export the whole App container using the Devices window in Xcode: But, the Shared storage is not included in the container, probably because it sits in a different path on the Device itself. The question is how can we get the shared container, if this is even possible? I've been told