gpt4 book ai didi

apple-appclips - 为什么 App Clip 代码负载大小限制这么小

转载 作者:行者123 更新时间:2023-12-04 07:40:34 25 4
gpt4 key购买 nike

我们正在使用 App Clips,虽然使用 Apple 的 App Clip Codes 会很好,但有效载荷限制似乎小得无法使用。甚至尝试对一个相对较短的 URL 进行编码,如下所示:

AppClipCodeGenerator generate --url 'https://www.example.com/1234567890ABCD' --index 8 --output ./appclip8.svg 

返回错误:

Compressed URL too large: The compressed URL byte size exceeds supported payload size of the App Clip Code.

因此,对任何有用的内容进行编码的唯一方法是将所有参数保存在数据库中并在 URL 中进行引用,但这会增加额外的往返请求以检索该数据。我错过了什么吗?

最佳答案

来自 Apple

An App Clip Code can only contain a limited amount of information, andas a result, the tools you use to create the code compress the encodedinvocation URL. The underlying encoding algorithm can encode somewords efficiently, while some characters may reduce the algorithm’sefficiency. As a result, the exact length of an invocation URL you canencode in an App Clip Code varies based on the ASCII characters andwords you use.

When you create an App Clip Code, both App Store Connect and the AppClip Code Generator command-line tool inform you if your invocationURL is too long.

To ensure you can encode your invocation URL in an App Clip Code:

Use the minimum number of characters you need to uniquely identify aresource. Long unique identifiers (UUIDs) lower the effectiveness ofthe encoding.

Use a short host name with as few subdomains as possible.

If possible, remove the www subdomain from your host name.

Use decimal numbers as values for query components.

Replace long query string argument names and values with shortstrings. For example, use https://example.com/?p=0 instead ofhttps://example.com/?status=view.

Omit a trailing slash (/) character at the end of the URL. Forexample, use https://example.com instead of https://example.com/.

关于apple-appclips - 为什么 App Clip 代码负载大小限制这么小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67500736/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com