My app project is broken???

Discussion in 'iOS Programming' started by flummoxed, Dec 18, 2010.

  1. flummoxed macrumors member

    Nov 27, 2010
    My app was working in the iPhone simulator yesterday.

    Today I made some small changes to the viewController nib file that contains
    a few images and controls - mainly I changed one image and deleted some views.

    I added some replacement images into the Resources folder that get used in the window setup at startup.

    The app loads fine. It reaches the end of viewDidLoad and the window displays in the simulator - then immediately closes.

    I get 2 messages in the Debugger console:

    dyld: Library not loaded: /System/Library/Frameworks/UIKit.framework/UIKit
    Referenced from: /Developer/iPhone Apps/App name/build/Debug-iphonesimulator/App name
    Reason: image not found

    The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).

    If I run a different app that this current app was copied from it works fine.
    All the build configurations are identical.

    I don't know what "image not found" would mean. All my images are there in the actual project directory and the Resources folder in the project list. They are all named correctly . None of that changed since the last time the app was working.

    Why does it say it can't it load the UIKit frameworks? If the other apps can load why not this one? The programs are nearly identical.
  2. flummoxed thread starter macrumors member

    Nov 27, 2010
    Well, after hours of troubleshooting and searching I decide to simply
    recreate my project.
    The problem is not with the image resources. Some reference file in the project is messed up and its not worth the time to find and fix it.

    I just created and new project and copy/pasted all my code into the new files.
    same with the nib file. All works fine now.

    My guess is that when I started to work on the project today I inadvertently clicked on the device/sdk option settings in the upper left corner and changed it from simulator to device. Then when I started deleting and adding images into the project and rebuilt made changes to different reference files.
    I also got an error telling me that I did not have a device certificate, so that tipped me off to the change in the settings. But too late. I could not get the project back to normal.

    This is a hard lesson about the delicate nature of this IDE development system. If you make any false moves or changes without knowing it you can screw everything up badly.
    There are so many support files under the hood making references all over the place - that it is impossible to track down the source of the problem.
    This could be a potential nightmare on a big application.
  3. ulbador, Dec 18, 2010
    Last edited: Dec 18, 2010

    ulbador macrumors 68000


    Feb 11, 2010
    I've seen this happen a few times. Usually it's because I'm clicking and canceling or restarting a build in process.

    Resetting the simulator, removing the app from the physical device (if applicable) and "Cleaning All Targets" and rebuilding fixes it. In your case and in your clicking around, it sounds like you removed the key UiKit framework from linking with your binary. A 10 second fix if you are a fast clicker.

    I disagree with the statement of "delicate nature". Usually this comes from lack of understanding about what everything is and how it fits together. The bottom line is that it sounds like your build settings got wonky and you don't have enough experience with the IDE to diagnose the error messages to fix them. This is not equal to a problematic or naughty IDE.
  4. flummoxed thread starter macrumors member

    Nov 27, 2010

    I'll concede to your point about a lack of understanding to be at fault.
    I'm not saying that Xcode is quirky or an intolerable system,
    but after looking at all the support files and build settings in the plists,
    and seeing the potential for making a small error...YIKES!

Share This Page