Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
自动续订订阅有一个 id,但可以有多个持续时间。我想知道如何指定用户选择购买的持续时间,但 SKProduct 中没有“持续时间”这样的字段。 问题:不可能在代码中选择自动更新订阅的持续时间,而是用户在本机对话框中选择一个,这是否正确?
您必须从 iTunes 中的产品 ID 推断出的持续时间。没有其他选择。与 Apple 文档一样
SKPaymentTransaction 对象或 App Store 收据验证器返回的收据数据中未提供订阅的长度。您应该为每个订阅长度使用不同的产品标识符,以便您的应用程序可以将产品标识符转换为订阅长度。
例如 com.mycompany.6monthssub com.mycompany.1yearsub