kstenerud / iOS-Universal-Framework

An XCode project template to build universal frameworks (arm7, arm7s, and simulator) for iOS / iPhone.
2.95k stars 473 forks source link

Odd issue with bundle resources, differences between file structure on device/in simulator. #106

Open Loxrie opened 11 years ago

Loxrie commented 11 years ago

Under "Copy Bundle Resources" in the project using the framework I have directly added my framework file (rather than adding ALL of it's many many resources individually.

On the simulator this leads to a file structure with the various Nibs/PNGs and static files being directly under the .app directory kinda like so:

DemoApp.app
    |- AViewFromTheFramework.nib

However when I use XCode and run the project on my device the file structure becomes:

DemoApp.app
   |- Demo.framework
      |- Resources   <-- as a symbolic link it appears.
         |- AViewFromTheFramework.nib

As a consequence the following code does not work at all:

        self.splashView = [[[NSBundle mainBundle] loadNibNamed:@"AViewFromTheFramework"
                                                            owner:nil options:nil] objectAtIndex:0];

How should I be handling this?