watchkit

XCode 9.3 WatchKit crash on WKInterfaceButton tap

一个人想着一个人 提交于 2019-12-24 13:33:36
问题 A button crashes on tap (watch simulator and real device) : Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) inside the framework/function libswiftCore.dylib swift_getObjectType The button has a “ Sent Action ” defined in the storyboard , but no segue, other buttons work well, adding a segue to the button seems to resolve this issue. This occurs on Xcode 9.3 ( did not occur on previous versions) Any ideas? I want to understand whats causing the crash - hate leaving stuff unresolved. 来源: https:/

Watchkit Maps: show current location

不想你离开。 提交于 2019-12-24 11:22:41
问题 I have made application where we can calculate current location in extention app and I would like to show it at watch. How to do this? There is a methods only to show pin with different color. 回答1: If you have the coordinates for the location you can use - (void)addAnnotation (CLLocationCoordinate2D)location withImage:(UIImage *)image centerOffset:(CGPoint)offset on WKInterfaceMap. Pass in the location for the first parameter and pass in a UIImage for the pin that you want to show for the

App icon is not displaying in Apple Watch App

北战南征 提交于 2019-12-24 05:26:10
问题 I am developing my first iWatch App, i added icons for watch app in Image Assets folder of Application.But when i install app in iWatch, then App icon not displaying. Please find image , which showing app without Icon. 回答1: You have to put the correct icons with the correct size not in the iOS App Xcassests but in the WatchApp Xcassetes. 来源: https://stackoverflow.com/questions/32993946/app-icon-is-not-displaying-in-apple-watch-app

Change color of row programmatically in WatchKit

你离开我真会死。 提交于 2019-12-24 03:46:17
问题 I'd like to change the color of a row in a WKInterfaceTable if it has been selected. I've done these steps but don't know how I can go further: override func table(table: WKInterfaceTable, didSelectRowAtIndex rowIndex: Int) { let row = tableView.rowControllerAtIndex(rowIndex) as! TableRowObject } I hope someone of you guys can help me to do this. 回答1: You can change colour as per row selection, Create IBOutlet of WKInterfaceGroup in rowController and set it to Storyboard with DefaultGroup

Retrieving location on the Apple Watch

半世苍凉 提交于 2019-12-24 03:01:58
问题 I want to get the latitude and longitude of the user and display it on the Apple Watch. I have already included the core location framework in my Watchkit Extension. When I run the program all I get for the lat and long is 0.0 and 0.0 I tested the same method in a class on the iPhone and it worked, and gave me the appropriate coordinates. What am I doing wrong? The .h file: #import <WatchKit/WatchKit.h> #import <Foundation/Foundation.h> #import <CoreLocation/CoreLocation.h> @interface

WatchKit App Submission Error

断了今生、忘了曾经 提交于 2019-12-23 18:31:49
问题 Okay! So here's the deal: I have made an app with WatchKit and archived it but every time I try to submit it, I get the same error: ERROR ITMS-90391: "Missing Icons. No icons found for watch application '********.app/PlugIns/******** WatchKit Extension.apex/******** WatchKit App.app'. Please Make Sure that its Info.plist file includes entries for CFBundleIconFiles." All the *'s are where my app name is which I did not want to share for obvious confidentiality reasons. Here is my Watch App's

Bitcode WatchOS3 - how to generate

北城以北 提交于 2019-12-23 17:13:47
问题 I am attempting to upload a watchOS3 app to the apple store, however I received a rejection (from apple) thats similar the below Invalid Executable - The executable 'someWatch Extension' does not contain bitcode. Once these issues have been corrected, you can then redeliver the corrected binary. How can I resolve this? It seems like bitcode is mandatory as there is no longer a build setting in Xcode for my watch application to simply "Enable Bitcode=No". I have also tried looking into running

WCSession sendMessage in Xcode 7.0 (7A218) Simulator

孤街浪徒 提交于 2019-12-23 16:43:49
问题 I use sendMessage from iWatch (Simulator) to iOS to awake iOS app: NSDictionary *userInfo = [[NSDictionary alloc]initWithObjectsAndKeys:@"userInfo", @"key", nil]; if ([[WCSession defaultSession] isReachable]){ //iPhone is reachable NSLog(@"iPhone is reachable"); [[WCSession defaultSession] sendMessage:userInfo replyHandler:^(NSDictionary<NSString *,id> * _Nonnull replyMessage) { NSLog(@"ReplyHandler run"); } errorHandler:^(NSError * _Nonnull error) { NSLog(@"iWatch sendMessage Error: %@",

Phone call with Watch OS2

老子叫甜甜 提交于 2019-12-23 16:34:22
问题 Is it possible to start a call from the watch using Watch OS 2? I have a button in my watch os2 app and I need a way to start a call to a precompiled number from the watch or at least to start the call in the iPhone. Thanks 回答1: Yes it is possible on WatchOS 2: Apps can initiate telephone calls or SMS messages using the openSystemURL: method of the shared WKExtension object. When you open a URL that uses the tel or sms scheme, Apple Watch redirects that URL to the appropriate system app for

ERROR: “Message reply took too long” sending message to device Watch kit OS 2

£可爱£侵袭症+ 提交于 2019-12-23 12:36:37
问题 Im getting the following error when sending a message from Apple Watch to device Error Domain=WCErrorDomain Code=7012 "Message reply took too long." UserInfo={NSLocalizedDescription=Message reply took too long., NSLocalizedFailureReason=Reply timeout occured.} #import <WatchConnectivity/WatchConnectivity.h> is in both watch and main app targets, and conforms to delegate methods on both watch and device SEND MESSAGE FROM WATCH TO DEVICE Session confirmed as Available Session confirmed as