Get "Shutdown due to memory error" for ios 8 custom keyboard extension

I am developing an extension for the ios 8 keyboard. It runs as the beginning of a charm.

But I always get a "Memory Warning" in Xcode. So my own keyboard extension is sometimes abruptly interrupted.

But I am running a custom keyboard in my main application. There are no problems there. Do not get "Receive Memory Alert" in Xcode. Do not stop.

Can anybody help me? If the application has a size limit for expansion?

Terminated due to Memory Error

+5
source share
2 answers

Apple mentions in its Application Extension Programming Guide that memory limits for application extensions are well below the limits set for foreground applications. In addition, some types of extensions may have lower limits than others.

Apple does not know about these memory limitations, as far as I can tell, and it is unclear whether they depend on the device and how much memory other applications consume. But, as Ethan said, for keyboard expansion, you should aim for less than 30 MB to avoid crashes.

It is also important to check the extension if it is not running in Xcode, or using the debug build configuration. It seems that the memory limits for debugging collections are much higher.

+4
source

iOS allocates less memory for extensions because they should be lightweight and do one thing. I assume I will try to use a memory limit of up to 30 MB ...

+3
source

Source: https://habr.com/ru/post/1200553/


All Articles