prog.m:1:2: error: unknown type name 'NSString'
prog.m:1:2: warning: implicit declaration of function 'NSSearchPathForDirectoriesInDomains' [-Wimplicit-function-declaration]
prog.m:1:65: error: 'NSDocumentDirectory' undeclared here (not in a function)
prog.m:1:86: error: 'NSUserDomainMask' undeclared here (not in a function)
prog.m:1:104: error: 'YES' undeclared here (not in a function)
prog.m:2:5: warning: data definition has no type or storage class [enabled by default]
prog.m:2:5: warning: type defaults to 'int' in declaration of 'saveDirectory' [enabled by default]
prog.m:2:5: error: conflicting types for 'saveDirectory'
prog.m:1:12: note: previous definition of 'saveDirectory' was here
prog.m:2:5: error: cannot find interface declaration for 'NSConstantString'
prog.m:2:5: warning: invalid receiver type 'int' [enabled by default]
prog.m:2:5: warning: no '-stringByAppendingPathComponent:' method found [enabled by default]
prog.m:2:5: warning: (Messages without a matching method signature [enabled by default]
prog.m:2:5: warning: will be assumed to return 'id' and accept [enabled by default]
prog.m:2:5: warning: '...' as arguments.) [enabled by default]
prog.m:3:5: error: unknown type name 'NSFileManager'
prog.m:3:34: error: 'NSFileManager' undeclared here (not in a function)
prog.m:4:5: error: expected identifier or '(' before 'if'
prog.m:7:5: error: unknown type name 'NSString'
prog.m:8:5: error: unknown type name 'NSData'
prog.m:8:26: error: 'NSData' undeclared here (not in a function)
prog.m:8:56: error: 'NSURL' undeclared here (not in a function)
prog.m:9:5: error: expected identifier or '(' before 'if'
prog.m:12:5: error: unknown type name 'NSString'
prog.m:12:5: warning: invalid receiver type 'int' [enabled by default]
prog.m:12:5: warning: no '-stringByAppendingPathComponent:' method found [enabled by default]
prog.m:13:5: error: unknown type name 'NSError'
prog.m:13:22: error: 'nil' undeclared here (not in a function)
prog.m:14:5: error: expected identifier or '(' before 'if'
prog.m:16:7: error: expected identifier or '(' before 'else'