Questions tagged [watchkit]

WatchKit is an integral part of the Apple Watch experience for third-party applications. It contains the classes for creating Apple Watch applications and it ensures that an Apple Watch application can talk to its corresponding WatchKit extension.

WatchKit allows iOS developers to create rich, third-party app extensions with actionable items and notifications for the Apple Watch, as they've built apps for the iPhone and iPad.

More information on WatchKit:

3223 questions
1
vote
1 answer

Why doesn't print() work when sending a message via Apple Watch To iPhone?

I am learning how to create a companion Watch App for an iPhone app. (Everything is being done on the simulator) I am sending a message when I tap a button on the Watch app. session.sendMessage(["Message": "It Worked" ], replyHandler: nil) {…
Ian Kohlert
  • 484
  • 1
  • 4
  • 15
1
vote
1 answer

Apple Watch Force Touch Menu

I just recently noticed it is possible to add a force touch gesture to my watch app. I've added a Menu and 3 Menu items... as seen here: Although, when I force touch, the menu does not come up. Do I need to do something else to get this thing…
digit
  • 197
  • 9
1
vote
0 answers

Why does watchkit app restart when no longer visible?

I am working on an app that is regularly performing web requests, I noticed that the requests were performed when I exited the app. So I created an empty project to check if the issue came from me or not. As you can see the willActivate() function…
Lawris
  • 965
  • 2
  • 9
  • 21
1
vote
1 answer

Carousel in watchOS

I would like to do a sort of carousel within an Apple Watch app where cards still scroll vertically, however when not on screen they are sort of in the background in a sense. This would involve shrinking groups and their content based on their…
J.Doe
  • 1,502
  • 13
  • 47
1
vote
1 answer

How to delete "cancel" button when you use the segue on watchkit?

I want to implement the following function. 1, click one from table object. 2, display page based interface controller without the “cancel” button in the top left corner. I think this function is implemented in Apple workout app. In other words,…
sakai
  • 21
  • 2
1
vote
1 answer

How to get the data that you wear the Apple watch on your left-hand or right-hand

I want to get the data that you wear the Apple watch on your left-hand or right-hand. In addition, I hope to know the way to get the data that your Digital Crown is on the right or left of the Apple watch. However, I cannot find the way to do…
sakai
  • 21
  • 2
1
vote
1 answer

Can I build one iPhone app that manages 100 Apple watches that I provide customers?

I know that Apple Watch apps can not be standalone. But my issue is that I want to give out Apple watches to research subjects say In a hospital or athletes at a track meet and monitor their heart rates. They do not have iPhones. The watch is the…
user798719
  • 9,619
  • 25
  • 84
  • 123
1
vote
0 answers

Swift, awake function, how do I make sure this code is only called once?

In my controller, I have a button that reloads the controller with the following code, to hide the back button: WKInterfaceController.reloadRootPageControllers(withNames: ["Record"], contexts: [], orientation: .vertical, pageIndex: 0) When this…
toast
  • 1,860
  • 2
  • 26
  • 49
1
vote
1 answer

HKObjectQuery Won't Stop

I am trying to create a nice user experience for doing workouts on my app using an Apple Watch. I can start an HKWorkoutSession on my watch and stop it fine, in the foreground and in the background. My problem is that the HKObjectQuery does not…
Myk
  • 979
  • 6
  • 16
1
vote
0 answers

Include APS payload data in local notification to watchOS

I'm trying to display a custom Long-Look UI when receiving a local notification on my watch extension. I tested this sample .apns payload: { "aps": { "alert": { "body": "Test message", "title": "Optional title" …
1
vote
0 answers

Sharing data between a WatchKit App and the containing iOS App is not working

I'm trying to share file originally generated in watch App Extension but it's not working. I am using iOS 11.3 and Watch 4.3. I am also using Simulator. I have done like this Enable App domain in Main app and Watch App Extension. App domain in…
Abhishek Thapliyal
  • 3,497
  • 6
  • 30
  • 69
1
vote
1 answer

Changing WKInterfaceLabel Text

I currently have: @IBOutlet var label: WKInterfaceLabel! and let myString = "Swift Attributed String" let myAttribute = [ NSAttributedStringKey.foregroundColor: UIColor.blue ] let myAttrString = NSAttributedString(string: myString, attributes:…
user2537535
  • 43
  • 1
  • 5
1
vote
1 answer

Apple watch forces open app in foreground on iphone on particular screen?

Is it possible to make apple watch force opening iphone app and/or opening on particular screen? I have already found out that it runs app in background (but doesn't show that the app is already launched) and even can download data. When I tap the…
1
vote
1 answer

How to set up an HKWorkoutSessionDelegate that is not an InterfaceController

Most of the HealthKit sample code uses an InterfaceController to serve as a HKWorkoutSessionDelegate however I'm trying to set up a HealthStoreManager class that will serve as a HKWorkoutSessionDelegate and take this business logic away from any of…
GarySabo
  • 5,806
  • 5
  • 49
  • 124
1
vote
0 answers

Update watch interface when user changes settings in the Watch App on his iPhone

When a user changes settings in the Watch App on his iPhone I want my app interface on the users watch to be updated accordingly. I followed all the instructions in the following tutorial and created a shared watch-setting.bundle and added a…
user1242574
  • 1,257
  • 3
  • 12
  • 29
1 2 3
99
100