‘Detect’ or ‘Notify’ when a user has app open on two platforms [Swift, SwiftUI, iOS, macOS]

0
50

[ad_1]

Vague question, but is there a potential road I could go down to add sort of monitoring of a user across two versions of an app in realtime?

EXAMPLE: I have one app made for two platforms, iOS and macOS, separate projects in Xcode obviously. Say I’m on the macOS app, and I open the app also installed on my iPhone, I’d like to be able to be notified something like “You have opened AppName on your iPhone, you can now transfer/view across devices”, and maybe a button is now enabled on macOS with a tooltip like “View in AR on your iPhone”. Or vice versa, maybe an action becomes available on the iPhone app when you open the mac app, like “View 3D model on Macbook”.

Like I said, I know it’s a vague question, I’m just looking to see if such behavior is doable in as close a native swift/swiftui way as possible. Also if something like this is routinely done and is or is not recommended.

[ad_2]