Type11
Type11

Reputation: 21

Can I tell when my iOS Widget is running on MacOS (when Use IPhone Widgets is on)

I have an iOS Widget that also can load on the Mac when the Use iPhone Widgets setting is turned on on the Mac in Desktop & Dock.

I want to use a different url scheme to open video clips from the widget if it is being clicked on iOS or the Mac.

I tried using ProcessInfo.processInfo.isiOSAppOnMac but it always thinks it is on iOS.

I also tried looking for the user document path to see if it was /var/mobile/ or /Users/. but it always thinks it is /var/mobile.

I assume this is as it is not really a catalyst app but a WidgetKit extention from the phone.

Is there anyway I can figure out when the widget is running on the mac?

Thanks!

Upvotes: 2

Views: 55

Answers (0)

Related Questions