문제

I use AssetsLibrary to present pictures from the user's camera roll. However I'm not interested in the location data of those pictures. Is there a way to disable this location service prompt?

도움이 되었습니까?

해결책

there is no way to disable the prompt. Enabling "location services "is a requirement for using the AssetsLibrary. The reason is that any photos/videos in the Photo-Library might contain geodata. This data is not just available through ALAssetPropertyURLs, but also if you read out the raw data from the asset (by using the getBytes:fromOffset:length:error: Method of ALAssetsRepresentation). Cause there is no way to strip the geo metadata from the raw image data (in case location services are disabled), I guess the design decision was made to make "location services" mandatory for using the AssetsLibrary.

This requirement might be confusing to the user. So you need to do 2 things:

1) If the user denies access to location services, then present a clear message while your app needs this access and that the app does not actually determine the current position or any GPS/data.

2) Display clear instructions how to enable location services, once the user has pressed "NO" on the initial dialog.

Cheers,

Hendrik

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top