NSBundle pathForResource method
<pre><code>NSURL *modelURL1 = [[NSBundle mainBundle] URLForResource:@"MyTest" withExtension:@"momd"];
NSLog(@"%@", [modelURL1 absoluteURL]);

NSString *path = [[NSBundle mainBundle] pathForResource:@"MyTest" ofType:@"momd"];
NSURL *modelURL = [NSURL URLWithString:path];
NSLog(@"%@", [modelURL absoluteURL]);
</code></pre>

<p>The first line is generated by XCode when I use Core Data, but it does not work because the method doesn't work prior to iOS 4. So I need another method, I thought I could use the second one but it returns nil...Why does it not work?</p>

<p>Thanks</p>
