ios - Ionic 2 App 在浏览器和 Android 上加载,但在 iOS 上不加载
<p><p>我的团队最近将我们支持的平台扩展到了 iOS,但我仍然无法让它在任何 iOS 设备上运行。使用“ionic serve”和“ionic run android”效果很好,一切都按预期工作。但是当使用“ionic run ios”时,应用程序会加载并进入经典的白屏死机。不记录任何错误,也不显示任何内容。</p>
<p>加载的页面(白屏)如下所示:</p>
<pre><code><!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<title>Ionic</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<link ios-href="build/css/app.ios.css" rel="stylesheet">
<link md-href="build/css/app.md.css" rel="stylesheet">
<link wp-href="build/css/app.wp.css" rel="stylesheet">
</head>
<body class="platform-ios platform-cordova platform-webview">
<!-- this Ionic's root component and where the app will load -->
<ion-app></ion-app>
<!-- cordova.js required for cordova apps -->
<script src="cordova.js"></script>
<!-- Polyfill needed for platforms without Promise and Collection support -->
<script src="build/js/es6-shim.min.js"></script>
<!-- Zone.js and Reflect-metadata-->
<script src="build/js/Reflect.js"></script>
<script src="build/js/zone.js"></script>
<!-- the bundle which is built from the app's source code -->
<script src="build/js/app.bundle.js"></script>
</body>
</html>
</code></pre>
<p>我尝试使用相同的命令和方法加载基本的 Ionic 2 入门应用程序,它工作正常,并且页面内部有内容。通过使用一些console.logs之类的东西,我发现代码永远不会加载app.ts文件,所以这可以解释为什么它永远不会到达主页,但由于没有记录错误,我什至不知道在哪里看解决任何问题。我想知道 app.bundle.js 中是否有问题,但我真的不知道从哪里开始。 </p>
<p>有没有人遇到过类似的问题?</p>
<p>我的版本信息如下:</p>
<ul>
<li> CordovaCLI:6.2.0 </li>
<li>Ionic 框架版本:2.0.0-beta.7 </li>
<li>Ionic CLI 版本:2.0.0-beta.25 </li>
<li>Ionic App Lib 版本:2.0.0-beta.15</li>
<li>ios-deploy 版本:1.8.6 </li>
<li>ios-sim 版本:5.0.8 </li>
<li>操作系统:Mac OS X El Capitan </li>
<li>节点版本:v6.2.0 </li>
<li>Xcode 版本:Xcode 7.3.1 Build 版本 7D1014 </li>
<li>iPad mini 2 和 iPhone 6 iOS 版本:9.3.3</li>
</ul></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我先放在这里,突然有人派上用场了。</p>
<hr/>
<blockquote>
<p>It is necessary to correct the errors in the console is running ionic serve.<br/>
Otherwise, just do not compile the necessary file app/www/build/js/app.bundle.js</p>
</blockquote>
<hr/>
<blockquote>
<p>For completeness, better run applications in production environments.<br/>
They are generally more informative than emulators.</p>
</blockquote></p>
<p style="font-size: 20px;">关于ios - Ionic 2 App 在浏览器和 Android 上加载,但在 iOS 上不加载,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/38490392/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/38490392/
</a>
</p>
页:
[1]