Permission to create folder on iPhone

前端 未结 2 372
执念已碎
执念已碎 2021-01-14 02:09

After like a half an our of digging, I\'ve found out I don\'t have permission to create folders, so how do I get permission to create a folder?

[[NSFileManag         


        
2条回答
  •  攒了一身酷
    2021-01-14 02:52

    Check the below Answer for SWIFT:

    var paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as String
    
    [NSFileManager.defaultManager().createDirectoryAtPath(paths.stringByAppendingPathComponent("Hello"), withIntermediateDirectories: false, attributes: nil, error: nil)]
    
    
    println(paths)
    

提交回复
热议问题