watchkit

Notify WatchKit app of an update without the watch app requesting it

纵然是瞬间 提交于 2019-12-17 17:29:24
问题 I'm aware of the capabilities of WKInterfaceController openParentApplication and handleWatchKitExtensionRequest methods for the watch app to open the parent app and send/receive data. But how about this... In the instance where the user is using the parent app and performs an action in the parent app (ie changes the color of the background), how would I notify the watch app immediately and perform the relevant action on the watch also? I believe MMWormhole would suffice in this example, is

Using Core Data with watchOS 2.0

五迷三道 提交于 2019-12-17 15:49:26
问题 I made an iOS/Apple Watch app with WatchKit 1.0 that uses a shared group container and a custom framework to access the same Core Data store. Now, in the transition guide for watchOS 2.0, Apple says this: If your existing Watch app and iOS app use a shared group container or iCloud to exchange data, you must change the way you exchange that data in watchOS 2. Because the WatchKit extension now runs on Apple Watch, the extension must exchange data with the iOS app wirelessly. You can do that

Passing data back from a modal view in WatchKit

淺唱寂寞╮ 提交于 2019-12-17 11:23:21
问题 When modally presenting, or pushing, an interface controller we can specify the context parameter to pass some data to the new controller as follows. // Push [self pushControllerWithName:@"MyController" context:[NSDictionary dictionaryWithObjectsAndKeys:someObject, @"someKey", ..., nil]]; // Modal [self presentControllerWithName:@"MyController" context:[NSDictionary dictionaryWithObjectsAndKeys:someObject, @"someKey", ..., nil]]; My question is, how can we do the reverse? Say we present a

Where and When to get data for Watch Complication

╄→尐↘猪︶ㄣ 提交于 2019-12-17 10:27:11
问题 After working with complications for a few days, I feel confident saying the following about the update process for updates that happen at a prescribed interval: The system calls requestedUpdateDidBegin() This is where you can determine if your data has changed. If it hasn't, your app doesn't have to do anything. If your data has changed, you need to call either: reloadTimelineForComplication if all your data needs to be reset. extendTimelineForComplication if you only need to add new items

Debug on real Apple Watch: Application Verification Failed

大兔子大兔子 提交于 2019-12-17 08:55:19
问题 I tried to debug my WatchKit app on a real Apple Watch today. After hitting the Debug button in Xcode, the main iPhone app was installed properly, but the Apple Watch only displayed the message Failed to install xxx, error: Application Verification Failed . The WatchKit app doesn't install. I was aware of this: WatchKit App Rejected for "Failing to Install" , but it didn't help because my Xcode project file is alright. How to make debug work on a real Apple Watch? 回答1: It turns out you also

Debug on real Apple Watch: Application Verification Failed

落花浮王杯 提交于 2019-12-17 08:55:15
问题 I tried to debug my WatchKit app on a real Apple Watch today. After hitting the Debug button in Xcode, the main iPhone app was installed properly, but the Apple Watch only displayed the message Failed to install xxx, error: Application Verification Failed . The WatchKit app doesn't install. I was aware of this: WatchKit App Rejected for "Failing to Install" , but it didn't help because my Xcode project file is alright. How to make debug work on a real Apple Watch? 回答1: It turns out you also

Watchkit , openParentApplication with WatchKit Extension

孤街浪徒 提交于 2019-12-17 06:57:50
问题 First times doesn't work "Null" ( before open App in iPhone ) and some times doesn't work but i want one loop or timer for repeat this request for get result : here is my code - (void)application:(UIApplication *)application handleWatchKitExtensionRequest:(NSDictionary *)userInfo reply:(void (^)(NSDictionary *))reply { // Temporary fix, I hope. // -------------------- __block UIBackgroundTaskIdentifier bogusWorkaroundTask; bogusWorkaroundTask = [[UIApplication sharedApplication]

Watchkit Extension - No matching provisioning profiles found

心不动则不痛 提交于 2019-12-17 02:22:25
问题 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 app submission

落花浮王杯 提交于 2019-12-13 22:35:30
问题 I have created an app with WatchKit . I have tried with three different bundle identifier: com.xyz.myappname com.xyz.myappname.extension com.xyz.myappname.extensionapp If I set this and try to validate my app I am getting extension app and WatchKit app bundle identifier does not match. If I keep same bundle identifier for both app then I am getting CFBundle identifier collision. Error as follows CFBundleidentifier collision : There more than bundle with the CFBundleidentifier value com.xyz

How to realize communication between Cordova App and Native WatchKit Extension

百般思念 提交于 2019-12-13 15:23:00
问题 I would like to extend a ionic / Cordova IOS App by a WatchKit App (native written in swift). I am wondering which is the best way for communication between both. I checked the plugin: github.com/leecrossley/cordova-plugin-apple-watch which allows me to make basic communication, after changing to: MMWormholeTransitingTypeSessionMessage transition type on both sides. (Using Xcode9 and watchOS 4.0). Now I am asking myself if this MMWormhole is the best choice, as development stopped 2-3 years