简体   繁体   English

xamarin 表单 iphone 应用程序以默认蓝屏启动,然后跳转到后台。 没有编译器或启动错误

[英]xamarin forms iphone app launches with default blue screen and then jumps to background. No compiler or launch errors

The Xamarin Forms app I'm developing compiles and launches without errors on an iPhone, but simply shows the launch screen for a second or two and then goes to the background.我正在开发的 Xamarin Forms 应用程序在 iPhone 上编译和启动没有错误,但只是显示启动屏幕一两秒钟,然后转到后台。 It doesn't crash.它不会崩溃。 This does not happen on an iPhone 5S, but anything newer such as an iPhone 8S or X this behavior is consistent.这在 iPhone 5S 上不会发生,但在 iPhone 8S 或 X 等较新的设备上,这种行为是一致的。 There are no problems with the Android version of the app.该应用程序的Android版本没有问题。 I'm using Visual Studio 2019 for Mac.我使用的是 Visual Studio 2019 for Mac。 Everything is up to date, including Xamarin forms and all of the nuget packages that I'm using.一切都是最新的,包括 Xamarin 表单和我正在使用的所有 nuget 包。 I can only test on physical devices because there is Bluetooth built into the the app.我只能在物理设备上进行测试,因为应用程序内置了蓝牙。 Any ideas or clues?任何想法或线索?

尝试构建一个示例应用程序并在 iOS 中运行它......如果一切正常,那么尝试添加包并运行它......我的猜测是你已经安装了一个插件但未能初始化它......

It turned out that all I needed to do was Enable "Background Mode" and then "Bluetooth LE Communication" from within Info.plist.事实证明,我需要做的就是从 Info.plist 中启用“后台模式”,然后启用“蓝牙 LE 通信”。 I didn't suspect this since the app functioned properly with iOS 10.x and the symptom didn't lead me to think that bluetooth was the root cause of the problem.我没有怀疑这一点,因为该应用程序在 iOS 10.x 上运行正常,并且该症状并没有让我认为蓝牙是问题的根本原因。 Seems obvious to me now.现在对我来说似乎很明显。

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

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