watchkit

Data transfering from iPhone to iWatch with Watch connectivity framework [closed]

六月ゝ 毕业季﹏ 提交于 2019-12-08 07:07:04
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I want to ask a question about watch connectivity. 1) Is it possible to read data from iPhone when the iWatch app opened. I not want to wait to open iPhone app for transfering data to iWatch. 2) Is it possible to create login screen(to get user input from text fields) on iWatch 3)

Using the same file with different flags in WatchKit and host App

旧城冷巷雨未停 提交于 2019-12-08 06:01:21
问题 I'm trying to use the same code in both my watchkit extension and host App, but with some additional code in the host App and some additional code in the watchkit extension. To do this I've added WATCH and APP swift flags on the respective targets. Problem is, when I look at my code with my App scheme selected, it doesn't syntax highlight the APP code but does highlight the WATCH code, and other code that refers to the APP code then fails to compile. The watchkit extension is a target

WatchKit Extension Provisioning Profile?

回眸只為那壹抹淺笑 提交于 2019-12-08 05:46:21
问题 I'm trying to send my iOS app to the App Store right now. It compiles fine and installs onto my test device without a single error or even warning. I have an Apple Watch App that is going to go along with it but it seems to be giving me problems. When I create the Archive of the app, I get the following 5 warnings: [App Name] WatchKit Extension warning: skipping copy phase strip, binary is code signed: /Users/***/Library/Developer/Xcode/DerivedData/***/Build/Intermediates/ArchiveIntermediates

Xcode does not install watchOS app for debugging on device

£可爱£侵袭症+ 提交于 2019-12-08 05:46:15
问题 This is on watchOS 4.3 beta (15T5165e) and Xcode 9.3 beta (9Q98q), but I don't think it's because of them being in beta because another WatchKit project ran on device just fine. I have tried unpairing/repairing, restarting the iPhone/Watch/macOS/Xcode (while making sure to to tap "trust this computer" on the watch) but Xcode still says "Running" in the WatchKit scheme without actually installing and running the watchOS app, eventually saying "Watch app launch timed out." 来源: https:/

can setText for WKInterfaceLabel in init method but not in didselectrow method

旧巷老猫 提交于 2019-12-08 04:50:42
问题 I have a storyboard with two scenes, both scenes are handled by the same WKInterfaceController . In the second scene there are 3 WKInterfaceLabels In the init( ) method of the interface controller I am able to change the Label with setText function. When I try to change the WKInterfaceLabel "Dienst" in - (void)table:(WKInterfaceTable *)table didSelectRowAtIndex:(NSInteger)rowIndex NSManagedObject *dienst = [TableArray objectAtIndex:rowIndex]; [self.Dienst setText:@"Selected"]; NSError *error;

How to use alternate font weights (e.g. “short”) in a WKInterfaceLabel?

大憨熊 提交于 2019-12-08 03:59:44
问题 In Apple's Apple Watch Design Resources, there is a document called Alternate Font Weights and Italicizations . In it, it shows examples of what the default font looks like with different attributes such as Italic , Emphasized , and Short applied to it. Assume I want to use a font that looks exactly like the "Short" example. Is there any way to choose this font and style via the storyboard for a label? In code, how would I set a label to use this font and style? 回答1: In an iOS project, I

How to test different font sizes (dynamic type) on the watch?

半世苍凉 提交于 2019-12-08 03:22:32
问题 Apple watch supports Dynamic Type (e.g. by using text styles such as body or footnote). Assuming I have labels that use these custom text styles, how can I test their behavior on the simulator? On an iPhone simulator, I can launch Settings > General > Larger Text and adjust the slider to see how my app looks depending on different font sizes. How can I do the equivalent for my Apple Watch app running on the simulator? 回答1: No possibility yet. Just set it to bold and some points larger in your

WatchKit app “Unlock to activate”

时间秒杀一切 提交于 2019-12-07 20:50:36
问题 My IOS app reads the heart rate from a bluetooth heart rate sensor, the heart rate is displayed on the Apple Watch. Everything works fine. But in most cases the user will lock the iPhone and put it in his pocket. Here is the problem: The IOS app is still working in the background and reading the heart rate but I can no longer display the data on the Apple Watch because the simulator displays "Unlock to activate". Is it not possible to continue with the WatchKit app when the iPhone is locked

How to add a loading view for apple watch?

自闭症网瘾萝莉.ら 提交于 2019-12-07 19:59:10
问题 I want to display a loading view (the one provided by apple) once a WKInterfaceButton is pressed: I need this because after the WKInterfacebutton is pressed, I'm calling the main iPhone app to do some service calls which will take some time to return a response. WKInterfaceController.openParentApplication(watchMessage, reply: { (reply:[NSObject : AnyObject]!, error: NSError!) -> Void in 回答1: I have used very simple progress using WKInterfaceLabel, Create properties and outlets, @IBOutlet var

Migrating NSPersistentStore from application sandbox to shared group container

佐手、 提交于 2019-12-07 17:47:41
问题 I am trying to move my NSPersistentStore from my app's sandbox to a shared group container so I can access CoreData from my WatchKit extension. I am currently using Core Data with iCloud and want to move the users data to the shared group container. Currently I am creating the NSPersistentStoreCoordinator as follows: if (__persistentStoreCoordinator != nil) { return __persistentStoreCoordinator; } NSURL *url = [self storeURL]; // app's Documents directory NSError *error = nil; _