UNPKG

react-native-app-auth

Version:

React Native bridge for AppAuth for supporting any OAuth 2 provider

24 lines (23 loc) 782 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.withUrlSchemes = void 0; const config_plugins_1 = require("@expo/config-plugins"); const withUrlSchemes = (config, props) => { return (0, config_plugins_1.withInfoPlist)(config, cfg => { if (!cfg.ios) { cfg.ios = {}; } if (!cfg.ios.infoPlist) { cfg.ios.infoPlist = {}; } if (!cfg.ios.infoPlist.CFBundleURLTypes) { cfg.ios.infoPlist.CFBundleURLTypes = []; } cfg.ios.infoPlist.CFBundleURLTypes.push({ CFBundleURLName: '$(PRODUCT_BUNDLE_IDENTIFIER)', CFBundleURLSchemes: [props?.ios?.urlScheme], }); return cfg; }); }; exports.withUrlSchemes = withUrlSchemes;