itms-services // action=purchaseIntent无法打开应用程序

6
在iOS11中,苹果引入了可以从AppStore启动的IAP购买。为了测试这个功能,在《WWDC17 StoreKit新功能》视频中,他们提供了以下URL方案:
itms-services://?action=purchaseIntent&bundleId=com.example.app&productIdentifier=product_name

我已经尝试了几次,使用我们的开发应用(IAP项目不在商店中)和生产应用(IAP项目在商店中),有人成功了吗?我错过了一些特殊的步骤吗?

编辑:结果非常愚蠢,我输错了URL。我写成了bunldeId =,而应该是bundleID =。所以,请格外小心,因为URL区分大小写。幸运的是,有人犯了完全相同的拼写错误并找到了解决方案:https://forums.developer.apple.com/thread/83709

2个回答

3

我也遇到了这个问题,让它对我起作用的诀窍是输入完整的productIdentifier,例如com.company.app.pid。苹果的文档非常具有误导性...


1

我通过替换这些值(bunldeIdproductIdentifier)使其正常运作:

itms-services://?action=purchaseIntent&bundleId=com.app&productIdentifier=com.app.product.identifier

  • bundleId(com.app)可以在您的Xcode项目中找到:在.pbxproj文件中,查找General > Bundle Identifier
  • productIdentifier(com.app.product.identifier)可以在App store connect > Features > In-App purchases > Product ID中找到
  • 请注意链接区分大小写。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接