6 Replies
      Latest reply on Mar 17, 2016 3:42 AM by bob133
      Startry Level 1 Level 1 (0 points)

        I had a main project contain more than 10 bundles. I had two image named "map_bubble_right_normal", one in main bundle, the other one in sub bundle(SCommon.bundle). I write code as follow:

         

        UIImage *image = [UIImage imageNamed:@"map_bubble_right_normal"];
        

         

        The code was writen in didFinishLaunchingWithOptions of AppDelegate.

         

        I want to load the image which I saved at main bundle. However, the result of the code that load image from sub bundle(SCommon.bundle).

         

        I guess that image saved at main bundle maybe a error image(maybe copy problem). Therefore, I show the ipa content to see the "map_bubble_right_normal" file saved at root directory. The image is right!!!!!

         

        I don't know why `imageNamed:` would load the image from sub bundle(SCommon.bundle). I tried to delete app and restart iPhone, the result is same. And, I tried to delete Derived Data of XCode, and clean the project. The image still load from sub bundles(SCommon.bundle).

         

        Addition, I test the problem at iOS 8 and iOS 9 device.

         

        Only a method which change the bundleid(main bundle) can solve the problem temporary so far.

         

        I know the cache feature of UIImage, but I can't understand why did the strange scene will happen.

         

        I hope Apple Developer & Engineer will help me to solve the problem.  (Emergency)

         

        Thank you~~~