Cannot remove AppFlow

Hey,

I followed these steps: https://ionicframework.com/docs/appflow/quickstart/connect

Got AppFlow working as a test, all great. Deployed a change and it was picked up.

Now I want to get rid of AppFlow and just run another version of my app without AppFlow.

I have switched back to my branch with no AppFlow work, and have done the following:

  • Reinstalled node modules

    rm -r node_modules
    npm install

  • Removed the ionic plugin

    cordova plugin rm cordova-plugin-ionic --save --variable APP_ID=appid CHANNEL_NAME=master

  • This actually fails because the plugin does not exist anyway on this branch

$ cordova plugin list
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.4.1 "cordova-plugin-ionic-webview"
cordova-plugin-market 1.2.0 "Market"
cordova-plugin-memory-status 1.0.0 "MemoryStatus"
cordova-plugin-memory-warning 1.0.0 "CordovaPluginMemoryWarning"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 3.2.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
  • Removed and added ios:

    ionic cordova platform remove ios
    ionic cordova platform add ios

  • Rebuilt the app

    ionic cordova build ios

  • Prepared the app

    ionic cordova prepare ios

  • Removed DerivedData from xcode

    rm -r /Users/username/Library/Developer/Xcode/DerivedData

  • Removed the app from simulator

  • Deployed the app to a different simulator device

When I run the app through xcode or using ionic cordova emulate ios it will always show the last version I pushed to the master channel in AppFlow, I can see in xcode the output that is fetching that release:

{
    appId = id;
    availableUpdate =     {
        binaryVersionCode = "1.0.0";
        binaryVersionName = "1.12.2";
        buildId = id;
        channel = Master;
        lastUsed = "2019-06-20T06:07:15.258Z";
        state = ready;
        url = "https://api.ionicjs.com/apps/...etc...";
        versionId = "id";
    };
    binaryVersion = "1.12.2";
    binaryVersionCode = "1.0.0";
    binaryVersionName = "1.12.2";
    channel = Master;
    disabled = 0;
    host = "https://api.ionicjs.com";
    maxVersions = 2;
    minBackgroundDuration = 30;
    updateMethod = background;
    updates =     {
        "id" =         {
            binaryVersionCode = "1.0.0";
            binaryVersionName = "1.12.2";
            buildId = 6551846;
            channel = Master;
            lastUsed = "2019-06-20T06:07:15.258Z";
            state = ready;
            url = "https://api.ionicjs.com/apps/...etc...";
            versionId = "id";
        };
    };
}

Despite doing all of the above I found in the plugins directory contained information about ionic app flow

plugins/fetch.json

  "cordova-plugin-ionic": {
    "source": {
      "type": "registry",
      "id": "cordova-plugin-ionic@5.3.0"
    },
    "is_top_level": true,
    "variables": {
      "APP_ID": "id",
      "CHANNEL_NAME": "Master",
      "UPDATE_METHOD": "background",
      "UPDATE_API": "https://api.ionicjs.com",
      "MAX_STORE": "2",
      "MIN_BACKGROUND_DURATION": "30"
    }
  },

plugins/ios.json:

    "cordova-plugin-ionic": {
      "APP_ID": "id",
      "CHANNEL_NAME": "Master",
      "UPDATE_API": "https://api.ionicjs.com",
      "UPDATE_METHOD": "background",
      "MAX_STORE": "2",
      "MIN_BACKGROUND_DURATION": "30",
      "PACKAGE_NAME": "$(PRODUCT_BUNDLE_IDENTIFIER)"
    },

So I removed the plugins directory

rm -r plugins

Then readded ios platform

ionic cordova platform remove ios
ionic cordova platform add ios

And that solved the problem

I mean is this really the solution? After adding the Appflow Deploy with an update setting=none I was not able to change it. So I can change it only if I remove the entire platform? WHY? WHAT? HOW? And there is nothing in my config.xml that I can overwrite, only the android.json has info about the deployment…

For stuff like this I have found it best to remove the platform folder, then add in your ios/android platforms again.

Hey, this isn’t related to your issue, but do you know the correct syntax to use to get the cordova.plugin.memory-status plugin to return a status? I’ve been stuck on this for 2 days now.

You dont need to remove plugin , just remove id from your ionic.config,json file and you all set. it unlink from a project.

image

1 Like