I am getting a couple of errors related to location settings when I run my flutter app.
Error 1:
/Users/mustafazaki/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/location-3.2.4/ios/Classes/LocationPlugin.m:84:43: note: enclose 'allowsBackgroundLocationUpdates' in an @available check to silence this warning result(self.clLocationManager.allowsBackgroundLocationUpdates ? @1 : @0);
Error 2:
/Users/mustafazaki/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/location-3.2.4/ios/Classes/LocationPlugin.m:91:36: warning: 'setAllowsBackgroundLocationUpdates:' is only available on iOS 9.0 or newer [-Wunguarded-availability] self.clLocationManager.allowsBackgroundLocationUpdates = enable;
Error 3:
/Users/mustafazaki/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/location-3.2.4/ios/Classes/LocationPlugin.m:92:36: note: enclose 'setShowsBackgroundLocationIndicator:' in an @available check to silence this warning self.clLocationManager.showsBackgroundLocationIndicator = enable;
try to add this code to your
info.plistat ios->Runner->Info.plist inside<dict>tag.stop your app, then run in terminal :