watchkit

Unable to get values from settings bundle in watchOS 2

一笑奈何 提交于 2019-12-02 04:55:47
问题 I have a settings bundles that I use with my watch app. I am migrating my app to watchOS 2. Does anyone know how setting bundles are supposed to work? Does the iPhone transfer the values to a the standard user defaults or to a user defaults with a suite name for a shared app group? I can't get either to work and I can't find any documentation on how setting bundles are supposed to work with watchOS 2. 回答1: In Watch OS 2.0 since the Watch App extension is in the Apple Watch (not in the iOS App

WatchKit Option to ONLY Dictate?

[亡魂溺海] 提交于 2019-12-02 04:15:13
I use: NSArray* initialPhrases = @[@"Let's do lunch.", @"Can we meet tomorrow?", @"When are you free?"]; [self presentTextInputControllerWithSuggestions:initialPhrases allowedInputMode:WKTextInputModePlain completion:^(NSArray *results) { if (results && results.count > 0) { id aResult = [results objectAtIndex:0]; // Use the string or image. } else { // Nothing was selected. } }]; This is the example given for text input by Apple. However, in my app, I want the user to ONLY have the option to dictate text. If I set the array to nil, the dictate button is not there, but if I leave the array

What is the equivalent of UIApplication.sharedApplication().delegate in WatchKit?

你。 提交于 2019-12-02 04:02:07
问题 In an iOS application, you can obtain a reference to the shared app delegate by: Swift: let delegate = UIApplication.sharedApplication().delegate as! AppDelegate Objective-C: AppDelegate *delegate = [[UIApplication sharedApplication] delegate]; In a WatchKit2 App Extension there is a similar App Delegate and I want to obtain a reference to it in a view controller to access shared resources in the app, such as the ManagedObjectModel and PersistentStoreCoordinator for the Core Data stack, that

Unable to get values from settings bundle in watchOS 2

时光怂恿深爱的人放手 提交于 2019-12-02 03:43:31
I have a settings bundles that I use with my watch app. I am migrating my app to watchOS 2. Does anyone know how setting bundles are supposed to work? Does the iPhone transfer the values to a the standard user defaults or to a user defaults with a suite name for a shared app group? I can't get either to work and I can't find any documentation on how setting bundles are supposed to work with watchOS 2. In Watch OS 2.0 since the Watch App extension is in the Apple Watch (not in the iOS App as in Watch 1.0) you can't transfer data through user defaults, so you should use instead WatchConnectivity

WatchKit 2 Complication Text Only Shows Up in Preview

試著忘記壹切 提交于 2019-12-02 03:14:35
I'm trying to develop a very simple complication for watchkit 2 that says "Hi" from a simple text provider. I've managed to achieve some strange behavior; I can see the text when the complication is clicked or when you are previewing it from the customize watchface screen, but not when the watchface is displayed. Have a look: Any ideas what might be causing this? My text provider looks like this var textProvider: CLKSimpleTextProvider override init() { textProvider = CLKSimpleTextProvider() textProvider.text = "Hi" textProvider.shortText = "HI" textProvider.tintColor = UIColor.whiteColor()

iOS - WatchKit how to send message/data from iPhone app to WatchKit app?

痴心易碎 提交于 2019-12-01 21:39:28
问题 I am creating a WatchKit app and was wondering how to send a message/data from the iPhone to the Watch? I know how to do it the other way around (watch -> phone) using ' openParentApplication:reply: ' and ' application:handleWatchKitExtensionRequest:reply: ' but can't find any documentation on how to communicate from phone to watch. Simple setup would be the iPhone app has a button that when pressed should update a label on the Watch app. Can anyone point me in the right direction? 回答1: First

Using firebase with WatchKit

妖精的绣舞 提交于 2019-12-01 20:50:30
I am attempting to use the firebase database in my watchKit app. I have developed this feature on my iPhone application but have found it difficult to do the same on my Watch app. When I attempted to import firebase into the VC class in watch app, it is creating an error no such module 'firebase' . Is it possible to use firebase inside a watch app? Sadly there is no Firebase support for watchOS2 and watchOS3 due to the fact that there's no support for CFNetwork in these versions of watchOS and Firebase is highly dependent on this framework. Source (thanks for the link @FrankvanPuffelen in

WatchKit Extension Bundle ID Unavailable

十年热恋 提交于 2019-12-01 20:16:28
I've added a watch kit app to my iOS app and everything was working fine and running well until I wanted to share data between the two apps. Whenever I try to add the 'App Groups' capability on the watch kit extension, it tells me that my bundle ID (com.myrealappid.watchkitextension) is not available. It also informs me that 'No matching provisioning profiles found' in the General tab, and if I try to fix it, it also says that the App ID (com.myrealappid.watchkitextension) is not available. Logging into the members centre I can't find any reference to a bundle ID with the suffix

iOS - WatchKit how to send message/data from iPhone app to WatchKit app?

醉酒当歌 提交于 2019-12-01 18:53:05
I am creating a WatchKit app and was wondering how to send a message/data from the iPhone to the Watch? I know how to do it the other way around (watch -> phone) using ' openParentApplication:reply: ' and ' application:handleWatchKitExtensionRequest:reply: ' but can't find any documentation on how to communicate from phone to watch. Simple setup would be the iPhone app has a button that when pressed should update a label on the Watch app. Can anyone point me in the right direction? First, you have to enable app groups for your target: Then you can start to write and read objects via

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

♀尐吖头ヾ 提交于 2019-12-01 18:20:54
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 but when we generate IPA from xcode9 size increased to 54.5. You can definitely save space by only