苹果ios购买收据数据的最大长度是多少? [英] what's the likely max length of apple ios purchase receipt-data?

查看:1224
本文介绍了苹果ios购买收据数据的最大长度是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开始测试iOS自动更新购买之前,我需要准备我的服务器数据库。我的问题很简单。我想知道我应该在我的数据库中创建varchar字段的大小。

Before beginning to test the iOS autorenewing purchases I need to prepare my server database. My question is simple. I just wanna know what size I should make the varchar field in my database.

推荐答案

我使用varchar(4096)存储我的base64编码收据。

I was using a varchar (4096) to store my base64 encoded receipts.

但是说实话,我在官方文档(或其他地方)找不到任何有关收据长度的事情。我唯一找到的是 是收据内容/格式可能会更改:

But to be honest, I couldn't find anything regarding receipt length on the official documentation (or anywhere else). The only thing I did find on Apple's docs was that the receipt content/format is subject to change:

商店收据的格式是私人的并可能更改。您的应用程序不应尝试直接解析收据数据。使用此处描述的机制验证收据并检索其中存储的信息。

The contents and format of the store receipt is private and subject to change. Your application should not attempt to parse the receipt data directly. Use the mechanism described here to validate the receipt and retrieve the information stored inside it.

因此,可能要对文本而不是varchar真的是最好的选择。

So probably going for text instead of varchar really is the best option.

这篇关于苹果ios购买收据数据的最大长度是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆