我阅读了一些项目,很高兴找到如何 添加真正的子文件夹 但是没有任何解决方案让我在子文件夹中看到我的文件。一切都归零。
我试过 pathForResource 和 URLforResource 和 inDirectory 方法。
//NSString *W = [[NSBundle mainBundle] pathForResource:@"LS_ADINFO_0000_LFSB" ofType:@"xml" inDirectory:@"/2012-03-08%20(Published%20as%2008%20MAR%202012)/AERODROMES/LFSB/"];
//urlPDF = [NSURL URLWithString:W];
// DEBUG output: urlPDF = nil
//urlPDF = [[NSBundle mainBundle] URLForResource:@"LFSB/LS_ADINFO_0000_LFSB.xml" withExtension:nil];
// DEBUG output: urlPDF = nil
//urlPDF = [[NSBundle mainBundle] URLForResource:@"LS_ADINFO_0000_LFSB.xml" withExtension:nil];
// DEBUG output: urlPDF = file://localhost/Users/siri/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/1F5953CD-1E13-40D4-9497-8313F9DDEA77/SwissVfrm03.app/LS_ADINFO_0000_LFSB.xml
如何在 XCode 中设置子目录以在 iPad App 中访问?