iOS平台AAC音频文件的Uniform Type Identifier(UTI)是什么?
Hey there, great question given your custom offline playback setup with AVAssetResourceLoaderDelegate! Let’s break down the Uniform Type Identifiers you need for your AAC files:
Apple-specific M4A/AAC UTI:
com.apple.m4a-audio
This is the go-to UTI for AAC audio wrapped in an M4A container, which is the standard format for DRM-protected AAC content in Apple’s ecosystem (like FairPlay-protected HLS streams). It’s the most specific identifier you’ll want to use for your downloaded files.Generic MPEG-4 Audio UTI:
public.mpeg-4-audio
If you need broader compatibility (for example, if your HLS segments might use different MPEG-4 audio variants), this system-level UTI covers all MPEG-4 audio formats including AAC. It’s a safe fallback if you’re unsure about the exact container specifics.
A quick note for your DRM use case: You don’t need a separate UTI for the DRM wrapper itself. The DRM protection is embedded within the audio container, so the above UTIs still apply perfectly. When saving your downloaded files locally, make sure to associate these UTIs with the files via FileManager (Swift) or NSFileManager (Objective-C) — this helps AVFoundation properly recognize and validate the DRM-protected content when you serve it via your resource loader delegate.
内容的提问来源于stack exchange,提问作者Tom Hamming

