I have a problem when I build the ios platform with cordova. I have all the certificates for the app and device, but when I try to run in my ios device, doing ionic run ios, the
I've found this issue in several occasions and some of the provided answers worked quite well till today, when no one worked.
My environment: MacOS high Sierra 10.13, ionic cli 3.18.0 and cordova 7.1.0.
My problem was that if I run ionic cordova prepare
it fails saying that I need to add a platform and if a I add a platform with ionic cordova platform add ios
it fails with the error specified in the answer:
Error: Source path does not exist: resources/ios/icon/icon-40@3x.png
What solved my issue was manually creating the platforms folder: mkdir platforms
. After creating this folder, adding a platform worked as usual.
I hope it could help someone out there.
Just use: Remove platform
cordova platform remove ios
And add ios platform with old one
cordova platform add ios@4.0.0 --save
It worked for me..
@4.0.0 will select previous version automatically
It says that the resources directory only contained empty folders. Downloading this repo (https://github.com/ionic-team/ionic2-app-base/tree/master/resources) and replace the resources directory
Run again the "ionic cordova resources".
I have try some times, finally success.
ionic resources --icon
, maybe met the new problem"Unable to generate images due to an error Failed to upload source image: Error: read ECONNRESET"
don't worry , try it later
ionic platform remove ios
when execute successfully
use ionic platform add ios
DON'T USEionic state reset
Running these commands solved it for me:
ionic platform rm ios
ionic resources
ionic platform add ios
If you are missing the icon you can run the command
ionic resources --icon
This will generate all the icons with the pixels needed to run on any device.
To simulate on the device you first need to
ionic build ios
and then
ionic simulate ios
It is also a good practice to have xcode up to date.
If you are still getting the error you can paste this line
"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"
on Build Settings > Header Search Paths. Do not remove the similar line, just add it at the end.