更改语言/区域后如何防止需要重建应用程序 [英] How to prevent need for rebuilding app after changing Language/Region

查看:27
本文介绍了更改语言/区域后如何防止需要重建应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题发生在 XCode>'Build and run',
不是在仪器>泄漏"中运行它时.所以这似乎是 Xcode 的问题.
如果是这种情况,我不介意进行额外的重建.

The issue happens at XCode>'Build and run',
not when running it in 'Instruments > Leaks'. So it seems an issue with Xcode.
If that is the case, I don't mind doing an extra rebuild.

但是,如果在 iTunes 应用商店发布应用后也会出现问题,
并且客户在她的设备中安装了该应用程序,
每次更改语言/地区时,她都必须重新安装该应用程序.
(不得不说,那是不能接受的).

However, if issue will also happen after app is posted in iTunes app store,
and customer installs the app in her device,
she would have to reinstall the app every time she changes language/region.
(needles to say, that would not be acceptable).

是不是这个问题:
a) 仅在 Xcode 中(不在应用商店中)?
b) 其他开发人员没有体验过,所以很可能是应用程序中的错误?或
c) 即使通过从应用商店下载安装应用,也可能出现?

Is this issue:
a) just in Xcode (not in app store)?
b) not experienced by other developers, so likely is a bug in the app ? or
c) likely to surface even when app is installed by downloading from app store?

如果是b"或c",有什么解决办法吗?

If 'b' or 'c', any ideas how to fix it?

----------------重现问题的步骤-----------------
开发中:
1) 执行 Xcode>构建并运行",验证应用程序按预期工作(在模拟器或设备中);
2) 更改语言和地区(在 iPhone 的设置>通用>国际"中)
3) 验证:
-控制台显示非信息性错误:
程序接收信号:SIGKILL".
-应用程序在后台崩溃,
- 单击应用程序的图标不再启动应用程序
(应用程序的默认屏幕显示一秒钟,然后崩溃)
4) 再做一次构建并运行"
5) 验证现在应用程序启动并运行良好
(按预期使用新语言和地区.因此应用的本地化字符串等工作正常).

----------------Steps to reproduce issue-----------------
During development:
1) Do a Xcode>'Build and run', verify app works as expected (in either simulator or device);
2) Change Language and Region (in the iPhone's 'Settings>General>International')
3) Verify:
-Console shows the non-informative error:
Program received signal: "SIGKILL".
-App crashes in the background,
-Clicking app's icon icon no longer launches the app
(apps' default screen displays for a second, then crashes)
4) Do another 'Build and run'
5) verify now app launches and works well
(in the new language and region as expected. So app's localization strings etc work ok).

6) 执行使用性能工具运行 > 泄漏"
7) 更改语言和区域(在 iPhone 的设置"中)
8) 验证没有问题.
即:
仪器跟踪中断(应用程序或工具中没有崩溃),以及
用户可以像往常一样在 iPhone 中重新启动应用程序(步骤 3 和 4 已取消).

6) Do a 'Run with Performance Tool > Leaks'
7) Change Language and Region (in the iPhone's 'Settings')
8) verify no issue.
That is:
Instruments tracking interrupts (no crashes in app or in tool), and
user can relaunch the app in iPhone as usual (steps 3 and 4 are eliminated).

推荐答案

我见过类似的行为.在第三步和第五步之间,您可能想尝试在 Xcode 中停止调试"并跳过重建.

I have seen a similar behavior. Between step three and five you might want to try a "stop debugging" in Xcode and skip the rebuild.

我可以更改设备上的语言,然后在不进行新构建的情况下使用新选择的语言使用应用程序,但我必须先按下 Xcode 中的停止按钮.

I can change the language on the device and then use the app with the newly chosen language without doing a new build, but I must press the stop button in Xcode first.

这篇关于更改语言/区域后如何防止需要重建应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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