watchkit

Submitting the Apple Watch app

折月煮酒 提交于 2020-01-16 18:35:57
问题 I am trying to submit an iOS App + Apple watch extension to the App Store. I selected the app as my target, created an archive (Product > Archive). I clicked on the archive in Window > Organizer and clicked Export (I am using the Application loader to submit the app). I selected "Save for iOS App Store Deployment" In the next window (in Binary and Entitlements), I expected to see the the app and the watchkit extension. But I see only the app. Why is this ? Is it expected ? Or did I miss some

Apple watch and iPhone are not connected when the app in phone goes to background

守給你的承諾、 提交于 2020-01-14 10:12:29
问题 I ran my iPhone app and its watch extension in the simulator. I send messages from phone to watch and vice versa. The messages are sent and received without any issue. But when I send the iPhone app to background, and then a message is sent from watch to iPhone, I continuously get the following log: [WC] __33-[WCXPCManager onqueue_reconnect]_block_invoke error reconnecting to daemon due to NSXPCConnectionInterrupted I searched regarding this but did not find any proper solution. Many have

Parse and watchkit extension

*爱你&永不变心* 提交于 2020-01-14 08:48:20
问题 I am building an app using WatchKit and would like to populate a Table with data from PFObjects I have in a class but I got this error: Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'This decoder will only decode classes that adopt NSSecureCoding. Class 'PFObject' does not adopt it.' Having the same problem as this post 回答1: Have you considered adding a Swift extension to PFObject that adopts the NSSecureCoding protocol? I haven't tried this action

Preprocessor macro for Apple Watch?

随声附和 提交于 2020-01-12 13:49:06
问题 I was looking at Apple's Lister (for Apple Watch, iOS, and OS X) sample. The sample performs a test for iOS and OS X: #import <TargetConditionals.h> #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR) @import ListerKit; #elif TARGET_OS_MAC @import ListerKitOSX; #endif However, there is no test for TARGET_OS_WATCH or similar. Grepping for watch in TargetConditionals.h delivers no hits: $ cat /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer /SDKs/iPhoneOS7.1.sdk

How to tell if current running Apple Watch size/dimension is 38mm or 42mm?

好久不见. 提交于 2020-01-11 17:53:22
问题 We know that there are two screen sizes for Apple Watch: 38mm and 42mm. The WKInterfaceDevice class provides a readable property named screenBounds . I wrote an extension for WKInterfaceDevice , trying to add a method to detect current device type. import WatchKit enum WatchResolution { case Watch38mm, Watch42mm } extension WKInterfaceDevice { class func currentResolution() -> WatchResolution { let watch38mmRect = CGRectMake(0.0, 0.0, 136.0, 170.0) let watch42mmRect = CGRectMake(0.0, 0.0, 156

Passing Data between interface controllers in WatchKit

 ̄綄美尐妖づ 提交于 2020-01-10 18:58:15
问题 How would I pass data stored in a label from my Interface Controller to another interface controller in WatchKit using Swift? I can't seem to find an answer anywhere, hope someone here can help me. I've included the section of my code that deals with calculating the value I need passed. I basically want to show the same value that was calculated by the user and elaborate more on it in the next Interface Controller named ResultsController. Any help is greatly appreciated :D class

Passing Data between interface controllers in WatchKit

两盒软妹~` 提交于 2020-01-10 18:58:06
问题 How would I pass data stored in a label from my Interface Controller to another interface controller in WatchKit using Swift? I can't seem to find an answer anywhere, hope someone here can help me. I've included the section of my code that deals with calculating the value I need passed. I basically want to show the same value that was calculated by the user and elaborate more on it in the next Interface Controller named ResultsController. Any help is greatly appreciated :D class

How to send data from Iphone to Apple Watch in OS2 in Objective-C

五迷三道 提交于 2020-01-09 05:26:07
问题 I've seen a similar question posted on how to send data back and forth in Swift. I'm asking the same question but in Objective-C. I've also viewed Apple's transition docs. I work best with clear examples, rather than lecture material. So if someone has implemented this and wouldn't mind sharing, that would be much appreciated. 回答1: Here´s a link to a Q/A about WatchConnectivity: Send messages between iOS and WatchOS with WatchConnectivity in watchOS2 I will give you an example go

watch button press crash

半城伤御伤魂 提交于 2020-01-06 06:01:30
问题 it seems to be the same error and conditions as this unanswered SO question, but I have more to add (its really easy to replicate) Create a new project in the latest Xcode iOS App with WatchKit App Go to the WatchKit App > Interface.storyboard and put a single button on the Interface Controller Scene > Interface Controller Go to WatchKit Extension > InterfaceController.swift and add a new member @IBOutlet var scheduleMeetingButton: WKInterfaceButton! and method @IBAction func scheduleMeeting(

watch button press crash

为君一笑 提交于 2020-01-06 06:01:09
问题 it seems to be the same error and conditions as this unanswered SO question, but I have more to add (its really easy to replicate) Create a new project in the latest Xcode iOS App with WatchKit App Go to the WatchKit App > Interface.storyboard and put a single button on the Interface Controller Scene > Interface Controller Go to WatchKit Extension > InterfaceController.swift and add a new member @IBOutlet var scheduleMeetingButton: WKInterfaceButton! and method @IBAction func scheduleMeeting(