Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Missing location usage description values in Info.plist" even if it isn't the case. #22

Closed
gaetschwartz opened this issue May 27, 2018 · 4 comments

Comments

@gaetschwartz
Copy link

So I changed my Info.plist file like explained in the README :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSLocationWhenInUseUsageDescription</key>
	<string>I need you I need you I need you right now</string>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>tplusg</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIMainStoryboardFile</key>
	<string>Main</string>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>arm64</string>
	</array>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UIViewControllerBasedStatusBarAppearance</key>
	<false/>
</dict>
</plist>

But it throws me this error saying it can't find the location usage description values in Info.plist :

[VERBOSE-2:dart_error.cc(16)] Unhandled exception:
Geolocation error: Missing location usage description values in Info.plist. See readme for details.
#0      _JsonCodec.resultErrorFromJson (file:///Users/gaetan/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/geolocation-0.2.1/lib/channel/codec.dart:70:7)
#1      _JsonCodec.resultFromJson (file:///Users/gaetan/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/geolocation-0.2.1/lib/channel/codec.dart:47:33)
#2      _Codec.decodeResult (file:///Users/gaetan/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/geolocation-0.2.1/lib/channel/codec.dart:8:18)
#3      _LocationChannel.isLocationOperational (file:///Users/gaetan/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/geolocation-0.2.1/lib/channel/location_channel.dart:37:19)
<asynchronous suspension>
#4      Geolocation.isLocationOperational (package:geolocation/geolocation.dart:46:24)
#5      _StopsAroundPageState.checkGPS (file:///Users/gaetan/Developer/tplusg/lib/views/tabs/around.da<…>

Am I doing something wrong ?

@lukaspili
Copy link
Contributor

  1. Do you request permission whenInUse or always?
  2. Did you add the declaration to the correct plist file located at: ios/Runner/Info.plist?

@gaetschwartz
Copy link
Author

I'm requesting whenInUse and yeah I added the declaration in ios/Runner/Info.plist.
(The file is the one I pasted on my original post)

@acudworth
Copy link

Getting this too despite having added the correct privacy statement to Info.plist. I'm also requesting whenInUse only.

@shehabic
Copy link
Contributor

Add the following and it'll work:

    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
    <string>Your description here ....</string>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants