0

I work on an app for iOS and watchOS. The watch app is independent but users will be able to use it side-by-side to the iPhone app, synced via iCloud.

The iOS app includes a daily reminder (via UNUserNotificationCenter) to open the app, the notification shows up on both devices (as usually with all other apps). But what if the user only downloads the watch version of the app? I scheduled the same local notifications I have in the iOS app into the watch app, too.

Now, the iPhone gets the notification, and the watch gets two notifications.

How can I manage to get the iPhone notification only on the user's iPhone so that the Apple Watch does not receive two notifications? Or is there a smarter solution?

Thanks in advance

garytechy
  • 1
  • 2
  • It sounds like you should have bundled your watch app with the iOS app but made the watch app independent rather than having two different apps. If it is too late to change (you have already released) then only the user can prevent the iOS app notifications from appearing on their watch. – Paulw11 Mar 01 '21 at 20:22
  • Thanks @Paulw11 Yes, both apps are in the same Xcode project but not released in the App Store yet. I am able to install the watch app via TestFlight or Xcode without installing the iOS version so I thought I successfully separated them!? – garytechy Mar 01 '21 at 23:57
  • If you have both the watch target and the iOS target in the same bundle then they can communicate via `WCSession` - You can use this to identify that the user has the iOS companion app installed and suppress notifications from the watch app. – Paulw11 Mar 02 '21 at 02:51

0 Answers0