watchkit

WatchKit Extension Provisioning Profile?

人走茶凉 提交于 2019-12-07 15:53:25
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/***/IntermediateBuildFilesPath/UninstalledProducts/*** Watch App.app/_WatchKitStub/WK warning:

watchkit extension not starting

那年仲夏 提交于 2019-12-07 14:15:21
问题 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!! 回答1: 1. Select you "... Watch App" Run it on

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

给你一囗甜甜゛ 提交于 2019-12-07 13:38:29
问题 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. 回答1: You have a couple options depending on how you want the view to respond. In your interface story board

Watchkit animation implementations: clock face, animated charts, circular progress bar

陌路散爱 提交于 2019-12-07 13:24:41
问题 I've seen some very basic demos of potential watchkit apps, and some appear to implement animations. Examples might be: A clock face with a moving second hand or even minute hand. A bar chart with bars that animate in, or who shape changes with new real-time data. A circular progress bar who's bar animates from zero to the current value. The only way I've seen so far to do animations is by a sequence of images over a duration: [imageView startAnimatingWithImagesInRange:NSMakeRange(0, 60)

How to hide the back button from the status bar on the Apple Watch?

你离开我真会死。 提交于 2019-12-07 11:59:08
问题 I want to hide the back button from my Apple Watch app from the status bar. I used the programmable segue to navigate. But I want to to hide/disable the back button. Is it possible? 回答1: This is how you do it: WKInterfaceController.reloadRootControllersWithNames( ["myInterfaceController"], contexts: [] ) Where myInterfaceController is the identifier of the destination Interface Controller. Thanks to Harvant for the pointer. 回答2: If you check the docs for WKInterfaceController , you'll see

Timer not firing every second on WatchKit

对着背影说爱祢 提交于 2019-12-07 10:27:55
问题 This timer isn't firing every second, when I check the log and UI it seems to be firing every 3-4 seconds. func startTimer() { print("start timer") timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(timerDidFire), userInfo: nil, repeats: true) } func timerDidFire(timer: Timer) { print("timer") updateLabels() } Is this just something that is going to happen on the Watch due to lack of capabilities, or is there something wrong in my code? Here is the log if needed :

Page number in Page-Based Interface with WatchKit (Watch)?

怎甘沉沦 提交于 2019-12-07 10:08:37
问题 I created a WatchKit app with a Page-Based Interface. There are 3 pages and each one is connected to my InterfaceController.swift class (which extends WKInterfaceController ). My question: inside InterfaceController.swift how can I detect the page number of the current view? 回答1: If you use func presentControllerWithNames(_ names: [AnyObject], contexts contexts: [AnyObject]?) You just have to pass the number of the page in the context, so you can store it, and retrieve it later on. This is

How to share data between iPhone and Apple Watch using groups?

十年热恋 提交于 2019-12-07 10:03:47
问题 i am new to Watchkit development and unable to find solution to share data between iPhone and iWatch, please help me i am looking to share data using groups. 回答1: We can pass the data between iPhone & iWatch using groups. Basically iWatch can not do any processing and we need to share the data. We can share data using the NSUserDefaults . But for that you need to enable Appp Groups from capabilities section in both your project target and your iwatch app target, as showed below Below is the

Apple Watch Not Passing Data to iPhone - Swift

☆樱花仙子☆ 提交于 2019-12-07 07:29:22
I'm trying to pass a String from my Apple Watch to an iPhone but it seems like it's not connecting. Here's my code: ViewController.swift : import UIKit import WatchConnectivity class ViewController: UIViewController, WCSessionDelegate { @IBOutlet weak var lablel: UILabel! var string = "Hello World" let session = WCSession.default() override func viewDidLoad() { super.viewDidLoad() session.delegate = self session.activate() } func session(_ session: WCSession, didReceiveMessage message: [String : Any]) { let msg = message["StringValueSentFromiWatch"] as! String lablel.text = "Message : \(msg)"

WatchKit Notification Sash Color

你。 提交于 2019-12-07 04:01:10
问题 I've set my notification sash color in storyboard and it works fine in the simulator, but it shows up as gray on my watch. Does anyone know if this is a known issue or do you need to do something at runtime on a real device to show the color properly? 回答1: The sash color is set for the WKNotificationCategory in the storyboard, which has a name. (In your screenshot "myCategory"). Then, for the correct sash color to appear on the real device, the push notification needs to have the matching