在iOS Cordova应用中启动后显示黑屏

时间:2018-07-09 11:36:09

标签: ios angularjs cordova ionic-framework plugins

我使用ionic为Android和iOS构建了Angular应用程序。这是Cordova应用程序。

Android:一切都很好,该应用程序运行正常。

对于iOS部分,我只有一个错误:加载启动画面后,应用程序显示一个空白的黑屏。如果将其从纵向模式旋转到横向模式,则仅在正确显示该应用程序的地方。

我在config.xml中添加了状态栏和启动画面插件。我将全屏显示为是,如下所示:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.xxxxx.app" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Myapp</name>
<description>
    My App
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
    My Team
</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
    <allow-intent href="market:*" />
</platform>
<platform name="ios">
    <allow-intent href="itms:*" />
    <allow-intent href="itms-apps:*" />
</platform>
<icon src="www/img/icon.png" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashScreenDelay" value="8000" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="ShowSplashScreenSpinner" value="false" />
<feature name="StatusBar">
    <param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<plugin name="cordova-plugin-console" spec="^1.0.5" />
<plugin name="cordova-plugin-crosswalk-webview" spec="^2.3.0" />
<plugin name="cordova-plugin-device" spec="1.1.4" />
<plugin name="cordova-plugin-keyboard" spec="^1.1.5" />
<plugin name="cordova-plugin-statusbar" spec="2.2.1" />
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
<plugin name="cordova-plugin-whitelist" spec="1.3.1" />
<preference name="Fullscreen" value="true" />
<plugin name="cordova-plugin-splashscreen" spec="https://github.com/apache/cordova-plugin-splashscreen.git" />
<engine name="android" spec="^6.2.3" />
<engine name="ios" spec="^4.4.0" />
</widget>

我并行使用xCode在iOS上模拟我的应用程序。下面是info.plist中我的配置概述: enter image description here

我的appDelegate.m:

#import "AppDelegate.h"
#import "MainViewController.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions: 
(NSDictionary*)launchOptions
{
self.viewController = [[MainViewController alloc] init];
return [super application:application 
didFinishLaunchingWithOptions:launchOptions];
}

@end

我查看了其他问题,人们遇到了类似的问题,但没有一个问题完全相同,或者我可以使用的答案。

如果有人可以提供解决方案或小费,请。自从我陷入这个问题以来,将近一个星期。

谢谢:)

0 个答案:

没有答案
相关问题