如何让付费会员进入我的iOS应用程序的某些部分进行应用内购买? [英] How to let only paid members into my iOS app's some sections with in-app purchase?

查看:118
本文介绍了如何让付费会员进入我的iOS应用程序的某些部分进行应用内购买?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,其中我只有付费用户的部分,他们使用iOS中的应用程序内部系统购买该部分。我知道我需要自己跟踪购买历史,这就是问题的开始。我有一个数据库,我能够使用Web服务接口将用户存储在我的数据库中。如何在用户完成购买时创建一个只有 的网址的系统。

I am developing an application where I have a section only for paid users where they purchase for the section using the in-app purhcase system in iOS. I know that I need to keep track of the purchase history myself, and this is where the problem begins. I have a database and I am capable of storing users in my database, with a web service interface. How can I create a system where a URL is pinged only when a user has made the purchase.

例如,我有一个网址:

http://example.com/registerUserPremium / userid = 123456

如何在购买时才能调用此功能?最优雅的方式似乎是Apple在购买时使用特殊用户ID ping URL,但我找不到这样做的方法。这显然不是让用户在应用程序中调用该URL的解决方案,因为它可以被破解/盗版。提供防盗版机制的好方法是什么?我的服务是基于网络的,所以如果我可以完成这部分,其余的依赖于我的服务器端机制(用户只需将存储在其钥匙串中的特殊密钥发送到服务器)所以我将成为能够完成项目。简而言之,我只需要在购买时调用URL。有哪些可能的解决方案?

How can I get this to be called only when a purchase is made? The most elegant way seems like Apple pinging the URL with a special user ID upon purchase, but I can't find a way of doing it. It is obviously not a solution to make the user call that URL within the app, as it can be cracked/pirated. What is a good way of providing such a mechanism that is piracy-proof. My service is web-based, so if I can get this part done, the rest relies on my server-side mechanism (the user will just send a special key that is stored in its keychain, to the server) so I'll be able to finish the project. In short, I need a way to call a URL only when a purchase is made. What are some possible solutions?

谢谢,

可以。

推荐答案

我看到两个解决方案:


  1. 服务器产品型号 ( doc ):每次用户进行购买时,appstore都会与您的服务器联系。在这种情况下,您可以立即获得所有信息。

  1. "Server product model" (doc): the appstore contact your servers every time a user makes a purchase. In this case you have all of the information right away.

内置产品型号(同一文档)其中应用程序从appstore获取收据。在后一种情况下,您可以联系您的服务器特殊URL,提供收据信息,服务器可以验证收据是否未被篡改,要求应用商店验证(这是一个简单的帖子,请参阅此处)。

"Builtin product model" (same doc) in which the application gets the receipt from the appstore. In this latter case you can contact your server special URL, providing the receipt information, and the server can verify that the receipt has not been tampered with asking the app store to verify (it's a simple post, see here).

这篇关于如何让付费会员进入我的iOS应用程序的某些部分进行应用内购买?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆