watchkit

Why sending message from WatchKit extension to iOS and getting back a reply is so slow?

江枫思渺然 提交于 2019-12-06 02:46:26
问题 I am using sendMessage method to send a message from WatchKit extension to an iOS app. It takes about 230 ms on average to receive a reply. The time does not depend on whether the iOS app is on screen or running in the background. 230ms is roughly the time it takes for light to travel the Earth circumference and back. But the phone is sitting 30 cm from my watch when I am testing this. Questions : Why is it so slow? Is it supposed to be so slow? Is there a way to make it faster? An

Can we create multiple glance interfaces in a single Watchkit app?

我只是一个虾纸丫 提交于 2019-12-06 02:26:27
I am trying to create a WatchKit App that needs to show multiple pieces of information to the users in form of glances.Is there a way to create multiple glances in such an app. You cannot make more than one glance per application But nothing prevents you from creating one glance, that will contain all possible states of "each glance type", and then, in runtime perform hide/show of specific components of the glance. Glance Top Group State1 State2 (hidden) StateN (hidden) Bottom Group State1 State2 (hidden) StateN (hidden) There could be only one glance in a WatchKit App. Try to put another

handleWatchKitExtensionRequest not responding to openParentApplication in Watchkit Extension (Swift)

亡梦爱人 提交于 2019-12-06 02:06:39
问题 I am trying to send information from my WatchKit App over to my main parent application and from what I understand I should just be able to use openParentApplication in my watchkit Extension which will be received by handleWatchKitExtensionRequest in AppDelegate.swift, but I cant seem to get handleWatchKitExtensionRequest to be triggered. I've been having some issues, so at this point I'm just trying to establish any connection at all before worrying about what information is actually passed.

How to send data from Iphone to Watchkit in OS2 in SWIFT

妖精的绣舞 提交于 2019-12-06 01:02:35
问题 I want to send a dictionary from iPhone to Watchkit in watchOS 2. In watchOS 1 it works fine for me with appgroups but in watchOS 2 I know that we have to use WCSession but I don't know how to use it. Please help me find the solution. 回答1: This blog post should help you out. From that post: First, you'll create and activate a WCSession like so: if (WCSession.isSupported()) { let session = WCSession.defaultSession() session.delegate = self session.activateSession() } For transferring a

Fixing “Install of Apple Watch Application never finished”

ε祈祈猫儿з 提交于 2019-12-06 00:18:14
For the past 4 weeks, I've had no success in testing a Watch app for my current app project. Initially, I was using Xcode 7 beta 5. However, I'm noticing this behavior in the Xcode 7 GM as well. I created a radar for this with Apple, but they closed it as a duplicate without explaining how to fix this. I have already reviewed the questions here and here , and have attempted every answer they have suggested. But the issue still isn't resolved. My issue: I have an existing iPhone application. I created a new target for the Apple Watch, targeting watchOS 2. I have not touched anything in the

TestFlight doesn’t support apps with Watchkit extension

China☆狼群 提交于 2019-12-05 23:18:12
问题 After uploading the app via adHoc deployment I see this message on the iTunesConnect. "TestFlight doesn’t support apps with Watchkit extension" Does anyone have a idea why this is shown and what is the solution? 回答1: Looks like Apple TestFlight is not yet ready for WatchKit apps. You can temporarily disable WatchKit extension inclusion by deleting this row from main iOS app General Settings: 回答2: The only way is via old school Ad Hoc or enterprise signing (and HockeyApp) 回答3: There is

Migrating NSPersistentStore from application sandbox to shared group container

为君一笑 提交于 2019-12-05 20:53:11
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; __persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self

iWatch: WKInterfaceLabel is it possible to stop text from being cut off with “…” at the end of a label?

笑着哭i 提交于 2019-12-05 20:04:44
The text in my WKInterfaceLabel is way too long and causes the text to be cut off with dots at the end. I know for UILabel for iOS you can easily resolve this issue by enabling clip mode. I don't believe there is any way for me to resolve this for watchkit. This is going to force me to use an Image if I can't prevent the text from being cut off. Any tips or suggestions is appreciated. You have a couple options depending on how you want the view to respond. In your interface story board select your label and open the attributes inspector. Your first option is to change the font to a smaller

watchOS 2 working with CocoaPods

╄→尐↘猪︶ㄣ 提交于 2019-12-05 18:30:19
Has anyone gotten CocoaPods working with watchOS 2? I tried using ‘use_framework!’ with ‘platform :watchos, ‘2.0’ but it says "[!] Invalid Podfile file: Unsupported platform watchos2 . Platform must be :ios or :osx .. Updating CocoaPods might fix the issue.” I am on the latest version of CocoaPods. CocoaPods currently doesn't support watchos. There is a work in progress issue here for adding support for it. CocoaPods released new version which is 0.38.0 and now supports watchOS 2. http://blog.cocoapods.org/CocoaPods-0.38/ According to the blog above, deployment target can be set to watchOS 2

watchkit extension not starting

假装没事ソ 提交于 2019-12-05 18:23:57
I cannot start iOS Watch App on simulator. Installed latest Beta 6.2 on Yosemite 1) I create a single view based application, 2) Add App Watch target 3) Extension and Watch App automatically created 4) Run App and start simulator and enable Apple Watch simulator 5) Switch Scheme to app Watch App and start Run Xcode status bar showing Running App...... and never jumping to second step of Running App extension, so nothing is showing on Apple Watch!! Kostiantyn Koval 1. Select you "... Watch App" Run it on iPhone 5 simulator and higher (watch simulator not working with iPhone 4s) 2. Go to