Stand-alone Apple Watch app - CoreBluetooth - swift

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.

Related

How do I submit the iWatch app to the App Store?

I want to submit iWatch app on appstore.
But I can't find the option for iwatch.
Can you please help me for this?
Thank you.
When you create a new Watch App project (not an iOS App with Watch App), note that it creates a Watch App target, a Watch Extension target, AND an almost empty iOS App target (no code, storyboards, xcassets, but under build phases it is dependent on the Watch App and embeds the Watch app).
On App Store Connect, you create a new iOS app project for your independent Watch app, but only fill in the data related to the Watch part of the project.
Archive and upload your project as you normally would a standard iOS project.
Voila! (And yes, that is not intuitive).
find more here and here
Yes, it's possible to submit on the existing iOS app.
But you need to create the watch app bundle ID from iOS app ID.
alright, it's possible to submit as a watch version on existing iOS app.

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.

Something like shared NSUserDefaults and App Groups in watchOS 2?

I am currently updating an app of mine for watchOS 2 and got some trouble with communication between the devices: previously I had been using shared NSUserDefaults to enable both the Watch and the iOS device to read and write several values from one App Group independently.
Now that watchOS 2 apps are running natively on the Watch and the Watch Connectivity Framework replaced previous communication options, this no longer seems applicable. However, from what I read on the reference, implementing the same functionality I had in watchOS 1 with Watch Connectivity is rather cumbersome…
Is there any other option for me to create some sort of container/file/database/whatsoever that I can access and update from both my Watch app and the related iOS app?
With watchOS 2 both the WatchKit App and Extension run natively on Apple Watch, so even if you use shared user defaults or app groups the data you put inside them will be on the watch and so not accessible from the iOS app.
To send data to the watch you can use the WatchConnectivity framework, or use a NSURLSession to download data from a server if that's your case.

Can I build a stand alone Apple Watch app?

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:

Releasing iPad app, after iPhone App is in the store

I have developed an iPhone app and preparing to upload it to iTunes store.Later on I want the iPad version of the app as well which I am currently working on.
So I would like to know whether it is possible to release the iPad app later as an update to the existing app in the store?
So long as the iPad version is part of a universal bundle (iPhone and iPad resources in the same app) it would be treated as an update.
I don't believe you can. However, I think that you may be able to update it to a Universal application.
Most people just make the iPad version separate and call it App HD or provide universal versions.
Yes. You can make it Universal with an update, but you can't stop support a device after you published a universal app!
If you want to upload a different iPad-Version (e.g. AppXY HD) you can also create this in the same Xcode project and upload them as different versions.