Can I build a stand alone Apple Watch app? - apple-watch

In WWDC 2015 it is mentioned that watch supports native apps but I fail to see the option in new Xcode 7 for the way to just build an apple watch app without the companion app. Please let me know the way to do so, if it exists.

In fact, watchOS apps are linked to the iOS companion app.
In both versions, each watchOS app has two targets: WatchKit App - which contains storyboard, icons, etc - and WatchKit Extension, which contains the code.
In watchOS 1 (old WatchKit) + iOS 8 combination, WatchKit App is installed on Apple Watch, and both WatchKit Extension and iOS app are installed on user's iPhone.
In other way, in watchOS 2 + iOS 9 combination, both WatchKit App and WatchKit Extension are installed on user's Apple Watch, and iOS App is the only code and view installed on iPhone.
Running iOS app only requires one target, so it can run without Apple Watch (since the first iPhone OS).
But running watchOS apps needs both WatchKit App and WatchKit Extension. In watchOS 1 (the old WatchKit) because one is on iPhone and other on Apple Watch, so running apps need connecting between them with Bluetooth, so you have to carry your iPhone nearby. In watchOS 2, both are on Apple Watch, so running apps does not need connecting to iPhone and having iPhone nearby. You can connect them with WatchConnectivity framework included in watchOS 2 SDK (in Xcode 7).
So in watchOS 2 apps can run standalone, but they are not standalone at all. They install on Apple Watch when installing on iPhone, and they can connect with each other. When you create a new watchOS App, you must include it with your iPhone app when submitting it to the iTunes Connect.
NOTE: This makes watchOS apps faster and more reliable.

You can't build native watch apps yet. Maybe in a later build of Xcode 7, but so far all Apple has announced is that "at some point in the near future" you will be able to build a native Watch app.

In watchOS 2, watch apps are "native" in the sense that the WatchKit extension now runs on the Apple Watch instead of the user's iPhone. This means it can no longer share data with the iPhone app using shared app groups but must instead use the new Watch Connectivity framework to pass data back and forth. It also means that watch apps can be much faster and much more capable without the phone being present.
However, a watch app must still be bundled with a companion iOS app, at least for this year.

In iOS 13 it's possible to create independent watchOS application. More information can be found here. You have to download Xcode 11 to be able to create independent watchOS application.
To create it simply go to File -> New -> Project and select watchOS -> App as it's shown on a screenshot:

Related

No IAP Capability for Independent WatchOS App in Xcode

I can't find the In App Purchase capability in Xcode to add to my Independent WatchOS App (i.e. no iOS app). The bundle ID has the capability naturally (I enabled it when registering it) but the option is not in Xcode (only Apple Pay). How do I add IAP to my watch app now? Without a 3rd party extension?
There is no need to add an In-App Purchase (IAP) capability in Xcode to an independent watchOS app. However, your watch app must target watchOS 6.2 or later.
You can setup your specific IAP's in App Store Connect to get their product ID's.

How to release only independent Apple Watch app to App Store from combined iOS/Watch Xcode project

I used the iOS app with Watch app Xcode template and plan to eventually release both an iOS app and Apple Watch app. The Apple Watch app is simpler so I'd like to release just the watch app on the App Store initially.
Is it possible to just release the Watch app portion of an Xcode project to the App Store?
First of all You need to have three target at least, iOS app, WatchOS app, and Watchkit Extension app.
Select watch app and make sure Build identifier follows the pattern .watchkitapp (example: com.ryanwatchapp.app.wathckitapp)
Select watchkit extension app and make sure Build identifier follows the pattern .watchkitapp.watchkitextension (example: com.ryanwatchapp.app.wathckitapp.watchkitextension)
Other processes are same like iOS apps; archive,increase the build number and submit.

Stand-alone Apple Watch app - CoreBluetooth

Is it possible to create an Apple Watch application without a need of an iPhone app ? I want to create a simple app that uses the bluetooth framework of the Apple WAtch and search for near devices. (without having an iphone around). Thank you
In iOS 13 it's possible to create independent watchOS application. More information can be found here. You have to download Xcode 11 to be able to create independent watchOS application.
To create it simply go to File -> New -> Project and select watchOS -> App as it's shown on a screenshot:
Be aware that even though it's possible to create indepentent watchOS app (e.g. with CoreBluetooth) there will be some limitations with methods usage. For example it's not possible to call this method of CBMutableService:
- (instancetype)initWithType:(CBUUID *)UUID primary:(BOOL)isPrimary NS_DESIGNATED_INITIALIZER __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
You cannot create a watchOS application without an iOS app. First of all, you can only add a Watch extension to an existing iOS project in Xcode. Secondly, even if you could create a standalone watchOS project in Xcode, you wouldn't be able to publish it to the AppStore, since each WatchKit app needs to have a functioning iOS counterpart to be accepted in the AppStore, so you cannot just create a dummy iOS app.

Installing Apple Watch OS 2 App on Apple watch without iOS device

I have created a demo standalone app for Apple Watch OS 2 and It works fine in the simulator. I know the steps to install watch os 1 apps via your device but in my case I don't see Apple watch device in Xcode to run my app.
Below is the error I am seeing when I try to run it on the paired iPhone
https://www.dropbox.com/s/c4qx3gdbep15s61/Screenshot%202015-08-20%2013.19.33.png?dl=0
There are many tutorials on building apps for Watch OS 2 but I couldnt find any info on installing it directly on watch. Am I missing something here?
You’ll build watch apps for watchOS 2 as extensions, just as you might build a share extension. These are dependent apps—the Apple Watch can’t install them without a paired iPhone.
That may sound weird but below are the three main parts of apple watch
iOS app: This is the "host" application that runs on an iPhone or iPad. You can never run an app on the Apple Watch without a host app.
Watch app: This is the bundle of files and resources that is included with the host app but then installed on the Apple Watch. The bundle includes the app’s storyboard and any images or localization files used in the storyboard.
Watch extension: The last piece of the puzzle is the actual code that you write. This gets compiled and transferred to the Watch for execution. Any images or localizations accessed in code should be bundled with the extension.

The os version installed on apple watch does not support the watchkit app prodct

I am using Xcode 7. My apple watch app works fine in the simulator. It also can be successfully built on device. However, the app seems not to be installed neither on iPhone 5 or apple watch (1.0).
The iPhone and watch pair is ineligible. And it states "The OS version installed on apple watch does not support watchkit app product. I tried everything in SwampThingTom's Question, but I still change the status of the phone-watch pair. The app on phone without watch works well. The problem only comes when watch is included to test app on watch. Does it mean something is wrong with apple watch?
I am new in app developing. Can anyone help me? I appreciate any help.
Since you marked your question with watch-os-2, it is possible that this is correct and you develop against watch OS 2.
If this is the case: you can't run a watch OS 2 app on watch OS 1.
I see to ways to tolve this:
You could set your development target to iOS 8.x and Watch OS 2.
Or you could wait a few weeks until you can install the new OS version on your devices. Since developing for watch OS 2 is much more fun I'd suggest the latter.