You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am experiencing an issue with one of my applications. The Cordova-Google-Maps plugin is failing on iOS 17, specifically in the initialization of the Geocoder plugin that uses NSLocale ISOCountryCodes to get a list of country codes.
Expected behavior:
Screen capture or video record:
Related code, data or error log (please format your code or data): Reason: In iOS 17, the option to extract NSLocale ISOCountryCodes country codes in Objective-c is not supported in this new version of the operating system, resulting in a nil value being returned and causing the application to terminate unexpectedly.
Action taken: A manual adjustment was made to the plugin by validating an action found in the Apple developer manual,
The system version is validated and based on this, a different action is taken for iOS 17, regionCode is used and not IsoCountryCodes.
NSArray *countryCodes;
if (@available(iOS 17.0, *)) {
// Use regionCode for iOS 17 and above
countryCodes = [[NSLocale currentLocale] regionCode] ? @[ [[NSLocale currentLocale] regionCode] ] : [NSLocale ISOCountryCodes];
} else {
// Use ISOCountryCodes for versions below iOS 17
countryCodes = [NSLocale ISOCountryCodes];
}
The text was updated successfully, but these errors were encountered:
pcsantana
pushed a commit
to pcsantana/cordova-plugin-googlemaps
that referenced
this issue
May 17, 2024
I'm submitting a ... (check one with "x")
OS: (check one with "x")
Current behavior:
Hello, I am experiencing an issue with one of my applications. The Cordova-Google-Maps plugin is failing on iOS 17, specifically in the initialization of the Geocoder plugin that uses NSLocale ISOCountryCodes to get a list of country codes.
Expected behavior:
Screen capture or video record:
Related code, data or error log (please format your code or data):
Reason: In iOS 17, the option to extract NSLocale ISOCountryCodes country codes in Objective-c is not supported in this new version of the operating system, resulting in a nil value being returned and causing the application to terminate unexpectedly.
Action taken: A manual adjustment was made to the plugin by validating an action found in the Apple developer manual,
The system version is validated and based on this, a different action is taken for iOS 17, regionCode is used and not IsoCountryCodes.
The text was updated successfully, but these errors were encountered: