generator-m-ionic
generator-m-ionic copied to clipboard
Problem with update_platform_config.js after adding icons and legacy splashscreens
After creating and adding icons and splashscreens to res/android/default and res/ios/default I'm trying to build my project with gulp --cordova "emulate ios"
The build crashed with:
[20:06:41] Starting 'cordova-with-build'...
Running command: /Users/fredy/Dev/Taste/hooks/after_prepare/update_platform_config.js /Users/fredy/Dev/Taste
net.js:648
throw new TypeError(
^
TypeError: Invalid data, chunk must be a string or buffer, not object
at Socket.write (net.js:648:11)
at /Users/fredy/Dev/Taste/hooks/after_prepare/update_platform_config.js:373:24
at arrayEach (/Users/fredy/Dev/Taste/node_modules/lodash/lodash.js:522:11)
at Function.forEach (/Users/fredy/Dev/Taste/node_modules/lodash/lodash.js:9289:14)
at /Users/fredy/Dev/Taste/hooks/after_prepare/update_platform_config.js:368:7
at Object.<anonymous> (/Users/fredy/Dev/Taste/hooks/after_prepare/update_platform_config.js:377:3)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
Error: Hook failed with error code 1: /Users/fredy/Dev/Taste/hooks/after_prepare/update_platform_config.js
[20:06:43] 'cordova-with-build' errored after 1.25 s
[20:06:43] Error in plugin 'gulp-shell'
Message:
Command `node_modules/cordova/bin/cordova emulate ios` failed with exit code 1
And here is my config.xml looks like:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.group.taste" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>TasteTastic</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="[email protected]" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html"/>
<plugin name="cordova-plugin-whitelist" spec="1"/>
<plugin name="cordova-plugin-device" spec="~1.1.3"/>
<plugin name="cordova-plugin-dialogs" spec="~1.3.0"/>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
<plugin name="cordova-plugin-network-information" spec="~1.3.0"/>
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0"/>
<plugin name="cordova-plugin-statusbar" spec="~2.2.0"/>
<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:*"/>
<preference name="orientation" value="portrait"/>
<preference name="ShowSplashScreenSpinner" value="false"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="3000"/>
<platform name="android">
<allow-intent href="market:*"/>
<icon src="res/android/default/icon/drawable-ldpi-icon.png" density="ldpi"/>
<icon src="res/android/default/icon/drawable-mdpi-icon.png" density="mdpi"/>
<icon src="res/android/default/icon/drawable-hdpi-icon.png" density="hdpi"/>
<icon src="res/android/default/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
<icon src="res/android/default/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
<icon src="res/android/default/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
<splash src="res/android/default/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
<splash src="res/android/default/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
<splash src="res/android/default/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
<splash src="res/android/default/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
<splash src="res/android/default/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
<splash src="res/android/default/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
</platform>
<platform name="ios">
<allow-intent href="itms:*"/>
<allow-intent href="itms-apps:*"/>
<icon src="res/ios/default/icon/icon.png" width="57" height="57"/>
<icon src="res/ios/default/icon/[email protected]" width="114" height="114"/>
<icon src="res/ios/default/icon/icon-40.png" width="40" height="40"/>
<icon src="res/ios/default/icon/[email protected]" width="80" height="80"/>
<icon src="res/ios/default/icon/[email protected]" width="120" height="120"/>
<icon src="res/ios/default/icon/icon-50.png" width="50" height="50"/>
<icon src="res/ios/default/icon/[email protected]" width="100" height="100"/>
<icon src="res/ios/default/icon/icon-60.png" width="60" height="60"/>
<icon src="res/ios/default/icon/[email protected]" width="120" height="120"/>
<icon src="res/ios/default/icon/[email protected]" width="180" height="180"/>
<icon src="res/ios/default/icon/icon-72.png" width="72" height="72"/>
<icon src="res/ios/default/icon/[email protected]" width="144" height="144"/>
<icon src="res/ios/default/icon/icon-76.png" width="76" height="76"/>
<icon src="res/ios/default/icon/[email protected]" width="152" height="152"/>
<icon src="res/ios/default/icon/[email protected]" width="167" height="167"/>
<icon src="res/ios/default/icon/icon-small.png" width="29" height="29"/>
<icon src="res/ios/default/icon/[email protected]" width="58" height="58"/>
<icon src="res/ios/default/icon/[email protected]" width="87" height="87"/>
<splash src="res/ios/default/splash/Default-568h@2x~iphone.png" width="640" height="1136"/>
<splash src="res/ios/default/splash/Default-667h.png" width="750" height="1334"/>
<splash src="res/ios/default/splash/Default-736h.png" width="1242" height="2208"/>
<splash src="res/ios/default/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
<splash src="res/ios/default/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
<splash src="res/ios/default/splash/Default@2x~iphone.png" width="640" height="960"/>
<splash src="res/ios/default/splash/Default~iphone.png" width="320" height="480"/>
</platform>
<engine name="ios" spec="~4.2.1"/>
<engine name="android" spec="~5.2.2"/>
<engine name="browser" spec="~4.1.0"/>
<!--<icon src="resources/android/icon/drawable-xhdpi-icon.png"/>-->
</widget>
Sorry for the late reply, if you can provide a repo I can clone, I might be able to help you.