ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

ionic resources bug in 1.7.15

Open jspenc72 opened this issue 10 years ago • 19 comments

There is a bug in ionic resources in version 1.7.15. The problem presents itself in that all appropriate icons are generated but not copied to the appropriate resources directory.

resources/ios/

Having experienced this with several projects generated with 1.7.14 and 1.7.15 I downgraded from 1.7.15 to 1.7.14 and immediately all the images that were generated using ionic resources 1.7.15 were copied from the cache to the appropriate directories.

$ ionic resources ios --force
Ionic icon and splash screen resources generator
 uploading ios/icon.png...
 uploading ios/splash.png...
ios/icon.png (192x192) upload complete
ios/splash.png (3000x3000) upload complete
 generating splash ios Default~iphone.png (320x480)...
 generating splash ios Default@2x~iphone.png (640x960)...
 generating splash ios Default-Portrait~ipad.png (768x1024)...
splash ios Default@2x~iphone.png (640x960) generated
 generating splash ios Default-Portrait@~ipadpro.png (2048x2732)...
splash ios Default-Portrait~ipad.png (768x1024) generated
 generating splash ios Default-Portrait@2x~ipad.png (1536x2048)...
splash ios Default~iphone.png (320x480) generated
 generating splash ios Default-Landscape~ipad.png (1024x768)...
splash ios Default-Landscape~ipad.png (1024x768) generated
 generating splash ios Default-Landscape@~ipadpro.png (2732x2048)...
splash ios Default-Portrait@2x~ipad.png (1536x2048) generated
 generating splash ios Default-Landscape@2x~ipad.png (2048x1536)...
splash ios Default-Landscape@2x~ipad.png (2048x1536) generated
 generating splash ios Default-Landscape-736h.png (2208x1242)...
splash ios Default-Landscape-736h.png (2208x1242) generated
 generating splash ios Default-736h.png (1242x2208)...
splash ios Default-736h.png (1242x2208) generated
 generating splash ios Default-667h.png (750x1334)...
splash ios Default-667h.png (750x1334) generated
 generating splash ios Default-568h@2x~iphone.png (640x1136)...
splash ios Default-568h@2x~iphone.png (640x1136) generated
 generating icon ios [email protected] (87x87)...
icon ios [email protected] (87x87) generated
 generating icon ios [email protected] (58x58)...
icon ios [email protected] (58x58) generated
 generating icon ios icon-small.png (29x29)...
icon ios icon-small.png (29x29) generated
 generating icon ios [email protected] (167x167)...
icon ios [email protected] (167x167) generated
 generating icon ios [email protected] (152x152)...
icon ios [email protected] (152x152) generated
 generating icon ios icon-76.png (76x76)...
icon ios icon-76.png (76x76) generated
 generating icon ios [email protected] (144x144)...
icon ios [email protected] (144x144) generated
 generating icon ios icon-72.png (72x72)...
icon ios icon-72.png (72x72) generated
 generating icon ios [email protected] (180x180)...
icon ios [email protected] (180x180) generated
 generating icon ios [email protected] (120x120)...
icon ios [email protected] (120x120) generated
 generating icon ios icon-60.png (60x60)...
icon ios icon-60.png (60x60) generated
 generating icon ios [email protected] (100x100)...
icon ios [email protected] (100x100) generated
 generating icon ios icon-50.png (50x50)...
icon ios icon-50.png (50x50) generated
icon ios [email protected] (120x120) generated
 generating icon ios [email protected] (80x80)...
icon ios [email protected] (80x80) generated
 generating icon ios icon-40.png (40x40)...
icon ios icon-40.png (40x40) generated
 generating icon ios [email protected] (114x114)...
icon ios [email protected] (114x114) generated
 generating icon ios icon.png (57x57)...
icon ios icon.png (57x57) generated
$ ionic -v
1.7.15

No resources copied into the resources/ios directories

Then I ran

$ npm install [email protected]
...
...
...
$ ionic -v
1.7.14

After downgrading to 1.7.14 the resources are copied from the cache to the appropriate directory...

$ ionic resources --icon
Ionic icon resources generator
icon ios icon.png (57x57) from cache
icon ios [email protected] (114x114) from cache
icon ios icon-40.png (40x40) from cache
icon ios [email protected] (80x80) from cache
icon ios icon-50.png (50x50) from cache
icon ios [email protected] (100x100) from cache
icon ios icon-60.png (60x60) from cache
icon ios [email protected] (120x120) from cache
icon ios [email protected] (180x180) from cache
icon ios icon-72.png (72x72) from cache
icon ios [email protected] (144x144) from cache
icon ios icon-76.png (76x76) from cache
icon ios [email protected] (152x152) from cache
icon ios icon-small.png (29x29) from cache
icon ios [email protected] (58x58) from cache
icon ios [email protected] (87x87) from cache
Jesses-MacBook-Pro-2:nostalgia WREAdmin$ ionic resources --force
Ionic icon and splash screen resources generator
icon ios icon.png (57x57) from cache
icon ios [email protected] (114x114) from cache
icon ios icon-40.png (40x40) from cache
icon ios [email protected] (80x80) from cache
icon ios icon-50.png (50x50) from cache
icon ios [email protected] (100x100) from cache
icon ios icon-60.png (60x60) from cache
icon ios [email protected] (120x120) from cache
icon ios [email protected] (180x180) from cache
icon ios icon-72.png (72x72) from cache
icon ios [email protected] (144x144) from cache
icon ios icon-76.png (76x76) from cache
icon ios [email protected] (152x152) from cache
icon ios icon-small.png (29x29) from cache
icon ios [email protected] (58x58) from cache
icon ios [email protected] (87x87) from cache
splash ios Default-568h@2x~iphone.png (640x1136) from cache
splash ios Default-667h.png (750x1334) from cache
splash ios Default-736h.png (1242x2208) from cache
splash ios Default-Landscape-736h.png (2208x1242) from cache
splash ios Default-Landscape@2x~ipad.png (2048x1536) from cache
splash ios Default-Landscape~ipad.png (1024x768) from cache
splash ios Default-Portrait@2x~ipad.png (1536x2048) from cache
splash ios Default-Portrait~ipad.png (768x1024) from cache
splash ios Default@2x~iphone.png (640x960) from cache
splash ios Default~iphone.png (320x480) from cache

jspenc72 avatar Jun 06 '16 19:06 jspenc72

This problem occurs with a brand new project generated with either 1.7.14 or 1.7.15

jspenc72 avatar Jun 06 '16 19:06 jspenc72

I have found this to occur when your splash image is larger than 2208x2208. Likely the same as #1031

teledemic avatar Jun 08 '16 19:06 teledemic

Note that the iPad pro splash screen is larger than 2208.

On Jun 8, 2016, at 1:32 PM, Carl Irving [email protected] wrote:

I have found this to occur when your splash image is larger than 2208x2208. Likely the same as #1031 https://github.com/driftyco/ionic-cli/issues/1031 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/driftyco/ionic-cli/issues/1045#issuecomment-224702274, or mute the thread https://github.com/notifications/unsubscribe/ACx1AJnqbEdx1Vs1JlUuqMUyjMaC9ci_ks5qJxjQgaJpZM4IvOdq.

jspenc72 avatar Jun 08 '16 19:06 jspenc72

Yeah, it is mentioned in the output when you do ionic resources, but cordova-plugin-splashscreen doesn't even support an iPad pro size yet. I'm guessing it's a placeholder for when it does. Regardless, it shouldn't fail on big source files

teledemic avatar Jun 08 '16 19:06 teledemic

No, it shouldn't fail. It should generate the file and add to xcassets... As it currently does.

If it throws an error and didny generate and add them the app it will throw an error after archiving and you're trying to upload it to the app store.

Best,

Jspenc72

On Jun 8, 2016, at 1:37 PM, Carl Irving [email protected] wrote:

Yeah, it is mentioned in the output when you do ionic resources, but cordova-plugin-splashscreen doesn't even support an iPad pro size yet. I'm guessing it's a placeholder for when it does. Regardless, it shouldn't fail on big source files

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

jspenc72 avatar Jun 08 '16 20:06 jspenc72

+1

simonefalcini avatar Jun 14 '16 14:06 simonefalcini

+1

imokweb avatar Jun 14 '16 20:06 imokweb

Only trivial solution I found was to roll back ionic cli

jspenc72 avatar Jun 15 '16 00:06 jspenc72

Tempory workaround: On Mac Os in /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/resources.js remove line 638 (reject('Invalid transformation: ');). This way there will still be an error, but the generated splash screens will get copied.

funkybaboon avatar Jun 15 '16 18:06 funkybaboon

+1.

ionic 1.7.15 cannot copy the right file of [email protected]. When you run with ionic run ios --device there is a warning: /Images.xcassets:./AppIcon.appiconset/(null)[2d][icon-60.png]: warning: The app icon set "AppIcon" has an unassigned child.

But when you do cordova run ios --device, everything will be OK.

cjie avatar Jun 24 '16 03:06 cjie

+1

weber-stephen avatar Jun 29 '16 14:06 weber-stephen

+1

Ridingst avatar Jun 30 '16 07:06 Ridingst

+1

Same resources works in ionic-1.7.14.

muarifer avatar Jun 30 '16 13:06 muarifer

Exactly the same issue in 1.7.16

dzlatic avatar Jul 20 '16 20:07 dzlatic

+1

Same issue with 1.7.16. I'm using a splashscreen with a size of 2732 x 2732 pixels for iPad Pro support. Icons can generated only with ionic resources -i. The generation of splashscreens with ionic resources -s doesn't work ;(

After local downgrade to 1.7.14 ionic resources work's as aspected

rwam avatar Jul 27 '16 14:07 rwam

I created a NodeJS repo to facilitate the icon and splash screen generation for Ionic. So everyone can create all .png files in seconds. https://github.com/dericeira/Icon-Splash-Resize

dericeira avatar Aug 17 '16 14:08 dericeira

We recently released a new version of the CLI that should fix this issue. Could you please update your CLI to at least 2.1.4?

npm install -g ionic@latest

Thank you!

jthoms1 avatar Oct 29 '16 11:10 jthoms1

@dericeira In my case it appears my ionic cli version , 2.1.4, does not yet support the current folder structure of android drawables (for portrait and landscape) as well as mipmap folders. I saw that three landscape image assets for ios were missed as well. Hence, for me, it looks more like something is out of sync that is why I modified a fork and sent a pull request. (I could not do manual asset placements for Android)

ifelere avatar Dec 20 '16 21:12 ifelere

Cordova CLI: 6.4.0 Ionic CLI Version: 2.1.18 Ionic App Lib Version: 2.1.9 ios-deploy version: 1.8.6 ios-sim version: 5.0.8 OS: OS X El Capitan Node Version: v7.2.1 Xcode version: Xcode 7.2.1 Build version 7C1002

Cordova icon and splashscreen not updated.

prosenjit-manna avatar Dec 31 '16 06:12 prosenjit-manna