watchkit

Apple watch simulator issue

我只是一个虾纸丫 提交于 2019-12-29 05:45:10
问题 I am trying to debug and run the app on apple watch simulator. I have tried by using different target for notification, Glance and Watch app but apple simulator don't shows any thing.. It stuck in waiting for attach process of extension. I just see a black screen for the Apple Watch Simulator. What did I do wrong? How to overcome this issue ? 回答1: I had the same issue. The only thing that helped was to delete and recreate the target scheme. 回答2: This post from the dev forums solved my issue.

Apple Watchkit simulator issue: SPErrorInvalidBundleNoGizmoBinaryMessage

旧巷老猫 提交于 2019-12-28 16:31:22
问题 When I open my existing Watchkit app (Xcode 6.2), it compiles correctly, the simulators are launched (iPhone+Watch), followed by the meaningful error: Error Launching 'xxx Watchkit Extension' SPErrorInValidBundleNoGizmoBinaryMessage I have this issue with all simulators (iPhone 5/5S/6/6+ - 38mm/42mm) Any ideas what the issue can be? It seems for some reason the application does not want to run on the simulator, even though it used to. The iPhone application included in the same project does

Page Based “reloadRootControllersWithNames:” on launch loop?

 ̄綄美尐妖づ 提交于 2019-12-28 15:28:27
问题 - (void)awakeWithContext:(id)context { [super awakeWithContext:context]; [WKInterfaceController reloadRootControllersWithNames:@[@"pageOne", @"pageTwo"] contexts:nil]; } Following Apple's guidelines Call this method to reload the pages in your app’s page-based interface. At launch time, you use this method to customize the set of pages you want displayed. at launch time, only results in a loop. With each reload calling awakeWithContext or will Activate or init again and again. Is there a

How to simulate the Local Notification in apple Watch App?

邮差的信 提交于 2019-12-28 10:44:13
问题 I am trying to simulate the local notification view in apple watch simulator. Does any one known how to simulate the local notifications in apple watch ? I have done some research for that but didn't found any answer for the above. There is a way to simulate the PUSH NOTIFICATION but not for the LOCAL NOTIFICATION. 回答1: It is not possible to have a Watch app react to a UILocalNotification in the simulator. However, it is almost identical to reacting to a push notification, except it gets

WatchKit SDK not retrieving data from NSUserDefaults

痴心易碎 提交于 2019-12-28 02:52:08
问题 I wanted to make a test app for the Apple watch in which you can set some String on your phone, and then it will be displayed on the Apple Watch. I decided to use NSUserDefaults class to store this data. In my view controller for the iPhone I have a method which takes the input and stores into local storage: - (IBAction)saveInfo:(id)sender { NSString *userInput = [myTextField text]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:userInput forKey:@

How can I get workout record from the Activity app in the iphone, does the apple sdk supply this API?

回眸只為那壹抹淺笑 提交于 2019-12-25 11:55:31
问题 I want to get the workout record data from the Activity app in my iphone, does the apple sdk supply this API to access it? Thanks! The detail data I want to access is as below screen: 回答1: You can get access to all of this data using the HealthKit API. I recommend starting with HKHealthStore and the WWDC videos about HealthKit. 来源: https://stackoverflow.com/questions/32859676/how-can-i-get-workout-record-from-the-activity-app-in-the-iphone-does-the-apple

How can I get workout record from the Activity app in the iphone, does the apple sdk supply this API?

半城伤御伤魂 提交于 2019-12-25 11:54:14
问题 I want to get the workout record data from the Activity app in my iphone, does the apple sdk supply this API to access it? Thanks! The detail data I want to access is as below screen: 回答1: You can get access to all of this data using the HealthKit API. I recommend starting with HKHealthStore and the WWDC videos about HealthKit. 来源: https://stackoverflow.com/questions/32859676/how-can-i-get-workout-record-from-the-activity-app-in-the-iphone-does-the-apple

Retrieve user defaults information from an Apple Watch

久未见 提交于 2019-12-25 09:28:59
问题 I have an iPhone and an Apple Watch paired together, and there are some values stored in the user defaults of the phone. I want my Apple Watch to be able to retrieve that stored information somehow and bring it back to the Watch. What is the best method of achieving this with Swift? 回答1: Since watchOS2 , you don't have any built in function for communicating between the iOS and watchOS app other than the WatchConnectivity framework. Due to the fact that Watch apps are no longer considered App

Apple Watch Device crashing with SandboxViolation deny(1) network-outbound

我只是一个虾纸丫 提交于 2019-12-25 08:00:05
问题 Im having an issue on the Apple Watch when making network calls. It works fine on the simulator but when deployed to the device I see this in the device logs: MyAppleWatch kernel(Sandbox)[0] : SandboxViolation: MyWatchApp(203) deny(1) network-outbound /private/var/run/mDNSResponder The code for making the call is done using refit and works on the simulator so I would imagine it is not the cause but I will post it if necessary. I have set these values in the Info.plist of the WatchExtensionApp

Detect WatchKit extension presence in app

岁酱吖の 提交于 2019-12-25 05:27:11
问题 I have an app that I want to behave a bit differently when it comes to updates and caching if a WatchKit extension is installed on your paired Apple Watch than if it is not. If the watchkit extension has any chance of launching (you have paired a watch and the app is installed) then I want to do more heavy caching. Is there any way I can detect whether an Apple WatchKit Extension is installed on the Apple Watch from my iOS app? Other than setting a flag first time it is launched and hope it