capacitor-plugins
capacitor-plugins copied to clipboard
feat: Add catalyst/desktop mode info to Device.getInfo
Feature Request
Describe the Feature Request
In xcode you can now target your app for desktop by using catalyst. Device.getInfo currently returns the model info but that is currently set to "iPad" for catalyst, and no other way of detecting if the app is being run on desktop.
Platform Support Requested
- [ ] Android
- [x] iOS
- [ ] Electron
- [ ] Web
Describe Preferred Solution
I suggest adding a "desktop" field or similar. It is easy to do following this article (I've tried and verified it): https://www.hackingwithswift.com/example-code/catalyst/how-to-detect-your-ios-app-is-running-on-macos-catalyst
Describe Alternatives
There are no other good ways of doing this that I know of.
Issues tagged with feature request are closed but tracked for👍 reactions to gauge interest.
Possible Solution to check whether Catalyst:
https://github.com/ionic-team/capacitor/issues/7239#issuecomment-1936082650