IOS swift creating app folder error

后端 未结 2 798
星月不相逢
星月不相逢 2021-01-16 06:01

I got problem with creating folder for PhotoLibrary. Does anyone know what is wrong there?

            var albumPlaceholder:PHObjectPlaceholder         


        
2条回答
  •  耶瑟儿~
    2021-01-16 06:43

    The NSError tells you what the problem is:

    Photos Access not allowed (authorization status 0)

    The problem is that you have failed to obtain authorization from the user to use the photos library.

    For more info, see the docs on requestAuthorization: - https://developer.apple.com/library/ios/documentation/Photos/Reference/PHPhotoLibrary_Class/index.html#//apple_ref/occ/clm/PHPhotoLibrary/requestAuthorization:

提交回复
热议问题