UNPKG

@abl-solutions/wifi-connect

Version:

The WiFi Connect React Native SDK enables the use of WiFi WPA2-Enterprise networks on mobile devices that are managed and operated by abl solutions GmbH

92 lines (81 loc) 2.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Campaign", { enumerable: true, get: function () { return _campaign.Campaign; } }); Object.defineProperty(exports, "CampaignOptions", { enumerable: true, get: function () { return _campaign.CampaignOptions; } }); Object.defineProperty(exports, "CampaignService", { enumerable: true, get: function () { return _campaign.CampaignService; } }); Object.defineProperty(exports, "ErrorCode", { enumerable: true, get: function () { return _errorCode.ErrorCode; } }); Object.defineProperty(exports, "LegalTerms", { enumerable: true, get: function () { return _wifiConnect.LegalTerms; } }); Object.defineProperty(exports, "WifiConnectOptions", { enumerable: true, get: function () { return _wifiConnect.WifiConnectOptions; } }); Object.defineProperty(exports, "WifiConnectService", { enumerable: true, get: function () { return _wifiConnect.WifiConnectService; } }); exports.initWifiConnectService = exports.initCampaignService = void 0; var _reactNative = require("react-native"); var _campaign = require("./campaign"); var _wifiConnect = require("./wifi-connect"); var _errorCode = require("./error-code"); /** * Initializer factory that returns an instance of WifiConnectService. This service can be used * to perform any Wifi Connectivity related action (e.g. configuring the device's network settings). * @param options Options for the WifiConnectService instance. * @returns The new WifiConnectService instance. */ const initWifiConnectService = options => { const LINKING_ERROR = `The package '@abl-solutions/wifi-connect' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo managed workflow\n'; const NativeWifiConnect = _reactNative.NativeModules.WifiConnect ? _reactNative.NativeModules.WifiConnect : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); return new _wifiConnect.WifiConnectServiceImpl(NativeWifiConnect, options); }; /** * Initializer factory that returns an instance of CampaignService. This service can be used to * perform any campaign related action. * @param options Options for the CampaignService instance. * @returns The new CampaignService instance. */ exports.initWifiConnectService = initWifiConnectService; const initCampaignService = options => { return new _campaign.CampaignServiceImpl(options); }; exports.initCampaignService = initCampaignService; //# sourceMappingURL=index.js.map