react-native-expo-moengage
Version:
MoEngage Expo plugin for integrating MoEngage React-Native SDK
73 lines (72 loc) • 3.78 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.withMoEngageDangerousMod = exports.withMoEngageXcodeProject = exports.withMoEngageEntitlements = exports.withMoEngageInfoPlist = exports.constants = exports.withMoEngageIos = void 0;
const withInfoPlist_1 = require("./withInfoPlist");
Object.defineProperty(exports, "withMoEngageInfoPlist", { enumerable: true, get: function () { return withInfoPlist_1.withMoEngageInfoPlist; } });
const withEntitlements_1 = require("./withEntitlements");
Object.defineProperty(exports, "withMoEngageEntitlements", { enumerable: true, get: function () { return withEntitlements_1.withMoEngageEntitlements; } });
const withXcodeProject_1 = require("./withXcodeProject");
Object.defineProperty(exports, "withMoEngageXcodeProject", { enumerable: true, get: function () { return withXcodeProject_1.withMoEngageXcodeProject; } });
const withDangerousMod_1 = require("./withDangerousMod");
Object.defineProperty(exports, "withMoEngageDangerousMod", { enumerable: true, get: function () { return withDangerousMod_1.withMoEngageDangerousMod; } });
const constants = __importStar(require("./constants"));
exports.constants = constants;
/**
* The main iOS plugin that applies all modifiers to set up MoEngage iOS integration
*
* This is the primary entry point for the MoEngage Expo plugin for iOS.
* It orchestrates the entire configuration process by applying each of the
* specialized modifiers in the correct order:
*
* 1. withMoEngageInfoPlist - Updates Info.plist with MoEngage configuration
* 2. withMoEngageEntitlements - Sets up app groups and other entitlements
* 3. withMoEngageXcodeProject - Configures the Xcode project with extension targets
* 4. withMoEngageDangerousMod - Performs file operations and updates Podfile
*
* @param config - The Expo config object
* @param props - The MoEngage plugin properties
* @returns The fully configured Expo config
*/
const withMoEngageIos = (config, props) => {
config = (0, withInfoPlist_1.withMoEngageInfoPlist)(config, props);
config = (0, withEntitlements_1.withMoEngageEntitlements)(config, props);
config = (0, withXcodeProject_1.withMoEngageXcodeProject)(config, props);
config = (0, withDangerousMod_1.withMoEngageDangerousMod)(config, props);
return config;
};
exports.withMoEngageIos = withMoEngageIos;
// Default export
exports.default = exports.withMoEngageIos;