Why does my Unity ios app's Documents and Data keep increasing?

325 Views Asked by At

I created my first app back in July. It came out to be 55mb. I have recently noticed that the Documents and Data section for my app is 150mb, nearly 3 times the app size. Doing more tests I have realized that each time I play the game it increases by 1mb. It is now at 170mb. I am using Unity 5.6.1p4 and Google Admob.

My app does not download any update files to run the game so that isn't the issue. I have a couple of guesses but none seem very likely: 1) My game is only about half as optimized as it should be. I still use a lot of instantiate and destroy. An other post said that the memory issue is due to Apple's inability to garbage collect. That is a possibility but I cannot understand why the data from instantiate/destroy would be cached. I also find it hard to believe no one else has had that issue. 2) When the game first starts, it automatically loads a banner ad and a video ad so that there is no delay when the user first requests a reward video. Some people have said that Google Admob caches ads so there is less data usage. That seems like it would cause some increase in file size but 170mb is too much data to be cached. Again I find it hard to believe no one would have complained to Google about this before.

Any help would be greatly appreciated. I cannot figure out what would be causing it. If you are interested in seeing the problem first hand, the App Store link is https://appsto.re/us/nco9gb.i

1

There are 1 best solutions below

0
Health_Potion On

Ok, here is my findings: This is either an issue for older phones, or iOS 10.x.
However, I do not know which. I am able to test iOS 10 on older phones (5, 5s and ipad 1). I am not able to find any newer device still running iOS 10.
This memory glitch does not seem to happen on iOS 11. I was able to test it on 3x iphone 6s, 2x iphone 7 all running iOS 11.

It is not as clear as I would like it to be but iOS 11 does not appear to have the memory issue. As much as I would like to find the cause and fix it, I think the majority of people should be safe because they update.