8

I am building and app and I included in my app a "Rate us" alert.Everything works,I added actions to the buttons and stuff.The problem is that when I press the "Rate now" button it should take me to my app in the app store.As I did not published my app yet,what URL should I write there? At the "Rate now" button I have this action :

UIApplication.sharedApplication().openURL(NSURL(string : "

Could somebody help me telling me what link should I write there?Thank you a lot!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
SwiftNinja
  • 127
  • 2
  • 8

2 Answers2

9

I'm doing it like:

UIApplication.sharedApplication().openURL(NSURL(string : "http://itunes.com/apps/myappnameinlowercase"));

in swift3

 UIApplication.shared.openURL(NSURL(string : "http://itunes.com/apps/myappnameinlowercase")! as URL);
Community
  • 1
  • 1
Midhun MP
  • 103,496
  • 31
  • 153
  • 200
8

When you create your app. You will have a unique ID which is called Apple ID App Store link has following format

Apple ID: XXXXXXXXX

https://itunes.apple.com/app/idXXXXXXXXX

enter image description here

bpolat
  • 3,879
  • 20
  • 26
  • Thank you! And bpolat .. for example if my app name is My App and my Apple ID is 123456789 than that url will be like this: https://itunes.apple.com/My-App/id123456789 ? – SwiftNinja Nov 15 '14 at 07:01
  • 1
    it would be https://itunes.apple.com/app/id123456789 this method does not require app name. because you are free to change app name but apple id stays same. you can the method one your available app if you have on appstore – bpolat Nov 15 '14 at 07:22