dpa99c / cordova-diagnostic-plugin

Cordova/Phonegap plugin to manage device settings
538 stars 359 forks source link

Support for Mac Catalyst #520

Open qpwr opened 2 weeks ago

qpwr commented 2 weeks ago

I'm trying to make my app available on macOS through Mac Catalyst. I'm using your great plugin to check for features such as location, wifi and bluetooth. Unfortunately building fails for Mac Catalyst due to this error:

/Users/.../cordova.plugins.diagnostic/Diagnostic.m:10:9 'CoreTelephony/CTCellularData.h' file not found

Judging from Apples own documentation, this module should be available starting from Mac Catalyst 13.1, which seems to be equivalent with macOS 10.15.1 (https://developer.apple.com/documentation/coretelephony/ctcellulardata).

Would it be possible to make this work for future releases of the plugin? Or maybe I'm doing something wrong and it should already work?

Thanks in advance!

Marc

qpwr commented 1 week ago

I found that a check to take care of this is pretty easy to implement, so I opened a PR with the necessary changes: https://github.com/dpa99c/cordova-diagnostic-plugin/pull/521