Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

### Problems with ContentSync.sync function #bug #195

@Rafaelferreiraalves

Description

@Rafaelferreiraalves

I have an application that makes use of the plugin.
At a certain point I use the ContentSync.sync function to make a call to a web api made in C #. Everything happens perfectly when in the call I put the IP but if I switch to HOSTNAME me the plugin presents errors. Can someone help me ?


function below

function syncApp(localServiceBus, appIndo) {
var sync = ContentSync.sync({
src: localServiceBus + 'AppConfigManagerQrcodePage/DownloadApk?zipName=' + appIndo.Download,
id: 'appRoot',
type: 'replace',
validateSrc: false
});

sync.on('progress', function (data) {
$ionicLoading.show({
template: 'Sincronizando... ' + data.progress + "%"
});
});

        sync.on('complete', function (data) {
            console.log(data);
            var applicationDirectory = cordova.file.dataDirectory + 'appRoot';

            localStorageService.setObject("hostConfig", {
                local: false,
                port: "",
                url: applicationDirectory,
                localServiceBus: localServiceBus,
                installApp: false,
                syncApp: true,
                autenticateApp: false,
                appInfo: appIndo
            });

            window.location.href = "index.html";
        });

        sync.on('error', function (e) {
            $ionicLoading.hide();
            toaster.pop('error', '', e);
            console.log(e);
        });

        sync.on('cancel', function () {
            //$ionicLoading.hide();
            //messengerFactory.warning(e)
        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions