Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get app id from iOS application programmatically?

Is there any way for getting appstore id from running iOS application? (For asking user to rate it and providing link to appstore.)

like image 662
breakp01nt Avatar asked Oct 05 '11 18:10

breakp01nt


People also ask

How do I find my iOS App ID?

When you enter the Member Center on http://developer.apple.com, click you name on the top right and click on “View Account”. You will find your team ID under the Developer Account Summary. In order to support Universal Links, the Apple App ID will need to be included in your Bitly iOS app configuration.

What is iOS App ID?

An "App ID" is a unique identifier that iOS uses to allow your application to connect to the Apple Push Notification service, share keychain data between applications, and to communicate with external hardware accessories you wish to pair to your iOS application.

What is app ID in iOS Swift?

An App ID is a two-part string used to identify one or more apps from a single development team. The string consists of a Team ID and a bundle ID search string, with a period ( . ) separating the two parts.


2 Answers

Yes, it is. You can't get appstore app id (called Apple ID in iTunes Connect) offline, but you can request it using iTunes Search Api. Download the context of the following link:

http://itunes.apple.com/lookup?bundleId=YOUR_APP_BUNDLE_ID 

You will get a JSON response, containing "trackId":YOUR_APP_ID key-value. Try it in your browser!

My answer is based on the another answer: https://stackoverflow.com/a/11626157/3050403

like image 87
kelin Avatar answered Sep 18 '22 20:09

kelin


Use

NSString* appID = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"]; 

Updating the answer with comment by @zaheer

Bundle.main.infoDictionary?["CFBundleIdentifier"] as? String 
like image 23
gvaish Avatar answered Sep 19 '22 20:09

gvaish