PDFGenerator icon indicating copy to clipboard operation
PDFGenerator copied to clipboard

Save permission

Open aliakkawi opened this issue 7 years ago • 1 comments

Hi, When running the app on a real deice i am getting this error: "Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “sample1.pdf” in the folder “51DBCB3B-3BA1-4CB9-91BE-0BE752979F51”." "

How can i solve the issue Thanks.

aliakkawi avatar Jun 17 '17 22:06 aliakkawi

Create file path in this way: NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0];

    //make a file name to write the data to using the documents directory:
    NSString *fileName = [NSString stringWithFormat:@"%@/textfile.txt", 
                                              

khetaram avatar Jun 18 '17 01:06 khetaram