ionic resources does NOT update old icon
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
@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?
@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?
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
I just really want to know if there is a simple 'no-cache' option. I can deal with the images not updating.
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.
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
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.
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.
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.
Caching resources has been really an annoying feature since I've been using Ionic. Please please and please kindly remove this feature.
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…
So annoying that's true, an option like ionic resources --clean-cache needed. What @ehlerskon says works for me.
Me,too,same problem
Thks @ehlerskon
And +1 for --clean-cache option :)
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).
+1 for --clean-cache option
I have solved running the command "ionic prepare ios"
So, is there an option available to ignore cache?
+1 - how was this overlooked? rm platform ios is not a solution.
This is driving crazy.. we need some switch to remove cache.