*.pdf すべての pdf を iPhone からアプリにインポートする方法 このように音楽ファイルを追加します。http://developer.apple.com/library/ios/#samplecode/AddMusic/Introduction/Intro.html .よろしくお願いします。iPhone dev の初心者です。
NSString *bundlePath = [[NSBundle mainBundle] resourcePath];
NSFileManager *mgr = [[NSFileManager alloc] init];
NSArray *allFiles = [mgr contentsOfDirectoryAtPath:bundlePath error:NULL];
for (NSString *fileName in allFiles)
{
if ([[fileName pathExtension] isEqualToString:@"pdf"])
{
NSString *fullFilePath = [bundlePath stringByAppendingPathComponent:fileName];
// fullFilePath now contains the path to your pdf file
// DoSomethingWithFile(fullFilePath);
NSLog(@"file: %@",fullFilePath);
}
}
NSURL *url = [[NSBundle mainBundle] URLForResource:@"" withExtension: @"pdf"];
NSLog(@"File: %@",url);