Skip to content

Instantly share code, notes, and snippets.

@galaxy001
Forked from linjunpop/README.md
Created March 3, 2017 18:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save galaxy001/88ef9cf78c54d0b4dde3e7f19c451018 to your computer and use it in GitHub Desktop.
Save galaxy001/88ef9cf78c54d0b4dde3e7f19c451018 to your computer and use it in GitHub Desktop.
iOS 内购验证

iOS 内购验证

相关资料

本地验证:

优点:

  • 无需服务器验证

缺点:

  • 项目里需要引入 OpenSSL

链接:

服务器验证:

优点:

  • server-side verification over SSL is the most reliable way to determine the authenticity of purchasing records

缺点:

  • 需要部署服务器,服务器和 App 之间的数据交换可能更容易被破解

链接:

双重验证:

先本地验证一次,后服务器再验证一次(感觉没必要)

其他:

常见的破解方法:

总的来说:

  • 服务器验证更适合有自己账号系统的 App,直接可以对 IAP 破解免疫,否则一样很简单就被破解
  • 本地验证使用下面的方法来增强验证
    • Check that the SSL certificate used to connect to the App Store server is an EV certificate.
    • Check that the information returned from validation matches the information in the SKPayment object.
    • Check that the receipt has a valid signature.
    • Check that new transactions have a unique transaction ID.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment