跳至主要内容

博文

目前显示的是 十月, 2019的博文

苹果内购审核注意事项

参考文章: https://stackoverflow.com/questions/53477564/skproductsrequest-returns-no-product-in-production-environment https://stackoverflow.com/questions/39962649/missing-in-app-purchase-section-in-itunes-connect https://developer.apple.com/library/archive/technotes/tn2413/_index.html 1. 第一次提交内购项目审核通过后的生效规则 The problem was that, actually, you can't download a list of product until the application is in the " ready for sale " state. As stated in the In app Purchase FAQ: " When an application is approved, the developer must also approve the application for release to the App Store. On approval, the application ID is activated to the App Store. The same activation is required for the in-app purchase identifiers and can only take place once the application is activated. In some cases, the activation of the In-App Purchase identifiers may lag up to 48 hours following the activation of the application. If the developer does not approve the release of the production ap...

收据验证

原文链接 关于收据 收据 (Receipts) 是在 OS X 10.6.6 更新后,和 Mac App Store 一起出现的。 iOS 在内购的时候总是需要向服务器提供收据,而在 iOS 7 之后, iOS 和 OS X 的收据格式开始统一。 一个收据意味着一次可信任的购买记录,每次应用内的购买都会得到一个收据,就像是去超市购物后会拿到一张纸质的收据一样。 关于收据,有以下几个关键的概念: 收据是苹果公司通过 App Store 创建和签名的。 收据是针对某个指定版本的应用和某个指定的设备发放的。 收据存储在本地设备中。 每次的安装和更新操作都会发放新的收据。 安装应用之后,将会发放与应用和设备匹配的收据。 更新应用之后,将会发放与最新版本相匹配的收据。 下列的任何一项交易都会发放收据: 当你通过内购付款购买的时候,将会发放收据用来验证购买记录。 当你恢复以前的交易记录时,将会发放用来验证购买记录的收据。 关于验证 验证收据是保障收入的重要途径,同时也可以加强应用的业务模式。 你可能会感觉到很困惑,为什么苹果不提供简单点的 API 来验证收据。为了便于理解这个问题,我们不妨假设存在这样一个方法 (比如: [[NSBundle mainBundle] validateReceipt] ) 。黑客可以轻易地搜索到这个方法,并且通过代码跳过验证。要是所有开发者都用同样的验证方法,那将会很容易受到攻击。 所以苹果并没有这样做,而是选择了使用标准加密和编码技术来解决这个问题,并且在 官方文档 和  WWDC 视频 里提供了一些帮助,从而使开发者可以实现自己独有的的收据验证代码。但是,整个流程并不简单,并且需要很好的密码学基础和各种信息安全方面的技术。 当然,有一些已经实现好的现成代码 (比如在  Github  上) ,但是它们只是参考实现,并且如果大家都用同样的代码,还是会有前面的问题:黑客将会很容易攻击验证部分的代码。所以,开发一套既独特又安全从而能够抵御普通攻击的安全方案是十分重要的。 补充说明一下,我是  Receigen  这个 Mac 应用的作者, Receigen 可以生成安全且变化的收据验证代码。在这篇文章里,我们将会学习收据验证的技...