WWDC 2015

App Thinning in Xcode

This session telling acdiences how Xcode helps to reduces the size of application at the same time maintaining same user experiences across of all devices.

App Slicing

Slicing the app into different pieces and the suitable pieces will be downloaded according to the devices.

No additional work for developers.

On Demand Resources

Based on the app flow, some resources can be downloaded afterwards like being purchasing via IAP or beating some game levels. ODR (On Demand Resources) helps the developers to define what resources can be downloaded in later time and removed the resource when the resource no longer needed.

Related Session : Introducing On Demand Resources

Asset Slicing

Must use asset catalog for Asset Slicing

Device Traits

  • Graphics capabilities
    • Metal GPUFamily1
    • Metal GPUFamily2
  • Memory Level
    • 1GB
    • 2GB

Asset Catalog also supports named data

  • Store other-than-media file content
  • Classify depends on hardware capabilities
  • User NSDataAsset to retrieve content

Sprite Atlases ties full SpiriteKit integration. Auto-gen of SKTextureAtlases for image asset. Thinned appropriately.

Asset Organization

  • Cataloging efficient is key
  • Robust markup means less redundancy in sliced application variants
  • Don’t leave assets as universal if they are only used on one device family

Workflow

Create

What if Xcode can not used for asset production?

Export image set and data sets from existing asset pipelines

Format : XCAsset Source Artifact (Simple format strcture and JSON markup)

Requirement for integration.

  • Project must have an xcasset folder reference
  • Place any externally generated content within xcasset folder
  • No rules on file hierarchy

Build

Xcode Build and Run automatically thins resources for the active run destination. Supported for all simulator and device run destinations.

Distribute

For enterprise-build, IPA-exporting will have options to export one app for all devices or for certain devices.

Make sure to tick includes manifest for over-the-air installations for generating the plist files that redirecting devices to the thinned IPA.