iOS 本地化崩溃

发布于 2025-01-04 03:31:30 字数 839 浏览 4 评论 0原文

这里有一个非常奇怪的。 该应用程序有两个目标,只是为了能够更改一个商店中的图标。他们完全共享代码并本地化为多种语言。

如果我将手机设置为瑞典语,其中一个目标会在启动时崩溃......

2012-02-08 21:20:39.488 isengua-en[25341:707] * 由于未捕获的异常“NSUnknownKeyException”而终止应用程序,原因:“[ setValue:forUndefinedKey:]:此类不是关键关键 testContentView 的值编码兼容。' * 首先抛出调用堆栈: (0x30caa8bf 0x37e4f1e5 0x30caa5f5 0x37cd5333 0x37cd4e33 0x37caef19 0x30c09803 0x30c0a491 0x32eb84bf 0x32e289cb 0x32d07ea1 0x32c7d78b 0x32ca1f51 0x32c666a5 0x32d290e5 0x32c6ee51 0x32c6ee6d 0x32c6ee6d 0x32c6ecff 0x32c6ecdb 0x37e7 0x32c7c7eb 0x32c763bd 0x32c44921 0x32c443bf 0x32c43d2d 0x3382fe13 0x30c7e553 0x30c7e4f5 0x30c7d343 0x30c004dd 0x30c003a5 0x32c75457 0x32c72743 0x32a7 0x2cf0) 终止调用抛出异常(gdb)

任何其他语言都可以。 我已经复制了正常的目标并将其重命名,以及所有其他内容。

所有本地化均由 NSLocalizedString 完成。

有人有什么想法吗? 谢谢。

Have a really weird one here.
The app has two targets, just to be able to change the icon in one store. They share the code totally and are localized into a number of languages.

If I set my phone to Swedish, one of the targets crash on launch...

2012-02-08 21:20:39.488 isengua-en[25341:707] * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key testContentView.'
*
First throw call stack:
(0x30caa8bf 0x37e4f1e5 0x30caa5f5 0x37cd5333 0x37cd4e33 0x37caef19 0x30c09803 0x30c0a491 0x32eb84bf 0x32e289cb 0x32d07ea1 0x32c7d78b 0x32ca1f51 0x32c666a5 0x32d290e5 0x32c6ee51 0x32c6ee6d 0x32c6ee6d 0x32c6ecff 0x32c6ecdb 0x37e7 0x32c7c7eb 0x32c763bd 0x32c44921 0x32c443bf 0x32c43d2d 0x3382fe13 0x30c7e553 0x30c7e4f5 0x30c7d343 0x30c004dd 0x30c003a5 0x32c75457 0x32c72743 0x32a7 0x2cf0)
terminate called throwing an exception(gdb)

Any other language and it is just fine.
I have duplicated the target that is OK and renamed it, and all the other stuff.

All localizations are done by NSLocalizedString.

Any idea anyone?
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苄①跕圉湢 2025-01-11 03:31:30

以防万一其他人在某个阶段遇到同样的问题。
解决方案是从我的 iPhone 中删除该应用程序并重新构建。显然,导致它的构建之间留下了一些东西。

Just in case anyone else get the same problem at some stage.
The solution was to delete the app from my iPhone and build again. Obviously something got left over between the builds that caused it.

我一直都在从未离去 2025-01-11 03:31:30

您是否为不同的语言环境复制了 nib 文件?

看起来其中一个 nib 文件的瑞典语版本(无法从错误中分辨出是哪一个,也许是 MainWindow.xib?)绑定到一个名为 testContentView 的插座,自从您对其进行本地化分支以来,您可能已经删除了该插座。

要修复此问题,请打开笔尖并在检查器中检查是否有任何损坏的绑定,或者只需从其他语言环境之一复制工作笔尖并替换瑞典语言环境文件夹中的笔尖。

Have you duplicated your nib files for the different locales?

It looks like the Swedish version of one of the nib files (can't tell which one from the error, maybe MainWindow.xib?) has a binding to an outlet called testContentView that you've probably deleted since you branched it for localisation.

To fix it, open up the nib and check in the Inspector for any broken bindings, or just copy the working nib from one of the other locales and replace the one in the swedish locale folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文