简体   繁体   English

为什么我的应用程序在我的设备上与模拟器上如此不同?

[英]Why is my app so different on my device vs. the simulator?

This what my app looks like running on the simulator (iPhone 8 Plus):这是我的应用程序在模拟器(iPhone 8 Plus)上运行的样子:

在此处输入图像描述

And this what it looks like running on my device (iPhone 7 Plus):这是在我的设备(iPhone 7 Plus)上运行的样子:

在此处输入图像描述

Why does it look like so much is missing from the app when I run it on my device?当我在我的设备上运行应用程序时,为什么它看起来像缺少这么多东西? Also, a lot of the buttons/actions do not work.此外,许多按钮/操作不起作用。 My data is sourced from Firestore and I am using Firebase for my app.我的数据来自 Firestore,我正在为我的应用程序使用 Firebase。 The iOS Deployment Target is 14.4, which is accurate for my phone. iOS 部署目标是 14.4,这对我的手机来说是准确的。 I'm wondering if this could have something to do with my "Copy Bundle Resources" as this has caused me some issues in the past.我想知道这是否与我的“复制捆绑资源”有关,因为这在过去给我带来了一些问题。

在此处输入图像描述

Any help/guidance on how I can troubleshoot this is much appreciated!非常感谢任何有关如何解决此问题的帮助/指导!

It Looks like your device is in dark mode.您的设备似乎处于深色模式。 Please do changes in UI to support dark mode or you can use your app by disabling dark mode by referring this请更改 UI 以支持暗模式,或者您可以通过参考禁用暗模式来使用您的应用

Your device is in the dark theme whereas your simulator is in light theme, You can assign it to work on a light theme by toggling the appearance as shown in the image below.您的设备采用深色主题,而您的模拟器采用浅色主题,您可以通过切换外观来指定它在浅色主题上工作,如下图所示。

在此处输入图像描述

It seems like, You haven't provided the support for the Dark mode.看来,您还没有提供对深色模式的支持。 To fix this issue, Either you have to give support for dark mode or disable dark mode by adding the below key in the info.plist file.要解决此问题,您必须通过在 info.plist 文件中添加以下键来支持暗模式或禁用暗模式。 It will fix your issue.它会解决你的问题。

<key>UIUserInterfaceStyle</key>
<string>Light</string>

Thank you everyone for the answers.谢谢大家的回答。 I did indeed have to disable dark mode.我确实必须禁用暗模式。 It looks like the key has changed to the following, as per this link: Is it possible to opt-out of dark mode on iOS 13?根据此链接,密钥似乎已更改为以下内容: Is it possible to opt-out of dark mode on iOS 13?

<key> Appearance</key>
<string>Light</string>

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

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