应用程序内购买在 iPhone 应用程序之外完成

发布于 2024-09-28 19:05:31 字数 269 浏览 3 评论 0原文

我正在实施应用内购买订阅模型。

假设我有一个 iPhone 3 用户,他从我的应用程序开始整个购买过程,然后退出应用程序,然后继续在我的应用程序之外填写他的应用程序商店凭据,直到他完成购买。

我的应用程序如何知道交易是在启动时进行的? 另外,如果我确实收到此信息,我如何判断它不是旧订阅期(已过期)的旧购买?

最后但并非最不重要的一点是,如果设备支持多任务处理并且购买已完成,而我的应用程序处于后台,我将如何在返回前台时收到通知?

谢谢罗伊

I am implementing an in app purchase subscription model.

Let's say I have an iPhone 3 user which starts the whole purchase process from my application and then exits the application only to continue and fill his app store credentials outside of my app until he is done with the purchase.

How can my app know that the transaction was made upon launch?
Also in case I do get this info how can I tell it is not an old purchase for an old subscription period which has already expired?

And last but not least in case the device supports multitasking and the purchase was finished while my app was in the background how will I get notified upon returning to the foreground?

Thanks

Roi

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

清风夜微凉 2024-10-05 19:05:31

Have you read Apple's Documentation - In App Purchase Programming Guide? I believe it answers all your questions.

草莓酥 2024-10-05 19:05:31

- (void)recordTransaction:(SKPaymentTransaction *)transaction 方法可以解决您的大部分问题。

一旦你正确地实现了这个方法,你只需要检查应用内购买是否完成即可。剩下的由支付方式来处理。

谢谢

The - (void)recordTransaction:(SKPaymentTransaction *)transaction method takes care of most of your pains.

Once you properly implement this method,you would just have to check whether the inApp purchase is done.Rest is taken care of by the payment methods.

Thanks

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文