I'm trying to load some .applescript files in my project.
Copied them into the "Supporting Files" directory like this:
and tried to access them:
NSBundle *bundle = [NSBundle mainBundle];
NSLog(@"Resource path for test.applescript: %@", [bundle pathForResource:@"test" ofType:@"applescript"]);
pathForResource always returns null.
Both files are correctly imported in xcode. The target membership is my app.
Solutions from similar questions didn't really help
What am i doing wrong?
question from:
https://stackoverflow.com/questions/9332003/pathforresource-returns-null 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…