0

I have a requirement for an app to share a link to itself on the app store via social sharing i.e. this sort of thing:

"I've been using this great app, you can get it at: "

Therefore the app needs to know what its app store url will be before it is submitted to the app store, is this possible?

Gruntcakes
  • 37,738
  • 44
  • 184
  • 378

3 Answers3

0

You may be able to make an educated guess using the current format of the iTunes URLs which is:

https://itunes.apple.com/{country_code}/app/{app_name}/id{app_id}?mt=8

Once you create a "New App" in iTunes Connect, you should get your App id, so you could plug it into the URL.

Another alternative, if you have the ability to make a simple HTTP call from your app then you could simply bake the boilerplate portion of the URL into the code (e.g. https://itunes.apple.com/us/app/{app_name}/id{app_id}?mt=8), and then when your app launches, reach out to the URL where you've specified the proper id of your app. Save that in NSUserDefaults and construct the URL in code from that point on.

If you do not have a website or custom back-end, you could look into a service like Parse to help you out.

Good Luck!

Ric Perrott
  • 597
  • 2
  • 9
0

You can use your app ID to construct the URL. You can get the ID from the iTunesConnect page for the app, then construct the URL thus:

#define APP_ID 653451876

NSString* url = [NSString stringWithFormat: @"http://itunes.apple.com/us/app/cap-that!/id%d",APP_ID];

See there https://stackoverflow.com/a/12764735/877032

Community
  • 1
  • 1
Jbryson
  • 2,875
  • 1
  • 31
  • 53
-1

If you are the developer of the app, in google play store you can know it, for example: https://play.google.com/store/apps/details?id=com.madfingergames.deadzone https://play.google.com/store/apps/details?id=com.whawhawhat.referencejquery

You see that there is https://play.google.com/store/apps/details?id= and then the Package name which is something like: com.mycompany.myfirstapp

In the iTunes store an app gets an id so it's not possible.

Ahmed
  • 585
  • 2
  • 5
  • 17