TelegramSwift icon indicating copy to clipboard operation
TelegramSwift copied to clipboard

Include mandatory NSLocationUsageDescription on macOS

Open rschiang opened this issue 4 years ago • 1 comments

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.

rschiang avatar Oct 12 '21 05:10 rschiang

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: rschiang
:x: overtake
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Oct 12 '21 05:10 CLAassistant