Blank app fails debug build - /Info.plist file not found

后端 未结 6 1301
南方客
南方客 2020-12-14 22:29

In a larger context I resorted back to creating a blank project and running my build commands. Same error:

ionic start myApp blank
cd myApp
ionic cordova run         


        
相关标签:
6条回答
  • 2020-12-14 22:49

    This worked for me:

    cd platforms/ios/cordova && npm install ios-sim@latest
    
    0 讨论(0)
  • 2020-12-14 22:50

    This worked for me

    Open your workspace file, then File --> WorkSpace Settings
    
    In shared Workspace settings, choose Build System: Legacy Build System.
    
    Then run ionic cordova run -l
    

    Source(last comment): https://forum.ionicframework.com/t/fresh-ionic-fails-to-emulate-ios-12-info-plist-file-not-found/142291

    Update

    I just found out that Cordova IOS 5.0.0 was released. https://cordova.apache.org/announcements/2019/02/09/cordova-ios-release-5.0.0.html

    0 讨论(0)
  • 2020-12-14 22:57

    This problem is caused because of Xcode 10. I resolved this issue by two ways.

    1. ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"

    2. Create a build.json file on root of project.

    In build.json write below code.

    {
        "ios": {
            "debug": {
                "buildFlag": ["-UseModernBuildSystem=0"]
            },
            "release": {
                "buildFlag": ["-UseModernBuildSystem=0"]
            }
        }
    }
    

    After that you can run these commands without any error.

    • ionic cordova build ios
    • ionic cordova run ios
    • ionic cordova run ios --target="iPhone-6s" -l
    0 讨论(0)
  • 2020-12-14 23:07

    This works for me:

    cordova run ios --debug --target "iPhone-8" --buildFlag='-UseModernBuildSystem=0'
    
    0 讨论(0)
  • 2020-12-14 23:12

    This problem is caused because Xcode 10 contains a new build system which is currently not compatible with cordova-ios@4 - see here.

    The solution for now is to run Cordova with the --buildFlag='-UseModernBuildSystem=0' option to instruct Xcode to use the old build system, e.g.:

     cordova run ios --debug --target "iPhone-8" --buildFlag='-UseModernBuildSystem=0'
    

    Update: For my own convenience, I've wrapped this in a shell script:

    #!/bin/bash
    # Adds build flag to make cordova-ios@4 work with Xcode 10
    cordova "$@" --buildFlag='-UseModernBuildSystem=0'
    

    I saved this in a file called cordova-xcode10, made sure it's in the path and made it executable (chmod a+x cordova-xcode10), then I can just do:

    cordova-xcode10 run ios --target "iPhone-8"
    

    and it will work with Xcode 10

    0 讨论(0)
  • 2020-12-14 23:15

    only add this flag in you command

    cordova run ios --device --buildFlag='-UseModernBuildSystem=0' --verbose
    

    work fine for me

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