xCode problem, app crashes in iPhone Simulator

Discussion in 'iOS Programming' started by Hexero, Dec 10, 2010.

  1. Hexero macrumors regular

    Feb 2, 2010
    Hi! I'm sure this is a common problem, but I couldn't find anything. I'm making a App for iPhone, when I'm trying to launch it in xCode the app I made won't start. It starts, then it closes. Is there a reason for this?

    Thank you in advance!
  2. zachsilvey macrumors 6502

    Feb 5, 2008
    Battle Ground
    You made a mistake in the code. Check the console to see if there are any messages. Also check xcode to see if there were any warnings at compile time.
  3. Hexero, Dec 11, 2010
    Last edited: Dec 11, 2010

    Hexero thread starter macrumors regular

    Feb 2, 2010
    At compile time I get the error

    "Expected '=', ',', ';', 'asm' or '__attribute__' before '-' token""

    at the line

    "- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {"
  4. ulbador macrumors 68000


    Feb 11, 2010
    There is nothing long with that line that I can see. Did you mess up a semicolon or something the line or two before that?
  5. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    Post the code that comes before that line.

    The error is complaining about the - in "- (BOOL)..etc.", and the most likely problem is that the line isn't in the right place, or something before it isn't terminated properly.

Share This Page