xCode problem, app crashes in iPhone Simulator

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

  1. Hexero macrumors regular

    Joined:
    Feb 2, 2010
    #1
    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

    Joined:
    Feb 5, 2008
    Location:
    Battle Ground
    #2
    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

    Joined:
    Feb 2, 2010
    #3
    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

    ulbador

    Joined:
    Feb 11, 2010
    #4
    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

    Joined:
    Aug 9, 2009
    #5
    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