iphone sdk 3.0 - What is the alternative of [NSBundle mainBundle] URLForResource:withExtension: in iOS 3 SDK -


i developing ios app using ios 4.2 sdk, want app run on older devices iphone 2g ios 3.1.3. don't know alternative code:

nsurl *modelurl = [[nsbundle mainbundle] urlforresource:@"coredataapp" withextension:@"momd"]; 

it crashes on device, because urlforresource:withextension: method ios 4+.

please help. thanks.

its -

nsurl *afileurl = [nsurl fileurlwithpath: [[nsbundle mainbundle]  pathforresource:path oftype:@"aif"]]; 

Comments

Popular posts from this blog

mod rewrite - Doing external redirect. .htaccess NS flag not working. How to achieve similar results? -

mysql - How to insert just year and month into date field? -