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...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With