dpa99c / cordova-diagnostic-plugin

Cordova/Phonegap plugin to manage device settings
536 stars 354 forks source link

Unable to read Info.plist and Apple Requires Properties that are Unused #462

Closed allidoisace closed 1 year ago

allidoisace commented 2 years ago

Bug report

CHECKLIST

Current behavior: When running ios with ionic I receive this issue after installing the Diagnostic plugin. Now, this is an accurate fatal because I don't have an Info.plist, but rather I have development.plist and production.plist. I am only using the Location methods out of this plugin and have added the necessary properties to the property lists. In addition, Apple is complaining about not having usage descriptions for Contacts, Calendar, etc, when I do not even use those particular methods.

[fatal] Unable to read: /.../app/ios/App/App/Info.plist
[fatal] Unable to read: /.../app/ios/App/App/Info.plist
[fatal] Unable to read: /.../app/ios/App/App/Info.plist
[fatal] Unable to read: /.../app/ios/App/App/Info.plist
[fatal] Unable to read: /.../app/ios/App/App/Info.plist
[fatal] Unable to read: /.../app/ios/App/App/Info.plist
[fatal] Unable to read: /.../app/ios/App/App/Info.plist
[fatal] Unable to read: /.../app/ios/App/App/Info.plist
[fatal] Unable to read: /.../app/ios/App/App/Info.plist
[fatal] Unable to read: /.../app/ios/App/App/Info.plist
[fatal] Unable to read: /.../app/ios/App/App/Info.plist
[fatal] Unable to read: /.../app/ios/App/App/Info.plist

After installing the Diagnostic plugin to my ionic application I receive the fatal messages above when running the app or building it.

Neither

Expected behavior:

I would expect any .plist to be read and also not require descriptions for methods that are not used (Contacts, Calendar, etc.).

Steps to reproduce:

Change to different plists and install the Dialog plugin.

Screenshots

Environment information

Runtime issue

Android build issue:

iOS build issue:

Related code:

<key>NSLocationAlwaysUsageDescription</key>
<string>Always allow Geolocation?</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Always allow Geolocation?</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Allow Geolocation?</string>

if (await Diagnostic.getLocationAuthorizationStatus() === Diagnostic.permissionStatus.DENIED_ALWAYS) {
       ...
}

Console output

console output ``` [fatal] Unable to read: /.../app/ios/App/App/Info.plist [fatal] Unable to read: /.../app/ios/App/App/Info.plist [fatal] Unable to read: /.../app/ios/App/App/Info.plist [fatal] Unable to read: /.../app/ios/App/App/Info.plist [fatal] Unable to read: /.../app/ios/App/App/Info.plist [fatal] Unable to read: /.../app/ios/App/App/Info.plist [fatal] Unable to read: /.../app/ios/App/App/Info.plist [fatal] Unable to read: /.../app/ios/App/App/Info.plist [fatal] Unable to read: /.../app/ios/App/App/Info.plist [fatal] Unable to read: /.../app/ios/App/App/Info.plist [fatal] Unable to read: /.../app/ios/App/App/Info.plist [fatal] Unable to read: /.../app/ios/App/App/Info.plist ```


**Other information:**
dpa99c commented 1 year ago

Please see the Specifying modules section of the documentation. Before reporting bugs, please validate the plugin behaviour by building and running the example project which is a known code base.