How to get the App ID before submitting app?

Discussion in 'iOS Programming' started by Danneman101, Feb 12, 2012.

  1. macrumors 6502

    Aug 14, 2008
    I'm using the App ID to instantly open the review section of the app in App Store. To implement this on an old app was no problem since I could just copy the ID from my developers account > handle apps.

    But what about when you make a new app? Since I haven't uploaded it yet it does not have an ID, so I'm kinda caught in a catch 22-situation here.

    Do you instantly get an App ID as soon as you create a new app? If so I could postpone the actual upload until I hardcoded it into the app.

    Or is there an automatic way to get hold of it from the code?
  2. macrumors regular

    Aug 28, 2008
    openURL to:
    Don't think this will work before app is approved, but it will open the Appstore once the app is available

    - Olaf
  3. Danneman101, Feb 12, 2012
    Last edited: Feb 12, 2012

    thread starter macrumors 6502

    Aug 14, 2008
    Yes, I used to use that solution, but the following method opens the review-screen directly instead of the app page:

            int n_APP_ID = 123456789;
            // Set:     URL to open Review instantly
            NSString *templateReviewURL = @"itms-apps://";
            // Open:    iTunes app store > instantly opens reviews
            NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
            NSString *reviewURL = [templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", n_APP_ID]];
            [userDefaults synchronize];
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:reviewURL]];
    Thanks anyway :)
  4. Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Once you've added your app in iTunes Connect, before you've uploaded the binary for it, you can look at the app information and see what the Apple ID for it is.
  5. thread starter macrumors 6502

    Aug 14, 2008
    Great, I wasn't sure that the ID was generated before the upload of the binary, but since that is the case my problems are solved :)

    Thanks :)

Share This Page