Reputation: 1823
I want to build a static library which include bundle with storyboard.
When I create a sample project and import the bundle and .h file and run it, I get error as below:
</Users/admin/Library/Developer/CoreSimulator/Devices/428755C3-5E9A-451F-AEAE-5BBD33506812/data/Containers/Bundle/Application/E3535CCC-F995-48E2-A26C-D8771E2109A1/testLibApp.app/testLibResources.bundle> (not yet loaded)
Here I call the static library and want to present the storyboard view:
NSString *pathAndFileName = [[NSBundle mainBundle] pathForResource:@"testLibResources" ofType:@"bundle"];
NSBundle *resourceBundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"testLibResources" ofType:@"bundle"]];
NSString *pathAndFileName = [resourceBundle pathForResource:@"testLib" ofType:@"storyboard"];
When the code run until, it crash and show the error log as above:
[NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"testLibResources" ofType:@"bundle"]];
Can someone know how can I load the static library bundle storyboard and present it to the current view?
I also check the build phase, bundle had been added in the bundle resoures:
Upvotes: 2
Views: 1528
Reputation: 451
I had the same issue and could solve it by deleting the derived data folder from Xcode (Xcode / Preferences / Locations / Derived Data). Also delete the app from the device.
Upvotes: -1