2016-09-16 116 views
0

我試圖讓自定義啓動屏幕爲我的iOS構建工作,它不會編譯失敗。科爾多瓦iOS構建失敗 - cordova-plugin-splashscreen導致它?

我增加了科爾多瓦,插件,閃屏到我的項目,複製我的文件RES /卵石/ iOS和將此添加到我的配置:

<platform name="ios"> 
    <allow-intent href="itms:*"/> 
    <allow-intent href="itms-apps:*"/> 
    <preference name="KeyboardDisplayRequiresUserAction" value="false"/> 
    <splash height="480" src="res/screen/ios/iphone-320-p.jpg" width="320"/> 
    <splash height="960" src="res/screen/ios/iphone-640-p.jpg" width="640"/> 
    <splash height="1136" src="res/screen/ios/iphone-640-4in-p.jpg" width="640"/> 
    <splash height="1334" src="res/screen/ios/iphone-750-p.jpg" width="750"/> 
    <splash height="2208" src="res/screen/ios/iphone-1242-p.jpg" width="1242"/> 
    <splash height="1024" src="res/screen/ios/ipad-768-p.jpg" width="768"/> 
    <splash height="2048" src="res/screen/ios/ipad-1536-p.jpg" width="1536"/> 
    <splash height="768" src="res/screen/ios/ipad-1024-l.jpg" width="1024"/> 
    <splash height="1536" src="res/screen/ios/ipad-2048-l.jpg" width="2048"/> 
    </platform> 

但是當我嘗試從CLI編譯它,我得到這樣的:

The following build commands failed: 
    CompileAssetCatalog build/device/BoekWijzer.app BoekWijzer/Images.xcassets 
(1 failure) 
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/roderickg/Documents/Working/svn/bsl_bwapp/src/boekwijzer-cordova/platforms/ios/cordova/build-debug.xcconfig,-project,BoekWijzer.xcodeproj,-target,BoekWijzer,-configuration,Debug,-destination,platform=iOS,build,CONFIGURATION_BUILD_DIR=/Users/roderickg/Documents/Working/svn/bsl_bwapp/src/boekwijzer-cordova/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/roderickg/Documents/Working/svn/bsl_bwapp/src/boekwijzer-cordova/platforms/ios/build/sharedpch 

當我嘗試做在Xcode我得到這樣這些錯誤:

/Users/roderickg/Documents/Working/svn/bsl_bwapp/src/boekwijzer-cordova/platforms/ios/BoekWijzer/Images.xcassets: Failed to write image data for the launch image set from "LaunchImage.launchimage/Default-Portrait~ipad.png" to "/Users/roderickg/Library/Developer/Xcode/DerivedData/BoekWijzer-hgmapcbguwcdwlbzhegkgwjgwxgj/Build/Products/Debug-iphoneos/BoekWijzer.app/LaunchImage-Portrait~ipad.png". 

看起來像它的TR要使用錯誤的圖像,但我不明白爲什麼它會嘗試在我的配置中使用LaunchImage-Portrait〜ipad.png。

此外,我不能讓項目編譯,除非我刪除配置中的[splash]標籤,然後刪除splash插件並再次添加它。只是刪除[splash]標籤不起作用。

回答

1

這是濺水的配置,我用:

<splash height="480" src="res/screens/ios/Default.png" width="320"/> 
    <splash height="960" src="res/screens/ios/[email protected]" width="640"/> 
    <splash height="1024" src="res/screens/ios/Default~ipad~nostatusbar.png" width="768"/> 
    <splash height="2048" src="res/screens/ios/[email protected]" width="1536"/> 
    <splash height="1136" src="res/screens/ios/[email protected]" width="640"/> 
    <splash height="1334" src="res/screens/ios/[email protected]" width="750"/> 
    <splash height="2208" src="res/screens/ios/[email protected]" width="1242"/> 
    <splash height="768" src="res/screens/ios/Default~ipad~landscape~nostatusbar.png" width="1024"/> 
    <splash height="1536" src="res/screens/ios/[email protected]" width="2048"/> 
    <splash height="1242" src="res/screens/ios/[email protected]" width="2208"/> 

在你的配置,最後一個缺失。如果你改變你的配置,請記得致電cordova build。

+0

是的,這是風景之一,但它的工作沒有。我只是修復它。雖然不完全確定。我一直試圖刪除東西,重建等。我發現的一個問題是,你必須使用PNG。這是愚蠢的,因爲這是相當大的,你可以用jpeg做什麼,但沒關係。 – REJH

+0

(PS:在jpeg-png的東西:它用jpeg編譯,但閃屏將是黑色的) – REJH

相關問題