简体   繁体   English

使用Ionic在iOS应用程序中启动后出现黑屏

[英]Black screen after splash in iOS app with Ionic

I am developing with a small team an hybrid app based on Ionic v1. 我正在与一个小团队一起开发基于Ionic v1的混合应用程序。 We have created a new page on it and everything seemed to be OK (at least on Android it is right). 我们已经在上面创建了一个新页面,并且一切似乎都正常(至少在Android上是正确的)。

When I compiled for iOS (iPad), a black screen appears after splash but none error message in console while debugging. 当我为iOS(iPad)进行编译时,启动后出现黑屏,但调试时控制台中没有错误消息。 After moving between different commits on our repo and recompiling, recompiling ... I could find that the error came when using let to declare a variable in javascript side (controller). 在我们的存储库上的不同提交之间移动并重新编译,重新编译之后……我发现使用let在javascript端(控制器)中声明变量时出现错误。 It is the first time we used let in the app. 这是我们第一次在应用程序中使用let。 Changing every let for var, the black screen disappeared and everything works perfectly right now. 更改var的所有条件后,黑屏消失,并且现在一切正常。

Anyone knows why? 有人知道为什么吗? what is wrong between the use of let and iOS in an Ionic framework development? 在Ionic框架开发中使用let和iOS之间有什么错?

I would appreciate any suggest, Thank you. 任何建议,我将不胜感激,谢谢。

Check this . 检查一下 Probably you disrupted one of the rules which causes logical error in your code and that is why you got such a problem. 您可能破坏了其中一条规则,这些规则在代码中导致逻辑错误,这就是为什么您遇到这样的问题。 I would recommend you to use the --prod command when you build the ionic application, which mostly gets over such weird problems(black screen stuff). 我建议您在构建离子应用程序时使用--prod命令,该应用程序通常可以--prod此类怪异的问题(黑屏问题)。

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

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