基于什么,iOS App切片有效?是否需要任何代码或其他东西? [英] Based on what, iOS App slicing works? Is there any code or other stuff required for it?

查看:64
本文介绍了基于什么,iOS App切片有效?是否需要任何代码或其他东西?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究iOS 9功能,并经历了应用程序精简的概念.

I have been studying iOS 9 features and went through the concept of App Thinning.

我从Apple文档中读取了应用程序切片(应用程序稀疏的一部分),说:

I have read from Apple documentation for App slicing (a part of App thinning) saying that:

切片是创建和交付应用程序变体的过程 捆绑到不同的目标设备.变体仅包含 目标所需的可执行体系结构和资源 设备.您将继续开发和上传完整版的应用程序 到iTunes Connect.商店将创造并交付不同的 基于您的应用支持的设备的变体.图像资源是 根据其分辨率和设备系列进行了切片.

Slicing is the process of creating and delivering variants of the app bundle for different target devices. A variant contains only the executable architecture and resources that are needed for the target device. You continue to develop and upload full versions of your app to iTunes Connect. The store will create and deliver different variants based on the devices your app supports. Image resources are sliced according to their resolution and device family.

因此,据此我可以理解,如果我将图像定义为@1x @2x @3x,那么如果用户使用iPhone 6 plus,则仅下载@ 3x图像.但是其他资源呢?

So, based on that I can understand that if I define images as @1x @2x @3x, then if user has iPhone 6 plus, then only @3x images would be downloaded. But what about other resources?

我必须为App slicing编写任何代码吗?除了图像之外,我还能从其他应用程序中受益于其他应用吗?

Would I have to write any code for App slicing? And what are the other ways that I can benefit App thinning apart from the images?

推荐答案

应用程序切片不仅支持基于1x,2x和3x的图像,而且还支持Metal,音频,Sprite地图集等.应用程序结构如下所示: :

App Slicing not only supports images based on 1x, 2x and 3x, but it also supports Metal, audio, Sprite atlases etc. An app structure is depicted as follows:

很明显,除了图像之外,OpenGL ES,Metal,音频和处理器特定的代码都包含在应用程序捆绑包中.在应用切片中,根据要下载应用的设备选择适当的资源.

It is clear that other than images, OpenGL ES, Metal, Audio and processor specific codes are in an app bundle. In app slicing, appropriate resources are selected based on the device to which the app is downloaded.

唯一要做的就是使用资产目录.要做的是在资产目录中添加文件

The only thing to do is to use asset catalogs. The thing to here is to add files in the asset catalogs

每个苹果, 切片是在您正常的开发和分发工作流程中执行的,通常如下进行:

As per apple, Slicing is performed during your normal development and distribution workflows, which proceed generally as follows:

在Xcode中,指定目标设备并在资产目录中提供图像的多种分辨率. 您必须使用资产目录才能对资源进行切片.

In Xcode, specify target devices and provide multiple resolutions of images in the asset catalog. You must use the asset catalog in order for resources to be sliced.

在Simulator或设备上构建并运行该应用程序. Xcode为所选设备类型构建应用程序的变体,从而缩短了调试构建时间,并允许您在本地测试变体.

Build and run the app in Simulator or on a device. Xcode builds a variant of the app for the selected device type, improving the debug build time and allowing you to test variants locally.

创建应用程序的存档,并在本地导出目标设备的变体. 测试您在目标设备上导出的所有变体,以及早发现配置问题.

Create an archive of the app and export a variant locally for target devices. Test all the variants you export on target devices to discover configuration issues early.

将该应用程序上载到iTunes Connect. 商店从存档中创建单个应用程序变体.变体的数量取决于Xcode项目中指定的体系结构和资源.

Upload the app to iTunes Connect. The store creates individual app variants from the archive. The number of variants depends on the architectures and resources specified in the Xcode project.

在iTunes Connect中,将您的应用的预发行版本分发给指定的测试人员. 测试人员使用TestFlight在支持的设备上安装预发行版本. TestFlight下载特定于用户设备的应用程序变体.

In iTunes Connect, distribute a prerelease version of your app to designated testers. Testers install the prerelease version on supported devices using TestFlight. TestFlight downloads a variant of the app specific to the user’s device.

注意:要在将应用分发给用户之前测试商店构建的变体,请仅邀请内部测试人员(您团队的iTunes Connect用户)并使用TestFlight下载变体.如果您邀请外部测试人员(用户仅指定他们的电子邮件地址),则外部测试人员必须等待Beta App Review批准该应用程序,然后才能下载变体. 在iTunes Connect中,释放该应用程序. 用户在支持的设备上安装该应用程序,而商店应用程序下载该用户设备专用的应用程序变体.

Note: To test the variants that the store builds before you distribute your app to users, invite internal testers (your team’s iTunes Connect users) only and download the variants using TestFlight. If you invite external testers (users specifying only their email addresses), the external testers must wait for Beta App Review to approve the app before they can download variants. In iTunes Connect, release the app. Users install the app on supported devices, and the store app downloads a variant of the app specific to the user’s device.

应用分发指南中了解更多信息

这篇关于基于什么,iOS App切片有效?是否需要任何代码或其他东西?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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