UNNotificationServiceExtension: memory limit?

放肆的年华 提交于 2019-12-08 19:09:04

问题


I'm trying to implement UNNotificationServiceExtension, but my code seems to fail often, simply stating the

Program ended with exit code: 0"

I am trying to use the FMDB Sqlite3 module in the extension and it seems as though I may be running into memory limits inside the extension. Are there any documented limits for memory in these extensions? Are there any strategies to help me take them into account, or am I just going to have to accept that I can't put complex functionality into the extension?

Running it through Instruments shows that it only reaches 3.24MB. And NSExtensionMain is 68% of that, so I don't think I can bring that down by a lot.


回答1:


The limit as of 05/18/18 is 12MB. I verified this by allocating too much memory and saw a Console message from the kernel stating the process was terminated by violating the hard limit of 12MB.



来源:https://stackoverflow.com/questions/39800287/unnotificationserviceextension-memory-limit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!