How to use the appcenter-link-scripts.android function in appcenter-link-scripts

To help you get started, we’ve selected a few appcenter-link-scripts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / appcenter-sdk-react-native / appcenter-data / scripts / postlink.js View on Github external
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

const rnpmlink = require('appcenter-link-scripts');

// Configure Android first.
let promise = null;
if (rnpmlink.android.checkIfAndroidDirectoryExists()) {
    console.log('Configuring AppCenter Data for Android');
    promise = rnpmlink.android.initAppCenterConfig()
        .then(() => {
            rnpmlink.android.removeAndroidDuplicateLinks();
        }).catch((e) => {
            console.error(`Could not configure AppCenter Data for Android. Error Reason - ${e.message}`);
            return Promise.resolve();
        });
} else {
    promise = Promise.resolve();
}

// Then iOS even if Android failed.
if (rnpmlink.ios.checkIfAppDelegateExists()) {
    promise
        .then(() => {
            console.log('Configuring AppCenter Data for iOS');
            return rnpmlink.ios.initAppCenterConfig();
github microsoft / appcenter-sdk-react-native / appcenter-auth / scripts / postlink.js View on Github external
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

const rnpmlink = require('appcenter-link-scripts');

// Configure Android first.
let promise = null;
if (rnpmlink.android.checkIfAndroidDirectoryExists()) {
    console.log('Configuring AppCenter Auth for Android');
    promise = rnpmlink.android.initAppCenterConfig()
        .then(() => {
            rnpmlink.android.removeAndroidDuplicateLinks();
        }).catch((e) => {
            console.error(`Could not configure AppCenter Auth for Android. Error Reason - ${e.message}`);
            return Promise.resolve();
        });
} else {
    promise = Promise.resolve();
}

// Then iOS even if Android failed.
if (rnpmlink.ios.checkIfAppDelegateExists()) {
    promise
        .then(() => {
github microsoft / appcenter-sdk-react-native / appcenter / scripts / postlink.js View on Github external
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

const rnpmlink = require('appcenter-link-scripts');

// Configure Android first.
let promise = null;
if (rnpmlink.android.checkIfAndroidDirectoryExists()) {
    console.log('Configuring AppCenter Analytics for Android');
    promise = rnpmlink.android.initAppCenterConfig()
        .then(() => {
            rnpmlink.android.removeAndroidDuplicateLinks();
        }).catch((e) => {
            console.error(`Could not configure AppCenter for Android. Error Reason - ${e.message}`);
            return Promise.resolve();
        });
} else {
    promise = Promise.resolve();
}

// Then iOS even if Android failed.
if (rnpmlink.ios.checkIfAppDelegateExists()) {
    promise
        .then(() => {
github microsoft / appcenter-sdk-react-native / appcenter-push / scripts / postlink.js View on Github external
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

const rnpmlink = require('appcenter-link-scripts');

console.log('Please enter your Android and iOS app secrets below.');
console.log('For more information: https://docs.microsoft.com/en-us/appcenter/sdk/getting-started/react-native');

// Configure Android first.
let promise = null;
if (rnpmlink.android.checkIfAndroidDirectoryExists()) {
    console.log('Configuring AppCenter Analytics for Android');
    promise = rnpmlink.android.initAppCenterConfig()
        .then(() => {
            rnpmlink.android.removeAndroidDuplicateLinks();
        }).catch((e) => {
            console.error(`Could not configure AppCenter Push for Android. Error Reason - ${e.message}`);
            return Promise.resolve();
        });
} else {
    promise = Promise.resolve();
}

// Then iOS even if Android failed.
if (rnpmlink.ios.checkIfAppDelegateExists()) {
    promise
        .then(() => {
github microsoft / appcenter-sdk-react-native / appcenter-crashes / scripts / postlink.js View on Github external
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

const rnpmlink = require('appcenter-link-scripts');

// Configure Android first.
let promise;
if (rnpmlink.android.checkIfAndroidDirectoryExists()) {
    console.log('Configuring AppCenter Crashes for Android');
    promise = rnpmlink.android.initAppCenterConfig()
        .then(() => {
            rnpmlink.android.patchStrings('appCenterCrashes_whenToSendCrashes',
                'ALWAYS_SEND');
            rnpmlink.android.removeAndroidDuplicateLinks();
        }).catch((e) => {
            console.error(`Could not configure AppCenter Crashes for Android. Error Reason - ${e.message}`);
            return Promise.resolve();
        });
} else {
    promise = Promise.resolve();
}

// Then iOS even if Android failed.
if (rnpmlink.ios.checkIfAppDelegateExists()) {
github microsoft / appcenter-sdk-react-native / appcenter-analytics / scripts / prelink.js View on Github external
const rnpmlink = require('appcenter-link-scripts');

console.log('Configuring AppCenter Analytics');

return rnpmlink.android.checkIfAndroidDirectoryExists()
    .then(() => {
        rnpmlink.android.initConfig()
            .catch((e) => {
                console.log(`Could not create AppCenter config file. Error Reason - ${e.message}`);
                return Promise.reject();
            });
    })
    .catch(() => Promise.resolve());
github microsoft / appcenter-sdk-react-native / appcenter-crashes / scripts / prelink.js View on Github external
const rnpmlink = require('appcenter-link-scripts');

console.log('Configuring AppCenter Crashes');

return rnpmlink.android.checkIfAndroidDirectoryExists()
    .then(() => {
        rnpmlink.android.initAppCenterConfig()
            .catch((e) => {
                console.log(`Could not create AppCenter config file. Error Reason - ${e.message}`);
                return Promise.reject();
            });
    })
    .catch(() => Promise.resolve());
github microsoft / appcenter-sdk-react-native / appcenter / scripts / prelink.js View on Github external
.then(() => {
        rnpmlink.android.initAppCenterConfig()
            .catch((e) => {
                console.log(`Could not create AppCenter config file. Error Reason - ${e.message}`);
                return Promise.reject();
            });
    })
    .catch(() => Promise.resolve());
github microsoft / appcenter-sdk-react-native / appcenter-push / scripts / prelink.js View on Github external
const rnpmlink = require('appcenter-link-scripts');

console.log('Configuring AppCenter Push');

return rnpmlink.android.checkIfAndroidDirectoryExists()
    .then(() => {
        rnpmlink.android.initAppCenterConfig()
            .catch((e) => {
                console.log(`Could not create AppCenter config file. Error Reason - ${e.message}`);
                return Promise.reject();
            });
    })
    .catch(() => Promise.resolve());
github microsoft / appcenter-sdk-react-native / appcenter-analytics / scripts / postlink.js View on Github external
.then(() => {
            rnpmlink.android.patchStrings('appCenterAnalytics_whenToEnableAnalytics', 'ALWAYS_SEND');
            rnpmlink.android.removeAndroidDuplicateLinks();
        }).catch((e) => {
            console.error(`Could not configure AppCenter Analytics for Android. Error Reason - ${e.message}`);

appcenter-link-scripts

Node module that contains common functionality needed to link appcenter-* modules

MIT
Latest version published 3 months ago

Package Health Score

76 / 100
Full package analysis

Popular appcenter-link-scripts functions