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

ionic resources does NOT update old icon

Open perrygovier opened this issue 11 years ago • 173 comments

From @sclearion on May 13, 2015 20:29

ionic resources does not work as documented. It keeps loading from "cache". how can i remove this stupid caching as it is driving the graphic designers crazy. I have followed docs to a T and the only way I can update the icon is by removing android platform and re-installing.

Copied from original issue: driftyco/ionic#3723

perrygovier avatar May 13 '15 22:05 perrygovier

@cesarvega Before the resources server knows to use the images cache or not, it does a checksum on the source image. If the checksum of the source image is the same then it'll pull the image from the cache, if not, I'll it'll upload a new image again. Are you replacing the source image each time?

adamdbradley avatar May 14 '15 01:05 adamdbradley

@cesarvega - I'm trying this right now with latest (1.4.0). If I change my icon/splashscreen colors and run the resources command, it recreates the images. If I try to use the old ones, it relies on caching.

What is your use case here? Are you trying to fetch those resources for another machine by re-running the resources command?

jbavari avatar May 14 '15 17:05 jbavari

Nope it's the same machine. I update (change colors, bevel, gradients) the icon with GIMP, run the resources tool and see that it does not pull from cache...GREAT. Afterwards when I search the platform/ and resources/ folders for the new icon.png, the old one is still there and the new one only gets added to the drawable folder.

Anyways, I created a D script that would remove all stale icon and splash images from platform/ and resources/ and then it runs 'ionic resources'. Works great for now.

Thanks for the help and feedback

sclearion avatar May 14 '15 17:05 sclearion

I just really want to know if there is a simple 'no-cache' option. I can deal with the images not updating.

sclearion avatar May 14 '15 17:05 sclearion

I think I understand the problem more.

Are you meaning the images that are copied over to the platforms?

Have you tried just running ionic platform rm ios && ionic platform add ios? That would have it copy over the files in the meantime.

jbavari avatar May 19 '15 14:05 jbavari

rm -rf resources/ios
rm -rf resources/android

ionic resources

...it still still uses cached images...

where are these cached images... I would like to remove them so this operates correctly

mzarella avatar Jun 09 '15 05:06 mzarella

My hack method: Search resources/android for .png's in file browser (im on Ubuntu) then manually delete all old icons/splash you see. THEN run ionic resources. Works great for now. WHY would you cache images on a development platform when they are most likely going to be updated VERY frequently. Other than that, I LOVE THIS FRAMEWORK.

sclearion avatar Jun 09 '15 15:06 sclearion

On Mac, "ionic resources --icon" generates the icons but these don't get picked up Xcode. As a result, the app still shows ionic icon and splash. It works for android (using Windows).

After "ionic resources --icon" I get a bunch of png files in $appdir/resources/ios/icon/ that are current; I also see in $appdir/config.xml the icon tags for platform name="ios". How do I get them into Xcode and into my app? Thanks.

dineshgh avatar Aug 13 '15 22:08 dineshgh

Hi, on Windows you can clean system temp files with ccleaner tool and ionic resources generates new splash and icons for your app.

Sorry for my english, i am from Chile.

jfcisternasm avatar Sep 18 '15 16:09 jfcisternasm

Caching resources has been really an annoying feature since I've been using Ionic. Please please and please kindly remove this feature.

nicky-song avatar Sep 19 '15 14:09 nicky-song

Today, sth. really annoying happened: One of the screen.png of Androids' resources was corrupted, which caused an error when building the apk.

Because of the server-side cache / checksum-check, i always got the corrupted images when running ionic resources, although I deleted the resources/ios and resources/android folder.

Editing the source-file (to change its checksum) solved the problem…

An option to ignore / delete the cache when running ionic resources would be great…

konkissner avatar Sep 21 '15 07:09 konkissner

So annoying that's true, an option like ionic resources --clean-cache needed. What @ehlerskon says works for me.

migaes avatar Sep 21 '15 13:09 migaes

Me,too,same problem

rdmclin2 avatar Oct 19 '15 06:10 rdmclin2

Thks @ehlerskon

And +1 for --clean-cache option :)

sghribi avatar Oct 21 '15 23:10 sghribi

Same problem on Mac!

Edit: I have solved by placing the "icon.png" in the resources folder. (I have placed it on the project's root folder).

s1lviu avatar Oct 27 '15 17:10 s1lviu

+1 for --clean-cache option

westonganger avatar Oct 29 '15 18:10 westonganger

I have solved running the command "ionic prepare ios"

luizsoliveira avatar Nov 04 '15 17:11 luizsoliveira

So, is there an option available to ignore cache?

eliashdezr avatar Nov 05 '15 16:11 eliashdezr

+1 - how was this overlooked? rm platform ios is not a solution.

shi11 avatar Nov 06 '15 16:11 shi11

This is driving crazy.. we need some switch to remove cache.

VipinAgarwal avatar Nov 13 '15 01:11 VipinAgarwal