-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
withAppleAuthIOS.js
27 lines (27 loc) · 1021 Bytes
/
withAppleAuthIOS.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.withAppleAuthIOS = exports.withIOSMixedLocales = void 0;
const config_plugins_1 = require("@expo/config-plugins");
/**
* Enable including `strings` files from external packages.
* Required for making the Apple Auth button support localizations.
*
* @param config
* @returns
*/
const withIOSMixedLocales = (config) => {
return (0, config_plugins_1.withInfoPlist)(config, (config) => {
config.modResults.CFBundleAllowMixedLocalizations =
config.modResults.CFBundleAllowMixedLocalizations ?? true;
return config;
});
};
exports.withIOSMixedLocales = withIOSMixedLocales;
const withAppleAuthIOS = (config) => {
config = (0, exports.withIOSMixedLocales)(config);
return (0, config_plugins_1.withEntitlementsPlist)(config, (config) => {
config.modResults['com.apple.developer.applesignin'] = ['Default'];
return config;
});
};
exports.withAppleAuthIOS = withAppleAuthIOS;