Iphone - How to enable application access to media on the device? - ALAssetsLibraryErrorDomain Code=-3312 “Global denied access”

限于喜欢 提交于 2019-12-03 13:02:15

What a joke - Location services must be turned on...

What a JOKE!

Simply go to Settings>General>Reset>Reset Location Warnings.

However this won't help your users out but it is useful for development

For iOS 4.2 and later use CLLocationManager authorizationStatus class method.

it will return a CLAuthorizationStatus enum ( declared at CLLocationManager.h ), you can test the return for kCLAuthorizationStatusAuthorized.

if ( [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized ) {
    // do your stuff
} else {
   // sorry user, you must enable us to see your location if you want to use YOURS assets library
}

iOS 6 introduce this method for ALAssetsLibrary class also.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!