ios - How to upload pdf file to parse database in Xcode? -


i'm trying upload pdf file 'supporting files' folder parse database. however, when set 'pdffile' in code nsexception saying error domain=nscocoaerrordomain code=4 "the folder “test.pdf” doesn’t exist.".

nsstring *filename = [[nsbundle mainbundle] pathforresource:@"test" oftype:@"pdf"]; nsdata *pdfdata = [nsdata datawithcontentsoffile:filename];  pffile *pdffile = [pffile filewithname:filename data:pdfdata]; [pdffile saveinbackground];  pfobject *testobject = [pfobject objectwithclassname:@"matchreports"]; testobject[@"file"] = pdffile; [testobject saveinbackground]; 


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -