I have struggled a lot to how to load resource in cocoapods resource_bundle.
The following is what i put in the .podspecs file.
s.sourc
Just for the record: I wanted to open a NIB from a Category stored in a CocoaPods library. Of course [self classForCoder] gave UIKit back (because of the Category), so the above methods didn't work.
I resolved the issue using some hardcoded paths:
NSURL *bundleURL = [[[NSBundle mainBundle] resourceURL] URLByAppendingPathComponent:@"Frameworks/MyCocoaPodLibraryName.framework"];
NSBundle *podBundle = [NSBundle bundleWithURL:bundleURL];
CustomView *customView = [[podBundle loadNibNamed:@"CustomView" owner:self options:nil] firstObject];