40 lines
1.9 KiB
JavaScript
40 lines
1.9 KiB
JavaScript
![]() |
"use strict";
|
||
|
var __rest = (this && this.__rest) || function (s, e) {
|
||
|
var t = {};
|
||
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||
|
t[p] = s[p];
|
||
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||
|
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||
|
t[p[i]] = s[p[i]];
|
||
|
}
|
||
|
return t;
|
||
|
};
|
||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
const core_plugins_1 = require("../core-plugins");
|
||
|
const ios_plugins_1 = require("../ios-plugins");
|
||
|
const static_plugins_1 = require("../static-plugins");
|
||
|
const packageName = 'expo-apple-authentication';
|
||
|
const withAppleSignInEntitlement = ios_plugins_1.createEntitlementsPlugin(setAppleSignInEntitlement, 'withAppleSignInEntitlement');
|
||
|
function setAppleSignInEntitlement(config, _a) {
|
||
|
var _b;
|
||
|
var { 'com.apple.developer.applesignin': _ } = _a, entitlementsPlist = __rest(_a, ['com.apple.developer.applesignin']);
|
||
|
if ((_b = config.ios) === null || _b === void 0 ? void 0 : _b.usesAppleSignIn) {
|
||
|
return Object.assign(Object.assign({}, entitlementsPlist), { 'com.apple.developer.applesignin': ['Default'] });
|
||
|
}
|
||
|
return entitlementsPlist;
|
||
|
}
|
||
|
exports.withAppleAuthentication = config => {
|
||
|
return static_plugins_1.withStaticPlugin(config, {
|
||
|
_isLegacyPlugin: true,
|
||
|
plugin: packageName,
|
||
|
// If the static plugin isn't found, use the unversioned one.
|
||
|
fallback: withUnversionedAppleAuthentication,
|
||
|
});
|
||
|
};
|
||
|
const withUnversionedAppleAuthentication = core_plugins_1.createRunOncePlugin(config => {
|
||
|
config = withAppleSignInEntitlement(config);
|
||
|
return config;
|
||
|
}, packageName);
|
||
|
exports.default = exports.withAppleAuthentication;
|
||
|
//# sourceMappingURL=expo-apple-authentication.js.map
|