iOS 18.4.1 Crash – Shader Compilation Fails with Permission Denied
Hi everyone — I’m currently integrating Rive into our iOS app and ran into a crash on iOS 18.4.1 (real device only, not simulator) related to Metal shader compilation. Here’s the error we’re seeing:
error: unable to open output file '/private/var/mobile/Containers/Data/Application/XXXXX/Library/Caches/xxx.bundle.identifier/com.apple.metalfe/.../monolithic_metal.pcm': 'Permission denied'
<built-in>:1:10: fatal error: could not build module 'monolithic_metal'
#include "metal_types"This crash only happens on physical devices running iOS 18.4.1, and seems tied to Metal’s internal shader caching. Based on what we’ve investigated:
Rive dynamically compiles Metal shaders.
During this, the Metal compiler tries to write monolithic_metal.pcm into the app’s cache.
iOS 18.4.1 seems to restrict or sandbox that cache path, causing a permission error.
This results in a fatal shader compilation failure and a full crash. The app crashes every time immediately on launch.
Interestingly, the same app runs fine on:
physical devices running iOS 18.3 and below ✅
simulators running iOS 18.4 ✅
But not on physical devices running iOS 18.4.1 that had the app installed before updating the iOS ❌
We’ve also confirmed:
Deleting the app and reinstalling temporarily “fixes” it (clears the shader cache), but that’s not viable for users with local data.
Trying to preemptively delete the com.apple.metalfe directory programmatically results in errno = 13 (“Permission denied”) — iOS now treats that folder as locked-down.
❓ Questions for the Rive Team / Community:
Has anyone else experienced this issue?
Are there any temporary workarounds you’d recommend, other than telling our users to delay updating to iOS 18.4.1?
Should I be submitting a support ticket to Apple Developer Program about this instead of expecting Rive to fix things? i.e. is this actually a bug on Apple’s part…?