Setting Up App Thinning (Slicing, Bitcode, On-Demand Resources) for iOS
Application weighs 180 MB when downloading on iPhone 13 mini. On iPad Pro — same binary file with same resources. Though iPad doesn't need @2x assets for 390pt screen — it gets them together with everything. App Thinning solves exactly this: App Store itself builds app variant for specific device and delivers only what's needed.
Three Components of App Thinning
Slicing
App Store creates separate IPA variants for each device/OS combination. iPhone 8 gets only @2x resources and ARMv8 slice of binary. iPad Pro — @3x resources and ARM64e.
Requirement for developer: Asset Catalog. Resources outside .xcassets (lying in folder) don't participate in slicing — they go into all variants. Check: all images must be in Asset Catalog with correct size slots (@1x/@2x/@3x) and trait variations (iPhone/iPad/Mac).
Check result: Xcode → Product → Archive → Distribute → Ad Hoc/Development → Export → App Thinning: All compatible device variants. After export look at App Thinning Size Report.txt — table with sizes for each device.
On-Demand Resources (ODR)
Content not always needed — game levels, tutorials, rarely used filters — marked with tags and loaded on demand. Stored on Apple servers, not in IPA itself.
Setup: in Xcode Target → Build Phases → Copy Bundle Resources → for resource in Asset Catalog set On Demand Resource Tags. In code:
let request = NSBundleResourceRequest(tags: ["level_5"])
request.conditionallyBeginAccessingResources { available in
if available {
// resource already loaded
} else {
request.beginAccessingResources { error in
guard error == nil else { return }
// resource loaded, can use
}
}
}
Limits: initial install bundle — up to 200 MB, on-demand resources — up to 20 GB, simultaneously loaded ODR — up to 2 GB. For games with large content, this fundamentally changes install file size.
Bitcode
Bitcode — LLVM intermediate representation, which Apple can recompile for new architectures without developer republishing. For iOS apps with Xcode 14+ Bitcode is not needed and not supported — Apple removed requirement. For watchOS and tvOS — before Xcode 14 was mandatory.
If application builds on old Xcode (< 14) or supports watchOS/tvOS extension — Bitcode enabled in Build Settings → ENABLE_BITCODE = YES. All third-party libraries and .framework files must contain Bitcode. If even one dependency without Bitcode — entire application loses Bitcode capability.
Typical Configuration Mistakes
- Resources added through
File → Add Filesinstead of Asset Catalog — don't participate in slicing - ODR-tags assigned to files, but
NSBundleResourceRequestdoesn't callendAccessingResources()— resource not released from local storage - ODR testing not done in offline-mode — users discover content loading doesn't handle network absence error
Timeframe
Setting up App Thinning for ready project — 1–3 days. If resources not in Asset Catalog — additionally 2–5 days for migration depending on volume.







