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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location.request*PermissionsAsync() return type incorrect #21231

Open
g4rb4g3 opened this issue Feb 15, 2023 · 1 comment
Open

Location.request*PermissionsAsync() return type incorrect #21231

g4rb4g3 opened this issue Feb 15, 2023 · 1 comment

Comments

@g4rb4g3
Copy link

g4rb4g3 commented Feb 15, 2023

Minimal reproducible example

https://github.com/g4rb4g3/LocationPermissionBug/blob/master/App.js#L10

Summary

Hi there 馃憢
First of thanks for your great work! I'm running into some weird behavior with Expo Location.

Return type of Location.requestForegroundPermissionsAsync() is not correct.
Expected according to documentation is a LocationPermissionResponse. But returned is a PermissionResponse missing the "ios" and "android" properties.
Actually the documentation is misleading too since the text says "A promise that fulfills with an object of type PermissionResponse." But before it says "Returns Promise<LocationPermissionResponse>".

Location.requestPermissionsAsync() returns another object that is also not matching the LocationPermissionResponse since it doesn't have the "android" and "ios" properties but instead has the "scope" property (checked on iOS only!).

Environment

expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.2.1
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.18.1 - /usr/local/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 8.19.2 - /usr/local/bin/npm
Watchman: 2023.01.16.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
IDEs:
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
npmPackages:
expo: ~47.0.12 => 47.0.13
react: 18.1.0 => 18.1.0
react-native: 0.70.5 => 0.70.5
Expo Workflow: managed

@g4rb4g3 g4rb4g3 added the needs validation Issue needs to be validated label Feb 15, 2023
@brentvatne brentvatne added Issue accepted and removed needs validation Issue needs to be validated labels Feb 15, 2023
@expo-bot
Copy link
Collaborator

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there鈥檚 enough information to investigate it.
However, we can鈥檛 promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you鈥檇 like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

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

3 participants