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

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -