I have an app that is available on AppStore, it is a biological recognition app, so there's lots of C/C++ code in this app, and it goes well on iOS7 to iOS9, but when I tested in on iOS10, it always crashed dued to memory issue after several trials, I tried the Allocation instrument, not much leaks.
When I tested it in xCode, I found something interesting(I already shut down every app that run background), the memory usage of other process increased dramatically on iOS 10.
iOS10_iPhone5s
But it didn't increase so much on iOS9:
iOS10_iPhone5
So I have several questions here:
what's in other processes, it should be the apps that run background, but why the memory usage increased even I shut down all the other apps?
why I can only reproduce this issue on iOS10? and it runs well on iOS7-iOS9.
Can anybody help me? thank you.
"Other Processes" includes literally every other program that is currently running on your Mac. That number has nothing to do with the simulator. It does not measure processes that run in the simulator.
If you run iOS Simulator Xcode shows memory stats from your Mac.
Please refer this as well
Running out of memory in 'Other Processes' in Usage Comparion Xcode iOS9
iOS Memory Management -- Other Processes RAM Increasing
Related
I'm trying to analyze how much memory, battery and cpu usage is taken by each app that is currently running on my iOS device. I don't mind if this can be done programmatically or otherwise. I have XCode up and running and I realize it can be used to check the CPU/memory of apps I install and run on my device.
Just to be clear, I do not want the total CPU/memory usage, but rather per app for all apps that are currently running.
Is this possible in iOS 8.1, in any way, without jailbreaking my device?
Edit: I just tried out Instruments in XCode and I realize to use it, you need to be testing an app. Is it possible to use Instruments to get this system info, without testing a new app? Can I get this info from the terminal for example? Thanks.
I'm trying to debug a potential javascript memory leak on iOS. My approach (was) to monitor Mobile Safari on my iPad using Instruments, but there's a problem: no matter what process I attach Instruments to, I get no data at all. After setting up the items to watch and starting the monitor, it runs along happily, but shows no memory usage, no CPU usage, nothing. Is there something I need to do with my iPad or Instruments to enable collection of this data?
I also had this issue with xCode 6 where the instruments would show like it's recording data although there was no actual data presented or collected.
Restarting my Mac Mini, restarting xCode, cleaning the build and disconnecting and connecting my iPad did not solve this issue.
However, my other devices were profiling just fine.
The solution I found is to reboot the iPad. (You reboot your device holding the home button and the power button for a few seconds. Then to turn it on again you press the power button).
This solved this issue and I was told it can solve other xCode related issues like when your program keep running on Debug even when you run it on Release.
Hope this helps.
I am developing a ios 8 custom keyboard Extension. It run like a charm start.
But I always get "Receive Memory Warning" in Xcode. So my custom keyboard extension will suddenly terminate sometimes.
But I run the custom keyboard in its host app. There don't have any problem. Don't get "Receive Memory Warning" in Xcode. Don't terminate.
Anybody can help me? If app have any limit size for a Extension use?
Apple mentions in their App Extension Programming Guide that memory limits for app extensions are significantly lower than limits imposed on foreground apps. Additionally some types of extensions may have lower limits than others.
Apple is not explicit about these memory limits as far as I can tell and it's unclear if they are dependent on the device and how much memory other apps are consuming. But as Ethan mentioned, for keyboard extensions you should aim for less than 30MB to avoid crashing.
It's also important to test the extension when not running in Xcode or using a debug build configuration. It seems that the memory limits for debug builds are much higher.
iOS allocates less memory to extensions as they are supposed to be light and do one thing well. I suppose shall try limit memory use under 30mb...
I am developing for the iOS and checking my app with IPhone and IPad.
I receive many memory warnings (didReceiveMemoryWarning is called) but have no idea why.
My app is using ~35MB in the peak points, and 4-5 MB when it the lowest point.
I tried to find leaks using 'instruments' but could not find any critical issues.
Is there a good way to find out why the system sends memory warnings?
Memory warning is to be expected in an iOS app. It doesn't have to be because of your app. Other apps are still in memory even if the apps are suspended. The OS will do memory management by sending memory warning and kill apps when necessary. As long as you're using reasonable amount of memory (with little to no memory leak) and handle didReceiveMemoryWarning properly, you'll be fine.
Also, when your app is in suspended mode, if your app is using little memory footprint, your app will more likely to survive killing process. As app with larger memory footprint will be terminated first.
I also found that "Product -> Analyze" (Shift+Command+B) can help you sort out some code issues before you start using Leaks. With the introduction of ARC this became less useful though.
I'm working on an app that works fine on all devices (all the way back to 3.0 and the first iPhone in fact). If I profile useing'Activity Monitor' instrument (Memory Monitor) tool the app runs fine, with no crashes, and no excessive memory usage reported.
However, when I run it in Profile mode with the 'Allocations / leaks' tool selected, on iPad 1, I get lots of memory warnings in quick succession followed by a crash (about a second after all the memory warnings fire off, it crashes), but this ONLY happens when running with the allocations / leaks monitor enabled.
I need to find out why this is happening. Is there a compatibility issue with iPads and the latest version of instruments and that specific tool? Does it take up an excessive portion of memory?
Thanks in advance,
Stew