Mohit Tomar
Mohit Tomar

Reputation: 5201

Can I create only an apple watch extension ( No UI or App for Watch)?

I'm creating a workout app for iOS for which I need support from the apple Watch. but I don't wanna have any UI on the apple watch. Is it possible to create an apple watch extension without UI or app?

Upvotes: 1

Views: 193

Answers (2)

Seyed Parsa Neshaei
Seyed Parsa Neshaei

Reputation: 3520

Users should have a way to launch your app in order to run your extension. Running standalone extension is not possible without having an icon in Watch home screen, and tapping that icon brings the user an Interface Controller, or else they will not have a good feeling having an app that just does something and returns back to the home screen.

No watch extension can run on its own, because all the code starts from an let's say awakeWithContext() method and then continues. There is nothing like void main() or similar things that get launched without the need of a UI.

You could minimize UI for watch, but it should have one. To run workout you need to access HealthKit and WatchKit frameworks which all can be used in an InterfaceController file which connects to UI part of your Watch App.

If you don't want to emphasize Apple Watch UI you could just use HandOff/WatchConnectivity or other way of connection and have a blank screen which itself runs awakeWithContext in order to log workouts.

Summary

There is no way to do something like recording workouts without Watch UI.

Upvotes: 2

Allan
Allan

Reputation: 7353

There is no way to record workout data with Apple Watch without a UI application running on the watch.

Upvotes: 1

Related Questions