Search code examples
xcodebuttonios7rate

How can I make a Rate-Button in iOS7?


I want to add a rate-button to my application. How can I do this?

- (IBAction)rateGame {
    [[UIApplication sharedApplication] 
     openURL:[NSURL URLWithString:@"itms-apps://itunes.apple.com/app/idYOUR_APP_ID"]];         
}

In the simulator, this doesn't work. (Can't test it on a real device right now)

Is this the correct way to do this or should I try something else?


Solution

  • Your code is correct for launching the App Store with the app page open; I use the same code in my shipping app. This is the best you can achieve on iOS 7. It doesn't work on the iOS Simulator because the simulator doesn't have the App Store or iTunes apps installed, so there's nothing to launch.