简体   繁体   English

在 React Native 中更改启动画面文本 iOS

[英]Change splash screen text in React Native iOS

I am using React Native iOS (not Expo) and recently changed my app name.我正在使用 React Native iOS(不是 Expo)并且最近更改了我的应用程序名称。 The problem is, the old app name is still visible on the splash screen (aka launch screen).问题是,旧的应用程序名称在初始屏幕(也称为启动屏幕)上仍然可见。 How can I change the text on the splash screen?如何更改启动画面上的文本? I cannot find info on how to do this for iOS, thanks!我找不到有关如何为 iOS 执行此操作的信息,谢谢!

This might be a cache issue with your simulator, so you might need to clear emulator cache, Close simulator and run following command on terminal: xcrun simctl erase all This command will clear the cache of emulator now run the project again.这可能是您的模拟器的缓存问题,因此您可能需要清除模拟器缓存,关闭模拟器并在终端上运行以下命令: xcrun simctl erase all此命令将清除模拟器的缓存,现在再次运行项目。

Turns out that if you update your app name correctly , the splash screen text will be automatically updated too.事实证明,如果您正确更新您的应用程序名称,启动画面文本也会自动更新。 I updated my app name in Xcode using the steps below -- and this fixed the problem of updating my splash screen text:我使用以下步骤在 Xcode 中更新了我的应用程序名称——这解决了更新启动画面文本的问题:

  1. I followed the instructions here to rename my app in Xcode: https://stackoverflow.com/a/20418989/14755660我按照此处的说明在 Xcode 中重命名我的应用程序: https://stackoverflow.com/a/20418989/14755660

  2. In the Xcode drop-down menu, went to "Product > Scheme > Edit Scheme..." and next to "executable" selected my new app name.在 Xcode 下拉菜单中,转到“产品 > 方案 > 编辑方案...”,然后在“可执行文件”旁边选择我的新应用程序名称。

  3. Voila... splash screen and app name updated!瞧……闪屏和应用程序名称已更新!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM