apple-watch

WKInterfaceSwitch or WKInterfaceButton in a table row — which row was touched?

你。 提交于 2019-12-11 02:06:11
问题 I have a table in my Apple Watch app with rows that include a WKInterfaceSwitch. There are 10 rows of the same row controller, which includes a switch. In other words, there are 10 switches in 10 different rows of a table where each row is an instance of the same row controller. When a user touches a switch and changes its state, the action method is called, but a reference to the switch is not passed, only its new value. Similarly for WKInterfaceButton -- unlike UIKit, no reference is passed

WKInterfaceTable inside WKInterfaceGroup with static BG image behind?

半腔热情 提交于 2019-12-11 01:29:56
问题 I’m trying to display a static background image behind a scrolling WKInterfaceTable , that could contain one or more rows. I’m trying to do this by placing the table inside a WKInterfaceGroup , and setting that group’s background image. The issue is that if I set the group’s height to “Size to fit content”, the table will not scroll, and if I set the group’s height to “Relative to container”, the image does not take up the full display if there is only one row. Is there a clever way around

How can I get a [Glance] Interface Controller / blank slate for Apple Watch?

时光总嘲笑我的痴心妄想 提交于 2019-12-10 23:16:31
问题 In the default storyboard for an Apple Watch application, the Interface Controller has a black rectangle at the top with the time, and the Glance Interface Controller has two Groups. I would like for both to have the viewport completely covered by my imagery, with a background image that exactly fits the Apple Watch viewport, and a UIImageView portraying a partially transparent PNG, rotated and translated. I've so far tried and failed to find out how to manipulate XCode's UI to delete e.g.

How to get the Apple Watch hardware identifier?

蓝咒 提交于 2019-12-10 22:41:45
问题 This page http://theiphonewiki.com/wiki/Models seems to suggest that the identifiers for the new apple watches are "Watch 1,1" and "Watch 1,2" Does anyone know how to get this identifier in code for a connected watch? [WKInterfaceDevice currentDevice] seems to only give me the screen bounds. 回答1: There is no WatchKit method to obtain the hardware identifier. To distinguish between the 38mm and 42mm Watches, an Apple employee in the dev forums recommended using the screenBounds property on

The apple watchkit app showing error “The operation couldn't be completed. (LaunchServicesError error 0.)”

百般思念 提交于 2019-12-10 16:36:42
问题 The apple watchkit app is not launching on simulator. After renaming target always getting the message "The operation couldn't be completed. (LaunchServicesError error 0.)". 回答1: Another reason for this, is to have two different targets of WatchKit App in the same project. Attached capture from Console.app: 回答2: Be sure you didn't change anything in WatchApp plist file. You should have same bundle identifier (with .watchkitapp suffix) and WKCompanionAppBundleIdentifier. And same for

iOS - App icon is not showing in Watch Companion app

早过忘川 提交于 2019-12-10 16:27:25
问题 For some reason my icon of app has never appeared in companion app for Apple Watch . Icon is appearing in iPhone and Apple Watch Dashboard. I have provided 58*58(29*29@2x) and 76*76(29*29@3x) which are required for Companion Settings. From Target Watch, i have selected my asset for Apple Watch. After doing all that still the icon is not appearing in Companion Settings. What i need to do to make it appear? 回答1: The WatchKit does not share the Images.xcassets file from the main target app. When

Apple Watch base localisation shows wrong default language

女生的网名这么多〃 提交于 2019-12-10 14:49:11
问题 I have an app localised in three languages (Simplified Chinese, French and Czech) with English as the development language. While the localisations work perfectly on the iPhone, there is an issue with the Apple Watch: If a user has set the Watch language in any other language than English/French/Chinese/Czech, then the content is shown in Chinese instead of English (that should be the default). According to this Technical Note: If none of the user’s preferred languages are supported by your

Xcode - Error launching WatchKit Extension

♀尐吖头ヾ 提交于 2019-12-10 14:07:16
问题 I've successfully built a basic Watch/iPhone app and am getting the following error when trying to run on my devices: "Error Launching 'app_name WatchKit Extension' The operation couldn’t be completed. Unable to launch because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user." The app does install to the watch/phone, but I want to use the extension to view console output while running the app. I am using automatic

Watch OS 2 Issue to set an Image

橙三吉。 提交于 2019-12-10 13:27:37
问题 I just want to add an image to my WKInterfaceController but... Xcode tells me : Unable to find image named "circle44" on Watch @IBOutlet var cirlceImage: WKInterfaceImage! override func awakeWithContext(context: AnyObject?) { super.awakeWithContext(context) cirlceImage.setImageNamed("circle44") } 回答1: Okay I found the result the image have to be in your WatchKt App not on your Extension. And with the addition of app thinning the watch no longer searches for 1x images as they should all be 2x.

Apple Watch Simulator not Vertically Scrolling

半腔热情 提交于 2019-12-10 11:56:51
问题 I created a basic table on my Apple Watch App, with a table row element in a group element which gets populated programatically by iterating over a simple array. The table displays in the simulator, but I cannot get it to scroll vertically through all the table entries. Have I missed something or does the simulator not support this action? Followed the tutorial here http://natashatherobot.com/watchkit-create-table/ 回答1: Is your table contained in a WKInterfaceGroup , by any chance? That would