Implications of converting dependent watchOS app to independent with watchOS 6 - ios

I am considering updating to an independent app for watchOS 6 (as Apple suggests) but it's not clear to me what will happen to users of older watchOS versions that have my app installed. More specifically:
What will happen if a user had the dependent app installed on their watchOS 5 watch but downloads an update of the iOS app (which now lists the watch app as independent) for their connected iOS 13 iPhone? Will the watch app be uninstalled or not function at all (since it will try watch connectivity with an iOS app that no longer supports it)?
This will definitely occur, since, according to official page:
watchOS 6 will be available for Apple Watch Series 1 and Apple Watch Series 2 later this fall.

I think this is not a hard question. An independent app means that the app can work alone. But it doesn't have to. An independent watchOS app should work with or without the iOS companion app. If you watchOS app can't work properly without iOS companion app, it is not an independent app. You should refactor your Apple Watch Extension or just leave it as not independent.
Here are what I believe should be true:
If you installed an Apple Watch app with its iOS companion app, both apps are removed if you remove the iOS app.
However, if the Apple Watch app is independent, you could installed it alone without install the iOS companion app.
For the second rule, there are some pitfalls as a developer. When you are debugging an independent watch app, it is listed in Watch app on iPhone. However, since there is no iOS companion app, you can't remove it entirely on iOS. Even if you have removed it on Apple Watch, it is still shown as not installed in Watch app.

Related

Have anyone worked on migrating an iOS app with Watch OS1 to Watch OS2 or higher versions which share data between iPhone & Watch

Have anyone worked on migrating an iOS app with Watch OS1 to Watch OS2 or higher versions. I have used Coredata & Appgroups for sharing data between iPhone app and watch app. Now in the newer Watch OS 2(& above) Apple no longer supports Appgroups to share data across iPhone app & Apple Watch app. Could you please help me in this.
I need to use Coredata to share data between the targets without having Appgroups.
Implement two-way communication between your Apple Watch app and the paired iPhone app with the Watch Connectivity framework.
Apple provided the sample code here
for connectivity between apple watch app and iphone app using latest OS version.
Apple OverView
Most Apple Watch apps require an exchange of data with a paired iPhone app. This sample demonstrates how to use the Watch Connectivity APIs to:
Update application contexts
Send messages
Transfer user info and manage the outstanding transfers
Transfer files, view transfer progress, and manage the outstanding
transfers
Update current complications from iOS apps
Handle Watch Connectivity background tasks
On watchOS 1, the watch app was an app extension that actually ran on the paired phone and the watch simply acted as a remote display. This is why it was possible to share data using an app group, just as you can with any other extension.
From watchOS 2.0 onwards the watch app executes on the watch itself so the watch app and the companion app no longer share a file system.
In fact, where possible, users should be able to use the watch app even when the watch isn't near the paired phone. This means that you need to adopt an asynchronous data sharing approach between the watch and phone apps
You will need to use the Watch Connectivity Framework for your app.

Can an iOS app be added later to an Apple Watch only app?

Beginning with WatchOS 6 Apple makes it possible to ship Watch-only apps. While we can first ship an iOS app and later add a companion app for the Apple Watch, I'm wondering if the reverse is possible as well:
Can we ship an Apple Watch-only app, which is installed via WatchOS App Store directly on the watch and then later add an iOS app to it?
This is important to me as I don't want to put a barrier on front of this option. You may still find out after publishing your watch app that it will profit from having a companion app on the iPhone. Or you might find that your watch app will gain more publicity when its iOS companion app becomes visible in the iOS App Store as well.
Yes, this is simply a matter of going to the project at the top level of the project navigator, then adding a new iOS target to your Apple Watch project.

Can I use the Apple watch as an individual device without the iPhone?

In my case, I need to make an in-house communication system using Apple watches (without iPhones) There I'm planning to use UDP or TCP protocol for voice communication.
And is it can able to receive a notification without iPhone?
watch OS 6 and above now allows independent Watch apps.
Check out it's WWDC: Creating Independent Watch Apps
watchOS 6 enables a whole new level of watchOS experiences by allowing
fully independent apps and apps built just for Apple Watch, and by
bringing the App Store to Apple Watch. Discover how to leverage the
power of many iOS frameworks and technologies, now on watchOS, to
create fully independent experiences on Apple Watch.
For lower versions, an Apple Watch app installs as an extension to an iPhone app. You would need an iPhone to access the AppStore to install an iPhone app, which provides an extension app to the Apple Watch.
In this case, you can create a simply, bare minimum iPhone app but with a complex Apple Watch app extension.

Issues running Apple Watch glance app in simulator

I'm trying to test my apple watch glance for my iOS app using the simulator, however I'm getting some very strange behaviour. When I launch the iOS app in the simulator it works without problem and the app is fully functional. However , when I then try to launch the glance app for apple watch afterwards it shows up, but the iOS app no longer works (if I try to launch it from the simulator it immediately crashes) and the data that's in the app sharing group doesn't show up on the watch (but if I relaunch the iOS app simulator from Xcode it shows up there).
I've checked both apps and they are configured for the same sharing groups and that is definitely the case.
I just don't understand why running the iOS app and the apple watch app in the simulator won't work / behave correctly together?
Credit to #WhiteTiger for this answer:
if you're using watchos 2 appgroup the system does not work on the device, you should use wcsession as the documentation indicates.
Or look at updating to use the WatchConnectivity approach instead

How can I make my Apple Watch app work without an iPhone?

When my iPhone is not available, my WatchKit app on the Apple Watch does not work (a red crossed-out iPhone symbol appears). How can I make my app work without the iPhone? How do I tell it to use data that is cached on my Apple Watch?
You don't, because this is not how Apple Watch apps work at the moment. Your watch app does not run on the watch, it runs on the iPhone but displays its UI on the watch. When the phone isn't nearby, there's no place to run the code.
Apple has said that stand-alone watch apps will be possible this summer. Probably they'll announce it at WWDC in June.

Resources