4

I would like to identify whether an app is paid or free; programmatically, at runtime.

To brief on the context I'm working on, I'm developing an SDK which can be used by various third-party apps. I would like to identify if the app that is using my SDK is paid or free.

Any suggestions to find this?

Roham Rafii
  • 2,929
  • 7
  • 35
  • 49
Adithya
  • 4,545
  • 3
  • 25
  • 28
  • 4
    I don't know if this can be done, because you set whether its free or paid for when submitting to the App Store, the app itself has no way of knowing. It would be interesting to know though. – Popeye Apr 19 '13 at 09:36
  • Is your SDK going to be open source? I ask because if so, someone could easily remove your check, and it may make more sense to just write the paid/free distinction into the license agreement. – sapi Apr 19 '13 at 09:37
  • @sapi Sorry, I didn't get you. How would writing something in the license agreement help me identifying some info of the app that is using it? And No, its not open source. – Adithya Apr 19 '13 at 09:49
  • It wouldn't help you find the information, but if it were an open source app, you couldn't stop people ignoring your check (whatever the reason for it may be) by simply removing it. If that was your concern, my suggestion would have been to deal with the issue from a legal standpoint rather than a technical one. – sapi Apr 19 '13 at 12:26

3 Answers3

6

You should make them configure your SDK writing their app id somewhere, and then your SDK have to check the app store webservices like this

https://itunes.apple.com/lookup?id=theAppID

There you can check the price

Hemang
  • 26,840
  • 19
  • 119
  • 186
jcesarmobile
  • 51,328
  • 11
  • 132
  • 176
  • http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html#searching – Desdenova Apr 19 '13 at 10:00
  • Actually I do get the appID of the app. I think this should work. I will try this and let you guys know. Thanks! – Adithya Apr 19 '13 at 10:00
  • It's documented, see Desdenova link. – jcesarmobile Apr 19 '13 at 10:03
  • Got it from http://stackoverflow.com/questions/9717159/get-itunes-app-store-id-of-an-app-itself and some other links whilst looking into this. That link is the first time it shows it as being documented I take back my comment. – Popeye Apr 19 '13 at 10:06
  • 1
    In that link they use http://itunes.apple.com/lookup?bundleId=theAppBundle. This is undocumented but not ttps://itunes.apple.com/lookup?id=theAppID. The bundle link is better because you can read it from the info.plist, but they can change it – jcesarmobile Apr 19 '13 at 10:15
2

One thing you can do is this

https://itunes.apple.com/lookup?id=YOUR_APP_ID

and then fetch price & currency values from the returned JSON

Popeye
  • 11,839
  • 9
  • 58
  • 91
Desdenova
  • 5,326
  • 8
  • 37
  • 45
1

There is a way tick into my mind,

Add a logic to get application name which using your SDKalso add some logic to send that name to you via API or any other way you preferred.

Once you get a new name in your server database, you can, open AppStore in iTunes, and search for the application there, and yes you'll get to know whether they are paid or free!

I know its tough if your SDKwill be going to fly with many apps, but not hard.

An alternate way, if there's some way that you get to know whether app is paid or free, then, you can do the same thing, send app name, and its price details.

Hemang
  • 26,840
  • 19
  • 119
  • 186
  • I think this would be the only feasable way... there is no 'automated way -- I opened a feature request almost 2 years ago to get the receipt of the app's purchase via StoreKit or so but no – Daij-Djan Apr 19 '13 at 09:52
  • Thanks for the answer.. I think the first method you had provided should work. – Adithya Apr 19 '13 at 10:05