I am creating a static library in iOS. I am using a storyboard file in it. In order to do so I have created a resource bundle file named 'OfferWallResources.bundle' in which I have added my storyboard file named 'Offerwall.storyboard'. I am trying to access the storyboard inside the static library using the following code:
NSBundle *bundle = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"OfferWallResources.bundle"];
UIStoryboard *s=[UIStoryboard storyboardWithName:@"Offerwall" bundle:bundle];
But my app is crashing with the following error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Offerwall' in bundle NSBundle (loaded)'
I also tried to access the same storyboard file in the target project using the same code and it worked. But, I want to access it inside the library. I don't get where I am going wrong.