iOS 12 Lock Screen Rich Media Previews
Apple’s iOS 12 allows users to interact with rich media directly from the lock screen without fully opening the underlying application. Through expanded support for the UserNotifications framework, lock screen alerts can display static images, animated graphics, audio recordings, and video clips. This guide breaks down the specific rich media types supported on the iOS 12 lock screen, their technical file constraints, and how interactive previews function.
Supported Media Formats
iOS 12 supports rich media attachments via the
UNNotificationAttachment API. When a notification arrives,
the system displays a thumbnail, which can be expanded into a full
preview using 3D Touch or a long-press gesture. The supported media
types include:
- Static Images: Standard photographic and graphic formats, including JPEG, PNG, and BMP.
- Animated GIFs: Fully animated GIF files that loop within both the expanded view and the preview interface.
- Audio Files: Sound files that can be listened to directly on the lock screen, including MP3, M4A, WAV, and AIFF. The interface includes playback controls such as play, pause, and scrub bars.
- Video Files: Compressed video clips including MPEG-4 (.mp4) and QuickTime movies (.mov). Videos can play inline with full playback controls within the expanded notification container.
System Limits and File Constraints
To ensure optimal performance, battery efficiency, and swift delivery, iOS enforces strict limits on notification attachment file sizes:
- Images: Maximum size of 10 MB (JPEG, PNG).
- Audio: Maximum size of 5 MB (MP3, M4A, WAV).
- Video: Maximum size of 50 MB (MP4, MOV).
- GIFs: Capped under the 10 MB image threshold, though smaller sizes are recommended to prevent memory-related rendering failures.
Attachments must be stored locally on the device disk before the notification is presented. Developers typically use a Notification Service Extension to download the media asset from a remote server before handing it to the lock screen renderer.
Interaction and Display Mechanisms
In iOS 12, rich notifications can be engaged in multiple ways:
- 3D Touch and Haptic Touch: Users can press firmly (on 3D Touch-equipped devices) or long-press (introduced for devices like the iPhone XR and iPads) to expand the thumbnail into a full-sized interactive view.
- Notification Content Extensions: Beyond native media players, iOS 12 allows developers to build custom user interfaces via Notification Content App Extensions. This allows custom controls to be rendered alongside the media preview, such as dynamic buttons to reply, share, snooze, or like content directly from the lock screen interface.