VsTac task failed, could not find file appAsTgz.tgz when using global Cordova toolset

前端 未结 3 716
北海茫月
北海茫月 2021-01-05 06:31

When I use my globally installed Cordova 7.1.0 toolset and do an iOS remote build (to simulator or to Local Device), I almost immediately get the error message:



        
3条回答
  •  春和景丽
    2021-01-05 06:43

    Latest way to compile for iOS using Cordova and Visual Studio 2017 (15.5)

    In Mac OS:

    • Install Xcode 9.*

    • Install Node.JS 6.*. (https://nodejs.org/dist/latest-v6.x/) - Newer NPM version doesn't work for now.

    • Install Xcode components via terminal: xcode-select -–install

    • Install "remotebuild" Microsoft tool for remote compile from Visual Studio (Windows): sudo npm install -g remotebuild

    • Install COCOA Pods (needed by newer Cordova 7.1.0): sudo gem install cocoapods

    • Setup COCOA Pods for your first use just running command (about 680 MB to download): pod setup

    ​ - Set permissions:

    sudo chown -R $USER:$GROUP ~/.npm

    sudo chown -R $USER:$GROUP ~/.config

    • Start remotebuild to start listen: remotebuild

    In Windows:

    • Install newer Visual Studio 2017 (15.5)...

    • Install Node.JS 6.*. (https://nodejs.org/dist/latest-v6.x/) - Newer NPM version doesn't work for now.

    • Install Global Cordova version (compatible with newer platforms and iOS versions): npm install -g cordova

    • Until now the VS 2017 has a bug (https://developercommunity.visualstudio.com/content/problem/94814/vs-153-cordova-cannot-use-global-cordova-anymore.html) when Cordova project loads the VS force set to use Cordova Toolset 6.3.1. To solve it (workaround):
      • Change the follow line in config.xml (open using xml editor):

    From

    6.3.1

    To

    GlobalCordovaVersion

    • Remove the follow lines from config.xml (open using xml editor):

    //if the file has another line with a newer version

    //if the file has another line with a newer version

    //if the file has another line with a newer version

    //if the file has another line with a newer version

    • Setup Visual Studio (Tools > Options > Tools For Apache Cordova)​ with the config generated by remotebuild (running in Mac OS). Screen example: Remote Agent Output

      • Tip: Try a ping before configure. If you have a problem, use IP instead computer name.
    • Build. You can locate your *.ipa file in bin\iOS\Debug folder.

提交回复
热议问题