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

前端 未结 3 677
谎友^
谎友^ 2021-02-15 15:31

OK, so I have had this problem before and solved it unknowingly and now it is reoccurring!

\"error: 
 Error Domain=ALAssetsLibraryErrorDomain Code=-3312 \"Global         


        
相关标签:
3条回答
  • 2021-02-15 15:44

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

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

    0 讨论(0)
  • 2021-02-15 15:48

    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.

    0 讨论(0)
  • 2021-02-15 16:01

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

    What a JOKE!

    0 讨论(0)
提交回复
热议问题