iOS get error by creating a pdf
问题 i want to create a pdf file, but i get 2 errors: <Error>: CGDataConsumerCreateWithFilename: failed to open `/test.pdf' for writing: Operation not permitted. deflateEnd: error -3: (null). and this one <Error>: CGPDFContextCreate: failed to create PDF context delegate. I compute the path in the controller class - (void)viewDidLoad { documentName = @"test.pdf"; NSArray *arrayPaths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES); NSString *path = [arrayPaths