问题标签 [in-app-purchase-receipt]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
117 浏览

ios - iOS App Store 收据和验证示例

对于尚未在 Apple App Store 上发布的免费应用程序,我正在努力测试收据验证功能。

Bundle.main.appStoreReceiptURL是收据明显所在的位置,但不能保证收据末尾有文件。

我的假设是:

  1. 从 App Store 下载应用程序后,必须有收据。即使应用程序是免费的
  2. 此收据可通过以下方式验证:https ://developer.apple.com/documentation/appstorereceipts/responsebody/receipt
  3. 创建该收据不一定需要应用内购买。

上述假设是否准确?如果是这样,甚至无法找到查看样本收据的方法(即使在 TestFlight 上下载)。

我不知道如何测试这个!

0 投票
0 回答
27 浏览

cocoapods - 需要知道为什么我在卸载并重新安装应用程序以获取应用程序内购买功能时收到空白收据

我正在使用 pod“TPInAppReceipt”来验证收据。我已经通过使用 Xcode 商店套件配置在我的项目中实现了自动更新订阅。需要帮助才能知道为什么我在卸载和重新安装应用程序时收到空收据。如何获取所有以前的购买和订阅状态。

在 Appdelegate.swift 中

输出:- 重新安装应用程序后

获取新收据...

  1. hasPurchases..=> 假
  2. 购买..=> []
  3. activePurchases ..=> []
  4. activeSub ..=> 错误错误...3
0 投票
1 回答
56 浏览

ios - In-app purchase asks every time to sign-in Apple ID and password on IPAD specifically when installed from test flight

My app's IAP works fine on local build for iPhones and IPAD for iOS 15.1 but when I upload it on a test flight, it keeps on displaying enter apple id and password even I have signed into it on the app store using a sandbox account. This problem occurs only on iPad iOS 15.1 and works fine for every other device that too when I install the app from a test flight. When I take a local build from Xcode, the issue does not happen.