Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to figure out the app ID programmatically at runtime?

Is there a way to do that? I would hate it to hard-code the app ID somewhere...

like image 605
dontWatchMyProfile Avatar asked Jul 10 '10 11:07

dontWatchMyProfile


2 Answers

If you mean your com.whatever.whatever identification:

NSString *myAppID = [[NSBundle mainBundle] bundleIdentifier];

If you mean your iTunes id123456789 identification, it's not available to you at runtime, but is given to you on iTunes Connect and can be manually inserted into your app from there.

like image 73
Jonathan Grynspan Avatar answered Oct 25 '22 12:10

Jonathan Grynspan


No way to do this. I think you are probably trying to link to your product page right? Try the link method using your name of your app

http://itunes.com/apps/<YOUR APP NAME>

Try it

like image 39
coneybeare Avatar answered Oct 25 '22 10:10

coneybeare