iphone - problems creating static library with CoreData - Cannot create an NSPersistentStoreCoordinator with a nil model -


how reference model have created in static library project?

this returns null , throws , error because resources live in static library:

     //this code in static library     - (nsmanagedobjectmodel *)managedobjectmodel {     if (__managedobjectmodel != nil) {         return __managedobjectmodel;     }      nsurl *modelurl = [[nsbundle mainbundle] urlforresource:@"ecommerceengine" withextension:@"mom"];     __managedobjectmodel = [[nsmanagedobjectmodel alloc] initwithcontentsofurl:modelurl];     return __managedobjectmodel; } 

how change pull static library?

on iphone, static libraries have .a extention , can contain code. means resources (xibs, images, etc…) must packed either in bundle or shipped separately library.

see ios library resources


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -