Search code examples
iosiphonephotokitphphotolibrary

Creating Subfolder inside a folder using PhotoKit


I understand how one can create a folder programmatically using Apple's PhotoKit API and add Photos to the folder.

    PHPhotoLibrary.shared().performChanges({
        let req = PHAssetCollectionChangeRequest.creationRequestForAssetCollection(withTitle: "FolderName")

    }, completionHandler: { success, error in
        if !success { print("Error creating album: \(String(describing: error)).") }
    })

Is there a way to create subfolders inside this folder using PhotoKit?


Solution

  • At present Apple is exposed api for create single album. Even manually you can't create a folder inside another folder from the device.