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

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

Open
Rafaelferreiraalves opened this issue Jun 1, 2018 · 0 comments
Open

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

Rafaelferreiraalves opened this issue Jun 1, 2018 · 0 comments

Comments

@Rafaelferreiraalves
Copy link

Rafaelferreiraalves commented Jun 1, 2018

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)
        });
@Rafaelferreiraalves Rafaelferreiraalves changed the title ### Problemas com função ContentSync.syn ### Problems with ContentSync.syn function Jun 1, 2018
@Rafaelferreiraalves Rafaelferreiraalves changed the title ### Problems with ContentSync.syn function ### Problems with ContentSync.sync function Jun 1, 2018
@Rafaelferreiraalves Rafaelferreiraalves changed the title ### Problems with ContentSync.sync function ### Problems with ContentSync.sync function #bug Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant