You cannot control the ram available, but you may have information about it.
In such a case, I would:
- determine how much rAM you need
- test for RAM before downloading
- if less than needed, alert user that due to its low RAM, app may fail.
- if he/she takes the risk, he/she is informed.
- Or he/she can free some space.
I found out that its not the user's device issue but the s3 upload that consumes very large amount of memory,
But thanks for your reply!
In most cases free RAM is a meaningless concept. I had a post about this on the old DevForums, but that’s no longer available, so I created a new and improved version that you can find here. Please read it through to learn why you should ignore this particular statistic.
In our app, we use AWS s3 services to upload videos.
I used Instruments to check it and I saw that it does consume more resources … however, there is not much I can do about it, because that's what the upload requires.
In general, uploading a video shouldn’t consume significant amounts of memory. Videos are sufficiently large that you should always upload them from a file, and such uploads have a constant, relatively low, memory usage (data is streamed from the file to the network, and thus you just need a few buffers).
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
If anyone is interested or finding it helpful,
I found out that its not the user's device issue but the s3 upload that consumes very large amount of memory (I used instruments to check what happens when Im trying to upload much bigger files than I tried before and saw that the usage of memory is much bigger than I thought).
After some more research I found that the way that aws is uploading the files, when using multipart upload is to cut the files to smaller chunks and upload them.
The operation of cutting the file to small chunks consume very much memory and thats what caused the crashes.
Waiting for aws reply.