watch-os-2

How to populate table rows, using a [String] array sent from iPhone by Watch Connectivity?

元气小坏坏 提交于 2019-12-08 11:22:23
问题 Basically, it's passing the array fine. It's just when trying to use the enumerated array as the tablerows, it says nil found. PHONE import UIKit import WatchConnectivity class ViewController: UIViewController, WCSessionDelegate { @IBOutlet weak var sendButton: UIButton! var watchSession: WCSession? var arrayCustom = ["thing1", "thing2"] override func viewDidLoad() { super.viewDidLoad() if(WCSession.isSupported()) { watchSession = WCSession.defaultSession() watchSession?.delegate = self

Force reload watchOS 2 Complications

大城市里の小女人 提交于 2019-12-08 06:01:44
问题 I have issues getting Complications to work. It would be helpful if I was able to reliably refresh them. Therefore I linked a force-press menu button to the following method @IBAction func updateComplication() { let complicationServer = CLKComplicationServer.sharedInstance() for complication in complicationServer.activeComplications { complicationServer.reloadTimelineForComplication(complication) } } Unfortunately this leads to the app crashing. with a fatal error: unexpectedly found nil

Combining WatchConnectivity and Complications

戏子无情 提交于 2019-12-08 04:57:46
问题 I want my complication to get data from the iPhone via Watch Connectivity. I am using sendMessage Instant Messaging technology. I don't want my iPhone app to be open when I try to get data, so this needs to work in the background. In my ViewController on my iPhone: import UIKit import WatchConnectivity class ViewController: UIViewController, WCSessionDelegate { var session: WCSession! override func viewDidLoad() { super.viewDidLoad() if WCSession.isSupported() { self.session = WCSession

Apple watchOS 2 Accelerometer

ぃ、小莉子 提交于 2019-12-07 16:18:19
问题 I am thinking of making a watchOS2 app that uses the accelerometer. If the app is running in the background, will it still be able to receive input from the accelerometer or CMMotionManager ? 回答1: You are able to access live accelerometer data only when the watchOS2 app is running. You could however access accelerometer historical data, i.e accelerometer data from when your app was in the background. Watch this WWDC talk for more information: Whats new in Core Motion 来源: https://stackoverflow

Xcode 7.0 Beta fails to launch a watchOS 2 App on Apple Watch

依然范特西╮ 提交于 2019-12-07 03:58:47
问题 Tried a public sample code project and my own project. Observe no problem with watchOS 1. watchOS 2 App installs and operates successfully on the real Apple Watch and the simulator, but it won't support the debug mode launching the app on the device by Xcode. Tried to allow the system to create the Provisioning files and manually create the Provisioning files for the development mode. Test on 10.10, 10.11. Steps to Reproduce: Set up the Provisioning files on build settings, watchOS 2

Where to find Taptic feedback API documentation or capabilities for watchOS 2?

十年热恋 提交于 2019-12-06 18:58:22
问题 I'm interested in building an app for watchOS 2 using haptic feedback. Currently I do not have the Apple Watch, but I have access to the Apple Developer Program. I've tried looking at the watchOS Developer Library and watchOS 2 Release Notes. I do not see any mention of how to access the Taptic engine programmatically or what it is capable of in the current watchOS 2. How can I access the Taptic engine programmatically or understand what the new Taptic API is capable of doing? 回答1: You can

apple watch http request

三世轮回 提交于 2019-12-06 10:27:57
问题 Using import, I can use this module for iPhone, but not for apple watch app.I also want to use this library for writing apple watch app. Is it possible? If possible, how? Can you please provide an alternative if it is not possible? Thanks beforehand Simple example of http request for iPhone import Alamofire Alamofire.request(.GET, requestUrl, headers: self.headers(), encoding:.JSON).responseJSON { (rJ) -> Void in let data = rJ.result.value let err = rJ.result.error } 回答1: Sample Http request

Play Video From URL in WatchOS 2

半腔热情 提交于 2019-12-06 10:13:20
问题 So recently Apple® released the second operating system for their Apple Watch®. With this update, Apple Watch® can now have HTTP requests and internet connection by itself. They added the WKInterfaceMovie Which loads a video from a url with the method " - setMovieURL: Declaration (New in watchOS 2.0) SWIFT func setMovieURL(_ URL: NSURL) OBJECTIVE-C - (void)setMovieURL:(NSURL * _Nonnull)URL " If I input a URL with any .mov video online. The WKInterfaceMovie closes automatically. Sometimes the

WatchKit CoreLocation issue

寵の児 提交于 2019-12-06 05:16:38
问题 I am trying to read current location coordinates in WatchKitExtension ExtensionDelegate. This does though not return any value. The very same code used in WatchKitExtension InterfaceController does return the location. (tried this out of desperation as I could not find an error in the code) I would need to perform this code in ExtensionDelegate as I would like to pass the retrieved location on to a ClockKit Complication. Here the code in ExtensionDelegate: (after self.locationManager

Apple watchOS 2 Accelerometer

痴心易碎 提交于 2019-12-06 04:04:39
I am thinking of making a watchOS2 app that uses the accelerometer. If the app is running in the background, will it still be able to receive input from the accelerometer or CMMotionManager ? You are able to access live accelerometer data only when the watchOS2 app is running. You could however access accelerometer historical data, i.e accelerometer data from when your app was in the background. Watch this WWDC talk for more information: Whats new in Core Motion 来源: https://stackoverflow.com/questions/31361439/apple-watchos-2-accelerometer