获取“由于内存错误而终止”用于ios 8自定义键盘扩展 [英] Get "Terminated due to Memory error" for ios 8 custom keyboard Extension

查看:108
本文介绍了获取“由于内存错误而终止”用于ios 8自定义键盘扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个ios 8自定义键盘扩展。它像一个魅力开始运行。

I am developing a ios 8 custom keyboard Extension. It run like a charm start.

但我总是在Xcode中收到接收内存警告。所以我的自定义键盘扩展名有时会突然终止。

But I always get "Receive Memory Warning" in Xcode. So my custom keyboard extension will suddenly terminate sometimes.

但我在其主机应用程序中运行自定义键盘。没有任何问题。不要在Xcode中获得接收内存警告。不要终止。

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.

任何人都可以帮助我吗?如果app对扩展使用有任何限制大小?

Anybody can help me? If app have any limit size for a Extension use?

因内存错误终止http:// i62.tinypic.com/ra41lz.png

推荐答案

Apple提及应用扩展程序设计指南,应用扩展程序的内存限制显着低于前台应用程序的限制。此外,某些类型的扩展可能具有比其他扩展更低的限制。

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并未明确这些内存限制,并且不清楚它们是否依赖于设备和其他应用程序消耗的内存量。但正如Ethan所提到的,对于键盘扩展,你应该瞄准少于30MB以避免崩溃。

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.

在Xcode中运行或使用调试时测试扩展名也很重要构建配置。似乎调试版本的内存限制要高得多。

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 8自定义键盘扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆