I am building an ionic 2 application, with some buttons at the bottom, the third button doesn’t use ionicons, it uses a custom image, stored in /www/img. This is what the buttons look like in my browser:
AFAIK, when your image is located in www/img then you should reference it as img/key.png from your HTML files or as ../../img/key.png from your SCSS files.
I just tried this and it works in Chrome and when deployed to an Android device (I can’t test it on iOS though):
You could try to insert the image in one of the pages (i.e. <img src="img/key.png">) to check if it’s present after deploying to iOS (this way you’ll know if it’s a problem with the file or something with the styles).
OK, fixed it! The problem was that whilst the browser works, if you go straight to XCode build, then you face issues, using ionic emulate ios as a pre-build step seems to make the difference!
One problem I am not able to overcome currently though…
I need to scale the image to be the same (/similar) size tot he other icons, so I ahve the following css:
The emulator seems very slow. It launches but then the app did not load inside it. I don’t know it I should have given it more time but I think something went wrong
It’s strange that something so simple is giving me such a hard time.