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

Include mandatory NSLocationUsageDescription on macOS #687

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rschiang
Copy link

@rschiang rschiang commented Oct 12, 2021

Starting from macOS Big Sur, location usage description has been enforced on new apps. Apps that fail to include the aforementioned description would cause an outright crash (thus the issue encountered in #655). stderr log shows the following error when Telegram.app attempts to access Location for the first time:

2021-10-12 12:43:06.412 Telegram[42052:1582640] This app has attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an “NSLocationUsageDescription” key with a string value explaining to the user how the app uses this data

It is true that the current Info.plist already contains NSLocationWhenInUseUsageDescription, which is the said property key for iOS. However, as documented by Apple, macOS uses a different property key called NSLocationUsageDescription:

If you need location information in a macOS app, use NSLocationUsageDescription instead.

And in NSLocationUsageDescription’s documentation:

This key is required if your macOS app uses APIs that access the user’s location information.

This pull request should fix the issue.

Starting from macOS Big Sur, location usage description has been enforced on new apps.
On macOS, however, the `Info.plist` property key the system resorts to is `NSLocationUsageDescription` instead of `NSLocationWhenInUseUsageDescription`. This commit fixes that.
@CLAassistant
Copy link

CLAassistant commented Oct 12, 2021

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

3 participants