SDK Version: 44
Platforms: iOS
I’m attempting to test my app in testflight, but I’m never asked for location permissions. The app asks for permission and works as expected when testing using the expo go app, but when I make the build and upload to testflight, I’m never asked for location permissions and when I go to settings, location permissions isn’t an option. As far as I can tell I’ve followed the documentation, but am still unable to get location using expo-location.
where I ask for permission:
useEffect(() => {
(async () => {
let { status } = await Location.requestForegroundPermissionsAsync();
if (status !== 'granted') {
setErrorMsg('Permission to access location was denied');
return;
}
}, []);
}, []);
IOS section of app.json:
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.nawdevelopment.discgolfgames",
"buildNumber": "1.0.4",
"infoPlist":{
"NSLocationUsageDescription":"Disc Golf Games uses location to determine distances, which is used for several games",
"NSLocationWhenInUseUsageDescription":"Disc Golf Games uses location to determine distances, which is used for several games",
"NSLocationAlwaysUsageDescription":"Disc Golf Games uses location to determine distances, which is used for several games",
"NSLocationUsageDescription":"Disc Golf Games uses location to determine distances, which is used for several games",
"UIBackgroundModes": [
"location",
"fetch"
]
}
},
package.json:
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@react-native-community/masked-view": "^0.1.11",
"@unimodules/core": "~7.2.0",
"@unimodules/react-native-adapter": "~6.5.0",
"ansi-regex": "^4.1.1",
"expo": "^44.0.0",
"expo-linear-gradient": "~11.0.3",
"expo-location": "~14.0.1",
"expo-permissions": "^13.2.0",
"expo-status-bar": "~1.2.0",
"expo-task-manager": "~10.1.0",
"expo-updates": "~0.11.7",
"minimist": "^1.2.6",
"node-fetch": "^2.6.1",
"plist": "^3.0.5",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-elements": "^3.4.1",
"react-native-gesture-handler": "~2.1.0",
"react-native-reanimated": "~2.3.1",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-web": "0.17.1",
"react-navigation": "^4.4.4",
"react-navigation-stack": "^2.10.4",
"react-navigation-tabs": "^2.11.1",
"unimodules-permissions-interface": "^6.1.0",
"url-parse": "1.5.10"
},
"devDependencies": {
"@babel/core": "^7.12.9"
},
"private": true
}
I have to assume I’m missing something obvious, but can’t seem to find the answer anywhere. Any help is appreciated!