Error building ios with cordova

后端 未结 17 1576
-上瘾入骨i
-上瘾入骨i 2021-02-03 22:32

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

相关标签:
17条回答
  • 2021-02-03 23:12

    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.

    0 讨论(0)
  • 2021-02-03 23:14

    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

    0 讨论(0)
  • 2021-02-03 23:15

    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".

    0 讨论(0)
  • 2021-02-03 23:20

    I have try some times, finally success.

    1. use 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

    1. use ionic platform remove ios when execute successfully use ionic platform add ios

    DON'T USEionic state reset

    0 讨论(0)
  • 2021-02-03 23:20

    Running these commands solved it for me:

    ionic platform rm ios

    ionic resources

    ionic platform add ios

    0 讨论(0)
  • 2021-02-03 23:22

    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.

    0 讨论(0)
提交回复
热议问题