apple-watch

How to trigger notifications using WatchKit

限于喜欢 提交于 2019-12-21 06:59:04
问题 In the WatchKit developer guide, there are instructions on how to render custom notifications and it also says: Apps are not required to do anything to support notifications. The system provides a default notification interface that displays the alert message from the notification. However, apps can customize the notification interface and include custom graphics, content, and branding. I can get local notifications to trigger banner alerts on the phone, but they don't happen on the WatchKit

Debugging on real Apple Watch

夙愿已清 提交于 2019-12-21 04:21:18
问题 I updated my app for Apple Watch, but I should have weighed it too much and now it's definitely slow. I can't understand the reasons of this slowdown so I would like to debug app but I don't know how to do that because in the simulator app works normally, slowdowns manifest only on the device. I tried running app directly from xCode on Watch but once xCode launched the installation of the app on the Watch, it stops the run so I can't see what happens while running (for instance when run

Debugging on real Apple Watch

China☆狼群 提交于 2019-12-21 04:20:59
问题 I updated my app for Apple Watch, but I should have weighed it too much and now it's definitely slow. I can't understand the reasons of this slowdown so I would like to debug app but I don't know how to do that because in the simulator app works normally, slowdowns manifest only on the device. I tried running app directly from xCode on Watch but once xCode launched the installation of the app on the Watch, it stops the run so I can't see what happens while running (for instance when run

Can one open a watchOS app from an iOS app?

橙三吉。 提交于 2019-12-20 06:48:19
问题 I know that an apple watch app can launch its parent application in the background to pass data back and forth but can it work the other way around? Can my iOS app launch the related watchOS app? For a bit more insight, I'm trying to accomplish this so that I can monitor data periodically for the sake of notifications. The 70 seconds apple gives me to keep an app active and pulling data from healthKit isn't conducive to an app that provides alerts to users based on changes in behavior. I

How to build an application with the watchOS 2 SDK

二次信任 提交于 2019-12-20 04:23:16
问题 In the last submission of our application, we have received this warning : Invalid WatchKit Support - Starting April 1, 2018, all apps submitted to the App Store for Apple Watch must be built with the watchOS 2 SDK or later My question is to know how to to build the application with the watchOS 2 SDK? I was thinking that is enough to build with XCODE 9. Thank's. 回答1: Check your Deployment Target. It's likely it wasn't updated just by using a newer version of Xcode. Also try checking Base SDK

Detecting Apple Watch in iOS 8

家住魔仙堡 提交于 2019-12-20 02:55:08
问题 I have some events that should only be fired off if a user has an Apple Watch. Is there a way to detect whether a watch is paired? I'm not sure if I can use the shared app group to detect the Apple Watch extension or maybe I can use bluetooth? 回答1: The best you an do is set a BOOL to true in shared NSUserDefaults the first time the Watch app is run and then check for that value in your iOS app. All indications on the dev forums and publicly have been that there isn't a way to programatically

NSURLSession returns data as Null on Watch OS2 using Objective-C

自作多情 提交于 2019-12-20 01:56:06
问题 This works perfectly on iPhone (Simlulator and Device) but on Watch OS2 i get blank data. What might be the issue with this ? NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *task = [session dataTaskWithRequest:theRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *error) { theData = [[NSString alloc]initWithBytes:[data bytes] length:[data length] encoding:NSUTF8StringEncoding]; NSLog(@"%@", theData); }]; [task resume]; 回答1: Sorry found the

Is there a way to determine rough distance between Apple Watch and iPhone?

白昼怎懂夜的黑 提交于 2019-12-20 01:07:03
问题 I know this might be unanswerable until the Apple Watch is released. But does anyone know if there may be a way to determine the rough distance (in feet) between an Apple Watch and an iPhone? 回答1: Currently, the WatchKit framework does not give you this kind of information, since third-party apps are still quite limited in what they can do. For example, they require a connection to the iPhone. There is some speculation that later this year, third-party developers will be given more access to

Approaching Size Limit - The size of watch application (50MB limit is headache.)

半世苍凉 提交于 2019-12-19 20:24:06
问题 Our app reaches approx 49MB and we are not halfway. So definitely it will exceed the limit of 50MB. I have few questions as follow. 1) Is On-Demand Resources possible in watchOS? 2) My resources(images, custom fonts) make 2 copy each one is watch app and other is watch extension. How to solve that? 3) Swift core and other swift frameworks are consuming about ~28MB of space. is there any way to disable that? (PS. we have bit code disabled) Edit for watchOS4: Previously our app size was 44.3 MB

Getting server data for the Apple Watch

亡梦爱人 提交于 2019-12-19 07:41:28
问题 I am wondering how to go about designing a watchOS app that depends on getting the latest feed from a server. Would you need to use application context and just have the iPhone push it over in the background using the WatchConnectivity framework or would you use NSURLSession on the Apple Watch itself? Keep in mind this is for watchOS 2. 回答1: You can use NSURLSession to handle your request. So your request would be native on your watchn. But note that your watch is there to show simple Content