Cannot build cordova-ios on Xcode



  • Hi, now I am trying to build cordova project on Xcode.
    From terminal command ‘quasar dev -m cordova -T ios’ works well, but when I try to build on Xcode, cannnot build.

    What I tried;
    I know Apple will stop accepting builds containing references to UIWebView. I installed “cordova-plugin-wkwebview-engine” plugin and put codes on config.xml as mentioned below page.

    https://cordova.apache.org/howto/2020/03/18/wkwebviewonly.html

    but still get some error message on Xcode.
    スクリーンショット 2020-06-10 1.49.24.png

    How can I fix this issue.

    my config.xml

    <platform name="ios">
            <allow-intent href="itms:*" />
            <allow-intent href="itms-apps:*" />
            <preference name="OverrideUserAgent" value="Mozilla/5.0 (iPhone; CPU iPhone OS 13_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Mobile/15E148 Safari/604.1" />
            <allow-navigation href="http://*" />
            <allow-navigation href="https://*" />
            <feature name="CDVWKWebViewEngine">
                <param name="ios-package" value="CDVWKWebViewEngine" />
            </feature>
            <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
            <preference name="WKWebViewOnly" value="true" />
        </platform>
    

    package.json

    "cordova": {
        "plugins": {
          "cordova-plugin-whitelist": {},
          "cordova-plugin-wkwebview-engine": {},
          "cordova-plugin-browsertab": {},
          "cordova-plugin-buildinfo": {},
          "cordova-plugin-compat": {},
          "cordova-plugin-device": {},
          "cordova-plugin-file": {},
          "cordova-plugin-media": {
            "KEEP_AVAUDIOSESSION_ALWAYS_ACTIVE": "NO"
          },
          "cordova-plugin-splashscreen": {},
          "cordova-universal-links-plugin": {},
          "cordova-plugin-inappbrowser": {}
        },
        "platforms": [
          "ios"
        ]
      }
    

    Please give me some hints!!



  • Did you open the Xcode project using the .project file? You have to open it with the .workspace file.

    also you might first have to ‘build’ it instead of ‘dev’ with Quasar first.( not sure about this one)



  • Thank you for the reply, dobbel.
    I tried ‘quasar build -m cordova -T ios’ and then open from .workspace file as you said.
    Now it worked!!!You saved me a lot, I appreciate it. Thanks.


Log in to reply