Error building ios with cordova

后端 未结 17 1543
-上瘾入骨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:24

    You just need to update the cordova to fix this error: to update the cordova run below command

    $sudo npm install -g cordova@6.2.0
    

    once you update the cordova type below command to remove the platform

    $sudo ionic cordova platform rm ios --save
    

    And then add platform again using below command

    $sudo ionic cordova platform add ios --save
    

    I hope this will help you.

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

    Update - 03-08-2017

    > ionic cordova resources
    

    Old CLI command:

    I had the same error, and after re-running ionic resources it went away.

    The problem was that I had Windows-style slashes (backslashes) in the path of the icon, i.e. the error I had was this:

    Error: Source path does not exist: resources\ios\icon\icon-40.png

    So, converting backslashes into slashes resolved it for me.

    Update: And regarding your second error, it helped me to reset the state:

    ionic state reset

    Make sure you have ios listed under cordovaPlatforms in your package.json before running this command. Then ionic automatically re-downloads your plugins afresh and is ready to build.

    Hope that helps. Take care!

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

    I've had same error only with other image:

    Source path does not exist: resources/ios/icon/icon-40@2x.png

    This happened after upgrading to Cordova 6.3.0 and I've solved it downgrading Cordova.

    Quickfix for now:

    npm uninstall -g cordova
    npm install -g cordova@6.2.0
    
    0 讨论(0)
  • 2021-02-03 23:28

    it's a cat and mouse problem,

    1. the icon resources aren't built because the platform isn't added and
    2. platform can't be added because the icon resource isn't there

    ionic/cordova is pretty unstable and a nightmare to work with in CI pipeline.

    this kept crashing out CI pipeline. just keep removing and adding the android/ios platform and build the resources using ionic cordova resources --force

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

    It's likely that your resources haven't been run.

    Run:

    npm i -g cordova-ionic platform rm ios
    ionic platform rm ios // You want to do this just so when you recreate you have necessary resouces
    ionic cordova resources
    ionic cordova build --release <ios/android>
    

    There should be more answers with this solution, since ionic is a project based on npm and this command will install the necessary libraries.

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

    Try to replace the "\" with "/" (backslash and slash) in the config.xml.

    If you create the project on a Windows system and move to macOS for iOS compilation, it still has the Windows URI format.

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