@lazidog/expo-notification-extension
Version:
| [with FCM compatibility] The Expo Notification Service Extension plugin allows you to add a Notification Service Extension file while staying in the managed workflow.
19 lines (18 loc) • 970 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var config_plugins_1 = require("@expo/config-plugins");
/**
* Add 'aps-environment' record with current environment to '<project-name>.entitlements' file
* @see https://documentation.onesignal.com/docs/react-native-sdk-setup#step-4-install-for-ios-using-cocoapods-for-ios-apps
*/
var withApsEnvironment = function (config, _a) {
var apsEnvironment = _a.apsEnvironment;
return (0, config_plugins_1.withEntitlementsPlist)(config, function (newConfig) {
if (apsEnvironment == null) {
throw new Error("\n Missing required \"apsEnvironment\" key in your app.json or app.config.js file for \"expo-notification-extension\" plugin.\n \"apsEnvironment\" can be either \"development\" or \"production\".");
}
newConfig.modResults["aps-environment"] = apsEnvironment;
return newConfig;
});
};
exports.default = withApsEnvironment;