开发者

How can I find out how much a user has paid for my app inside my app?

开发者 https://www.devze.com 2023-01-18 19:24 出处:网络
After a user purchases an app from the app store, and runs it, is it possible for the app to know how much the user paid for it? Does Apple have any APIs that can access this type of metadata about th

After a user purchases an app from the app store, and runs it, is it possible for the app to know how much the user paid for it? Does Apple have any APIs that can access this type of metadata about the actual purchase of an app?

If not, I suppose I could fall back to looking up the country of the user, doing currency conversion rates, and then lookup the price o开发者_开发百科f the app at the time of purchase. That's another thing, is it even possible to know when a user has purchased an app? They could purchase an app, and then not run it for days or weeks, so I cannot assume the date they first launch the app was also the date of purchase.

Any thoughts on how to obtain this information?


This isn't possible through any kind of API. What you can do is have the device send data back to your server on first launch with location and date. This way, you can mark them in your DB as xx paid yy on this date. You know what yy is currently because you run the server and the app page. Make this info accessible somehow on your server, and when you need it in the app, call your servers method to retrieve it.

0

精彩评论

暂无评论...
验证码 换一张
取 消