I am building an app, which takes pictures from the camera and uses AVAssetWriter to create a video file. Though the app is working perfectly on iPhoneX, but it crashes on my iPhone 6.
The peak memory usage while recording this video is around 250MB, yet the app is crashing and the console says, Terminated due to memory issue.
The peak memory usage is same on both iPhone 6 and X.
Every time the app crosses 230MB, applicationDidReceiveMemoryWarning is fired. Why is the app crashing at such low memory usage?
A similar question is already there: high peak memory usage when writing large amount images to video file using AVAssetWriter but with no solution.