On the face of it, this seems a very simple problem but for some reason I can't quite get it to work.
I have a magazine-style app that downloads the data for each issue in the form of a zipped bundle.
Once downloaded, and unpacked, the app successfully accesses the various files contained within the bundle as expected. These include JSON, PNG, JPG, video and so on.
However, I also included a XIB file that contains the physical layout of the content in a series of UIViews and it is this file that I cannot use.
The file is present but when I try and load it using:
UIViewController *controller = [[UIViewController alloc] initWithNibName: @"ViewController" bundle: assetBundle];
I get the following error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </var/mobile/Applications/C6718DB8-0C0F-4D38-84E6-55C145279957/Documents/asset-4.bundle> (not yet loaded)' with name 'ViewController''
Now, is this an iOS imposed limitation on not accessing XIBs from downloaded bundles, or some mistake I'm making in calling up the XIB for use?
I cannot find any explicit prohibition on using fetched bundles in this way however.