I got problem with creating folder for PhotoLibrary
.
Does anyone know what is wrong there?
var albumPlaceholder:PHObjectPlaceholder
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:
You don't have permission to access Photo Library. You need to request it first. So use the following code for that:
PHPhotoLibrary.requestAuthorization
{ (PHAuthorizationStatus status) -> Void in
switch (status)
{
case .Authorized:
// Permission Granted
println("Write your code here")
case .Denied:
// Permission Denied
println("User denied")
default:
println("Restricted")
}
}
For more info refer : requestAuthorization