Tracking Down Memory Crashes on iOS in Unity
Your game quits on iPhone with no stack trace. It is probably iOS ending the app for using too much memory. Here is how to confirm it, find the cause, and fix it.

A Unity iOS memory crash usually is not a crash at all. iOS ends the app when it uses too much memory, so there is no Unity exception and often no stack trace. To fix it, confirm it was a memory kill, measure real memory in Xcode, find the largest assets with Unity's Memory Profiler, then cut textures, audio and leaks.
Step 1: confirm it is a memory kill
When iOS runs short on memory, its system watchdog, often called jetsam, ends the biggest app. From the player's side the game simply closes. Before you chase code bugs, check that this is what happened.
- Run a development build from Xcode on a real device. If memory is the cause, Xcode usually reports the app was terminated due to a memory issue.
- On the device, open Settings, then Privacy & Security, then Analytics & Improvements, then Analytics Data. Look for files starting with JetsamEvent around the time of the crash.
- If you see a normal crash log with a Unity or IL2CPP stack instead, it is a code crash. Debug that separately.
Test on the oldest device you support. Older iPhones have less memory, and the limit an app can use is lower than the device total.
Step 2: measure memory where it counts
The Unity Profiler in the Editor does not show you true device memory. Use the device.
- Xcode memory gauge: run from Xcode and open the Debug navigator. Watch the memory graph while you play. Note the peak, and whether it climbs between scenes.
- Instruments: use the Allocations and VM Tracker templates for a fuller view, including memory that Unity's tools do not see, like some plugin and graphics allocations.
- Memory Profiler package: install com.unity.memoryprofiler through Window, then Package Manager. Connect to the device build and take snapshots.
Take one snapshot in the main menu, one mid-level, and one after returning to the menu. If the third is much larger than the first, something is not being released.
Step 3: find the usual suspects
Most iOS memory problems in mobile Unity games come from a short list. Sort the Memory Profiler's all-objects view by size and check these first.
| Suspect | What to look for | Typical fix |
|---|---|---|
| Textures | Large sizes, Read/Write enabled, no compression | ASTC compression, lower max size, disable Read/Write |
| Audio | Long music loaded as Decompress On Load | Set to Streaming or Compressed In Memory |
| Atlases and UI | Huge sprite atlases loaded all at once | Split atlases by screen |
| Leaked scenes | Old scene objects still in memory | Unload assets after scene change |
| Static lists | Caches that only grow | Clear them on scene exit |
Textures are usually the biggest lever. A 2048 by 2048 texture with Read/Write enabled keeps an extra copy in CPU memory. If you do not read pixels from code, turn it off in the texture import settings.
Step 4: fix texture and audio settings in bulk
Changing hundreds of import settings by hand is slow. An AssetPostprocessor applies rules automatically to everything in a folder.
using UnityEditor;
public class IosTextureRules : AssetPostprocessor
{
void OnPreprocessTexture()
{
var ti = (TextureImporter)assetImporter;
ti.isReadable = false;
var ios = ti.GetPlatformTextureSettings("iPhone");
ios.overridden = true;
ios.maxTextureSize = 1024;
ios.format = TextureImporterFormat.ASTC_6x6;
ti.SetPlatformTextureSettings(ios);
}
}
Reimport the folder and compare snapshots. Adjust the max size per folder, since UI and backgrounds may need more than props. For audio, set music clips to Streaming in the import settings for the iOS platform.
Step 5: release what you no longer need
Unity does not always free assets just because a scene changed. If you load additively or keep references in static fields, assets stay alive. After a big scene change, call Resources.UnloadUnusedAssets and make sure nothing static points at old objects.
IEnumerator SwitchLevel(string next)
{
yield return SceneManager.LoadSceneAsync(next);
yield return Resources.UnloadUnusedAssets();
}
If you use Addressables, every load needs a matching Release. A missing release is one of the most common leaks. Our post comparing Addressables and Asset Bundles covers the handle lifecycle.
Step 6: react when iOS warns you
iOS sends a low memory warning before it ends the app. Unity exposes this through the Application.lowMemory event. Use it to drop caches you can rebuild.
void OnEnable() => Application.lowMemory += OnLowMemory;
void OnDisable() => Application.lowMemory -= OnLowMemory;
void OnLowMemory()
{
iconCache.Clear();
Resources.UnloadUnusedAssets();
}
This is a safety net, not a fix. If you hit the warning in normal play, your baseline is too high.
Find your peak memory on the oldest supported iPhone, then aim to stay well below it with room for the OS and ads.
What we would do
We would reproduce on the oldest supported device first and confirm the jetsam log. Then we would take three Memory Profiler snapshots and fix the top five items by size, which is often textures and audio.
We would add the AssetPostprocessor so new assets cannot slip back in at full size, and add a memory check to the release checklist. Ads SDKs also use memory, so we would test with ads enabled, not just in a clean build.
The short version
- Most "crashes" with no stack trace on iOS are memory kills. Check for JetsamEvent logs.
- Measure on a real device with Xcode, Instruments and the Memory Profiler package.
- Textures with Read/Write on and no compression are the usual top culprit.
- Use an AssetPostprocessor so import rules apply to every new asset.
- Unload unused assets after scene changes and release every Addressables handle.
If your iOS build is stuck on memory before a deadline, we can help.
Related reading: How to reduce Unity build size, Unity mobile performance on low-end Android, Debug frame drops on Android fast
Got a game idea? We build it.
You bring the concept. We design, build, test and launch it, and you own 100% of the finished game.
Share Your Game Idea →