How do I launch App Store within my app?

Discussion in 'iOS Programming' started by ethana, Nov 1, 2008.

  1. macrumors 6502a

    Joined:
    Jul 17, 2008
    Location:
    Seattle, WA
    #1
    I am trying to cross-promote my apps by allowing users to touch an icon with my app that launches the App Store to another app I own. I think a good working example of this is the Air Hockey (Free) app, which currently does this.

    How do I do this within my code?

    Ethan
     
  2. macrumors 6502a

    Joined:
    Mar 13, 2008
    #2
    I'd think you need a phobos link to your application, but that's not possible until you've already released your application as far as I know.
     
  3. macrumors G3

    NT1440

    Joined:
    May 18, 2008
    Location:
    Hartford, CT
    #3
    It was my understanding that the SDK states no app can launch or close a different app.

    I could be wrong tho
     
  4. thread starter macrumors 6502a

    Joined:
    Jul 17, 2008
    Location:
    Seattle, WA
    #4
    I have the phobos link, but how do I use it to launch the App Store to my app?
     
  5. macrumors member

    Joined:
    Apr 9, 2008
    #5
    Get the link to your application, an open an url, like this:

    Code:
    - (void)goToAppStore {
    	NSURL * url = [[NSURL alloc] initWithString:@"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=288338285&mt=8"];
    	[[UIApplication sharedApplication] openURL:url];
    }
    This will close your application, and open the AppStore. Have fun.:)
     

Share This Page