I have a project which I need to import into other project as a framework just like how we import Coredata framework, Quartzcore etc..How to achieve that ? How to compile my pro
If you want to compile a 'standard' framework like UIKit.framework, try this Universal Framework iPhone iOS
else
Replace all code that load resource from main bundle to load resource from TestPluginBundle. Maybe you want to add a category for UIImage because you want to use imageNamed:
so that you can use [UIImage testPluginImageNamed:@"small.png"]
. It's easy to do replace in your project and add the related header file. Take .xib file For example:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
//self = [super initWithNibName:nibNameOrNil bundle:[NSBundle mainBundle]];
// you need to define a method to get the bundle 'TestPluginBundle.bundle', here I used '[TestPlugin TestPluginBundle]'
self = [super initWithNibName:nibNameOrNil bundle:[TestPlugin TestPluginBundle]];
...
}
After this add the .a file and .bundle file to another project. In the another project you need to add the related framework again.
I've successfully used this method for my work.