apple-watch

Is there an official way to pass data between Apple Watch and iPhone?

↘锁芯ラ 提交于 2019-12-12 09:30:52
问题 I was wondering if there is any other way besides MMWormhole to pass basic data between iPhone and Apple Watch. Do you know if any existing official Apple framework allows this? 回答1: It is possible. Looking at: The WatchKit Doc's There is a paragraph on sharing data between the watch app and the extension on the iPhone. To quote the first paragraph. Sharing Data with Your Containing iOS App If your iOS app and WatchKit extension rely on the same data, use a shared app group to store that data

Reading Apple Watch syslog (NSLog()) in real-time

我怕爱的太早我们不能终老 提交于 2019-12-12 06:05:36
问题 I'm looking for a way to read the watch's syslog in real-time, similar to the way Device Console or this do it for the iPhone. It's ok if the phone will be plugged by usb to the computer at the time I'm reading. At this point I'll even settle for a solution that somehow reads the texts at real-time from Xcode debug console, really (though I will prefer a way to hook in to the watch's syslog in a standard fashion :).. Thanks! 回答1: While I couldn't find any official way to get logs from the

Use of unresolved identifier 'WKExtension'

天大地大妈咪最大 提交于 2019-12-12 05:36:33
问题 i want to make a phone call from Apple Watch too. I imported WatchKit. Then i put this code in my method: if let telURL=NSURL(string:"tel:5553478") { let wkExtension=WKExtension.sharedExtension() wkExtension.openSystemURL(telURL) } It shows me an error: Use of unresolved identifier 'WKExtension' in line 2. I don't know what I am doing wrong :/ 回答1: WKExtension is only available on WatchOS 2.0, as you can see from Apple's prerelease reference. So I'm guessing you're either not using Xcode 7 or

Notification syncing issue between iPhone and Apple watch

倖福魔咒の 提交于 2019-12-12 04:05:41
问题 I am working on iOS app in which push notifications comes from web server. I do Apple watch configuration in Xcode by adding new target and make new Provisioning Profiles and use them in Xcode for Apple watch. When i test it some times notification appear on Apple watch some times on iPhone not on both. Any one help 回答1: The OS determines which device to send the notification to based on a few different factors. Primarily, the Watch will only receive the notification if it is being worn –

WatchKit - iOS App Bundle Contains 2 WatchKit App Binaries

不问归期 提交于 2019-12-12 03:36:50
问题 When I build my iOS app for the app store and run the validation, I see that the embedded binaries and entitlements section contains two instances of my watchkit app. How is this happening? Has anyone else faced this problem? The entitlements I use are for keychain sharing and app group sharing. If any more information is needed, I'll be glad to provide it. When I build an enterprise version of this app and distribute it to my team, only one WatchKit app is installed. Should this be OK to

userInfoTransfer, payload is too big

时光怂恿深爱的人放手 提交于 2019-12-12 02:34:01
问题 I'm trying to send a fair bit of data from a watchOS app, to the iOS app. The data is comprised of generated content on the watch. This data is stored in Core Data on the watch. So I'm not actually transferring a file, in which case I'd use transferFile . I've attempted to use transferFile in this case, but a file URL is required. Since I'm not actually transferring a file, I'm not sure what to do. According to this: WCSession - PayloadTooLarge I'm currently limited to 65.5kb. My average

Max memory usage on watchOS 2?

自闭症网瘾萝莉.ら 提交于 2019-12-12 01:45:16
问题 I didn't find anything regarding the memory usage availavable for an app in watchOS 2. I'm currently developing an app for watchOS and I'm using Core Data in the watch side. When I load 166 of 189 objects to an array, the app crashes, the memory usage at that point is 34mb. As the watch has 512mb of memory I'm not entirely sure how much can you use with just one app. I'm gonna improve my code's performance and ram usage but eitherway I still don't know what amount of memory can I use as it's

Can you mirror the Apple Watch during a demo

谁说胖子不能爱 提交于 2019-12-12 01:27:15
问题 Is there a way to mirror what's on the Apple Watch to another screen? This would be for a internal demo purpose. Or suggestions on how to demo an app to a large (more than one person) group? 回答1: There isn't a way to do what you describe. Your best bet currently is to run your app in the simulator or point a camera at your Watch. 来源: https://stackoverflow.com/questions/30223424/can-you-mirror-the-apple-watch-during-a-demo

How to start watchApp from iPhone

我的梦境 提交于 2019-12-11 16:14:37
问题 I am developing a watch app and I want the watch app to activate when I start the app on the iPhone, but I can't find out how to do that. The question has been asked in a number of forums and the answer has always been "Not possible", but there must be another answer as there are plenty of apps that do open the watch app automatically: Maps, Podcasts to name but two. So what's the secret? 回答1: Here is the code snippet. You are supposed to only use it for a workout app but on the watch side

Can't read WatchKit settings bundle from iPhone app

独自空忆成欢 提交于 2019-12-11 13:24:16
问题 In watchOS 2, it seems like you can't access the data from the WatchKit settings bundle from the watch extension itself, because it now runs on the watch instead of the host iPhone. A solution, which was proposed here, was to read the data on the iPhone and then transfer it to the watch. My problem is, that I cannot only read the data from the watch, but even from my phone. In ViewController.m I have the following code to get the value of a switch: NSUserDefaults *userDefaults = [