@expo/config-plugins 5.0.4 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Plugin.types.d.ts +7 -7
- package/build/Plugin.types.js +0 -9
- package/build/Plugin.types.js.map +1 -1
- package/build/android/AllowBackup.js +0 -15
- package/build/android/AllowBackup.js.map +1 -1
- package/build/android/BuildProperties.js +2 -16
- package/build/android/BuildProperties.js.map +1 -1
- package/build/android/Colors.js +3 -25
- package/build/android/Colors.js.map +1 -1
- package/build/android/EasBuild.js +2 -22
- package/build/android/EasBuild.js.map +1 -1
- package/build/android/EasBuildGradleScript.js.map +1 -1
- package/build/android/GoogleMapsApiKey.js +0 -12
- package/build/android/GoogleMapsApiKey.js.map +1 -1
- package/build/android/GoogleServices.js +10 -48
- package/build/android/GoogleServices.js.map +1 -1
- package/build/android/IntentFilters.d.ts +1 -1
- package/build/android/IntentFilters.js +8 -24
- package/build/android/IntentFilters.js.map +1 -1
- package/build/android/Manifest.d.ts +19 -19
- package/build/android/Manifest.js +7 -66
- package/build/android/Manifest.js.map +1 -1
- package/build/android/Name.js +6 -27
- package/build/android/Name.js.map +1 -1
- package/build/android/Orientation.js +2 -12
- package/build/android/Orientation.js.map +1 -1
- package/build/android/Package.js +26 -111
- package/build/android/Package.js.map +1 -1
- package/build/android/Paths.d.ts +2 -2
- package/build/android/Paths.js +0 -47
- package/build/android/Paths.js.map +1 -1
- package/build/android/Permissions.js +8 -52
- package/build/android/Permissions.js.map +1 -1
- package/build/android/PrimaryColor.js +0 -18
- package/build/android/PrimaryColor.js.map +1 -1
- package/build/android/Properties.d.ts +1 -1
- package/build/android/Properties.js +0 -9
- package/build/android/Properties.js.map +1 -1
- package/build/android/Resources.d.ts +4 -4
- package/build/android/Resources.js +9 -29
- package/build/android/Resources.js.map +1 -1
- package/build/android/Scheme.d.ts +1 -1
- package/build/android/Scheme.js +13 -66
- package/build/android/Scheme.js.map +1 -1
- package/build/android/StatusBar.js +5 -33
- package/build/android/StatusBar.js.map +1 -1
- package/build/android/Strings.js +0 -14
- package/build/android/Strings.js.map +1 -1
- package/build/android/Styles.js +7 -34
- package/build/android/Styles.js.map +1 -1
- package/build/android/Updates.d.ts +2 -0
- package/build/android/Updates.js +50 -47
- package/build/android/Updates.js.map +1 -1
- package/build/android/Version.js +3 -29
- package/build/android/Version.js.map +1 -1
- package/build/android/WindowSoftInputMode.js +0 -14
- package/build/android/WindowSoftInputMode.js.map +1 -1
- package/build/android/codeMod.js +6 -22
- package/build/android/codeMod.js.map +1 -1
- package/build/android/index.js +0 -94
- package/build/android/index.js.map +1 -1
- package/build/index.js +2 -65
- package/build/index.js.map +1 -1
- package/build/ios/Bitcode.d.ts +1 -1
- package/build/ios/Bitcode.js +8 -28
- package/build/ios/Bitcode.js.map +1 -1
- package/build/ios/BuildProperties.js +2 -14
- package/build/ios/BuildProperties.js.map +1 -1
- package/build/ios/BuildScheme.js +2 -34
- package/build/ios/BuildScheme.js.map +1 -1
- package/build/ios/BundleIdentifier.js +13 -72
- package/build/ios/BundleIdentifier.js.map +1 -1
- package/build/ios/DeviceFamily.js +6 -24
- package/build/ios/DeviceFamily.js.map +1 -1
- package/build/ios/Entitlements.js +4 -45
- package/build/ios/Entitlements.js.map +1 -1
- package/build/ios/Google.d.ts +2 -2
- package/build/ios/Google.js +11 -66
- package/build/ios/Google.js.map +1 -1
- package/build/ios/IosConfig.types.d.ts +6 -11
- package/build/ios/IosConfig.types.js.map +1 -1
- package/build/ios/Locales.d.ts +3 -3
- package/build/ios/Locales.js +12 -43
- package/build/ios/Locales.js.map +1 -1
- package/build/ios/Maps.js +15 -53
- package/build/ios/Maps.js.map +1 -1
- package/build/ios/Name.js +7 -31
- package/build/ios/Name.js.map +1 -1
- package/build/ios/Orientation.js +2 -10
- package/build/ios/Orientation.js.map +1 -1
- package/build/ios/Paths.d.ts +2 -2
- package/build/ios/Paths.js +8 -73
- package/build/ios/Paths.js.map +1 -1
- package/build/ios/Permissions.js +1 -16
- package/build/ios/Permissions.js.map +1 -1
- package/build/ios/ProvisioningProfile.d.ts +1 -1
- package/build/ios/ProvisioningProfile.js +0 -18
- package/build/ios/ProvisioningProfile.js.map +1 -1
- package/build/ios/RequiresFullScreen.js +19 -31
- package/build/ios/RequiresFullScreen.js.map +1 -1
- package/build/ios/Scheme.js +10 -32
- package/build/ios/Scheme.js.map +1 -1
- package/build/ios/Swift.js +16 -50
- package/build/ios/Swift.js.map +1 -1
- package/build/ios/Target.js +0 -30
- package/build/ios/Target.js.map +1 -1
- package/build/ios/Updates.js +10 -49
- package/build/ios/Updates.js.map +1 -1
- package/build/ios/UsesNonExemptEncryption.js +4 -10
- package/build/ios/UsesNonExemptEncryption.js.map +1 -1
- package/build/ios/Version.js +4 -11
- package/build/ios/Version.js.map +1 -1
- package/build/ios/XcodeProjectFile.js +5 -23
- package/build/ios/XcodeProjectFile.js.map +1 -1
- package/build/ios/codeMod.js +19 -60
- package/build/ios/codeMod.js.map +1 -1
- package/build/ios/index.js +0 -97
- package/build/ios/index.js.map +1 -1
- package/build/ios/utils/Xcodeproj.d.ts +6 -6
- package/build/ios/utils/Xcodeproj.js +15 -101
- package/build/ios/utils/Xcodeproj.js.map +1 -1
- package/build/ios/utils/getInfoPlistPath.js +2 -15
- package/build/ios/utils/getInfoPlistPath.js.map +1 -1
- package/build/ios/utils/string.js +0 -1
- package/build/ios/utils/string.js.map +1 -1
- package/build/plugins/android-plugins.d.ts +2 -2
- package/build/plugins/android-plugins.js +11 -42
- package/build/plugins/android-plugins.js.map +1 -1
- package/build/plugins/createBaseMod.d.ts +3 -3
- package/build/plugins/createBaseMod.js +8 -25
- package/build/plugins/createBaseMod.js.map +1 -1
- package/build/plugins/ios-plugins.d.ts +2 -2
- package/build/plugins/ios-plugins.js +8 -48
- package/build/plugins/ios-plugins.js.map +1 -1
- package/build/plugins/mod-compiler.js +21 -72
- package/build/plugins/mod-compiler.js.map +1 -1
- package/build/plugins/withAndroidBaseMods.d.ts +1 -1
- package/build/plugins/withAndroidBaseMods.js +4 -89
- package/build/plugins/withAndroidBaseMods.js.map +1 -1
- package/build/plugins/withDangerousMod.js +0 -5
- package/build/plugins/withDangerousMod.js.map +1 -1
- package/build/plugins/withIosBaseMods.d.ts +1 -1
- package/build/plugins/withIosBaseMods.js +26 -118
- package/build/plugins/withIosBaseMods.js.map +1 -1
- package/build/plugins/withMod.d.ts +1 -1
- package/build/plugins/withMod.js +24 -59
- package/build/plugins/withMod.js.map +1 -1
- package/build/plugins/withPlugins.js +0 -9
- package/build/plugins/withPlugins.js.map +1 -1
- package/build/plugins/withRunOnce.js +3 -9
- package/build/plugins/withRunOnce.js.map +1 -1
- package/build/plugins/withStaticPlugin.js +21 -43
- package/build/plugins/withStaticPlugin.js.map +1 -1
- package/build/utils/BuildProperties.types.d.ts +2 -2
- package/build/utils/BuildProperties.types.js.map +1 -1
- package/build/utils/Updates.d.ts +3 -1
- package/build/utils/Updates.js +18 -77
- package/build/utils/Updates.js.map +1 -1
- package/build/utils/XML.d.ts +1 -1
- package/build/utils/XML.js +7 -44
- package/build/utils/XML.js.map +1 -1
- package/build/utils/commonCodeMod.js +2 -10
- package/build/utils/commonCodeMod.js.map +1 -1
- package/build/utils/errors.d.ts +1 -1
- package/build/utils/errors.js +3 -11
- package/build/utils/errors.js.map +1 -1
- package/build/utils/fs.js +1 -12
- package/build/utils/fs.js.map +1 -1
- package/build/utils/generateCode.d.ts +1 -1
- package/build/utils/generateCode.js +8 -25
- package/build/utils/generateCode.js.map +1 -1
- package/build/utils/history.d.ts +1 -1
- package/build/utils/history.js +0 -6
- package/build/utils/history.js.map +1 -1
- package/build/utils/matchBrackets.d.ts +3 -3
- package/build/utils/matchBrackets.js +2 -17
- package/build/utils/matchBrackets.js.map +1 -1
- package/build/utils/modules.js +0 -10
- package/build/utils/modules.js.map +1 -1
- package/build/utils/obj.js +0 -4
- package/build/utils/obj.js.map +1 -1
- package/build/utils/plugin-resolver.js +25 -69
- package/build/utils/plugin-resolver.js.map +1 -1
- package/build/utils/sortObject.js +4 -10
- package/build/utils/sortObject.js.map +1 -1
- package/build/utils/versions.js +0 -10
- package/build/utils/versions.js.map +1 -1
- package/build/utils/warnings.js +1 -9
- package/build/utils/warnings.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceFamily.js","names":["withDeviceFamily","config","withXcodeProject","modResults","setDeviceFamily","project","getSupportsTablet","ios","supportsTablet","getIsTabletOnly","isTabletOnly","getDeviceFamilies","addWarningIOS","formatDeviceFamilies","deviceFamilies","join","configurations","pbxXCBuildConfigurationSection","buildSettings","Object","values","PRODUCT_NAME","TARGETED_DEVICE_FAMILY"],"sources":["../../src/ios/DeviceFamily.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport { XcodeProject } from 'xcode';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withXcodeProject } from '../plugins/ios-plugins';\nimport { addWarningIOS } from '../utils/warnings';\n\nexport const withDeviceFamily: ConfigPlugin = (config) => {\n return withXcodeProject(config, async (config) => {\n config.modResults = await setDeviceFamily(config, {\n project: config.modResults,\n });\n return config;\n });\n};\n\nexport function getSupportsTablet(config: Pick<ExpoConfig, 'ios'>): boolean {\n return !!config.ios?.supportsTablet;\n}\n\nexport function getIsTabletOnly(config: Pick<ExpoConfig, 'ios'>): boolean {\n return !!config?.ios?.isTabletOnly;\n}\n\nexport function getDeviceFamilies(config: Pick<ExpoConfig, 'ios'>): number[] {\n const supportsTablet = getSupportsTablet(config);\n const isTabletOnly = getIsTabletOnly(config);\n\n if (isTabletOnly && config.ios?.supportsTablet === false) {\n addWarningIOS(\n 'ios.supportsTablet',\n `Found contradictory values: \\`{ ios: { isTabletOnly: true, supportsTablet: false } }\\`. Using \\`{ isTabletOnly: true }\\`.`\n );\n }\n\n // 1 is iPhone, 2 is iPad\n if (isTabletOnly) {\n return [2];\n } else if (supportsTablet) {\n return [1, 2];\n } else {\n // is iPhone only\n return [1];\n }\n}\n\n/**\n * Wrapping the families in double quotes is the only way to set a value with a comma in it.\n *\n * @param deviceFamilies\n */\nexport function formatDeviceFamilies(deviceFamilies: number[]): string {\n return `\"${deviceFamilies.join(',')}\"`;\n}\n\n/**\n * Add to pbxproj under TARGETED_DEVICE_FAMILY\n */\nexport function setDeviceFamily(\n config: Pick<ExpoConfig, 'ios'>,\n { project }: { project: XcodeProject }\n): XcodeProject {\n const deviceFamilies = formatDeviceFamilies(getDeviceFamilies(config));\n\n const configurations = project.pbxXCBuildConfigurationSection();\n // @ts-ignore\n for (const { buildSettings } of Object.values(configurations || {})) {\n // Guessing that this is the best way to emulate Xcode.\n // Using `project.addToBuildSettings` modifies too many targets.\n if (typeof buildSettings?.PRODUCT_NAME !== 'undefined') {\n buildSettings.TARGETED_DEVICE_FAMILY = deviceFamilies;\n }\n }\n\n return project;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeviceFamily.js","names":["withDeviceFamily","config","withXcodeProject","modResults","setDeviceFamily","project","getSupportsTablet","ios","supportsTablet","getIsTabletOnly","isTabletOnly","getDeviceFamilies","addWarningIOS","formatDeviceFamilies","deviceFamilies","join","configurations","pbxXCBuildConfigurationSection","buildSettings","Object","values","PRODUCT_NAME","TARGETED_DEVICE_FAMILY"],"sources":["../../src/ios/DeviceFamily.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport { XcodeProject } from 'xcode';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withXcodeProject } from '../plugins/ios-plugins';\nimport { addWarningIOS } from '../utils/warnings';\n\nexport const withDeviceFamily: ConfigPlugin = (config) => {\n return withXcodeProject(config, async (config) => {\n config.modResults = await setDeviceFamily(config, {\n project: config.modResults,\n });\n return config;\n });\n};\n\nexport function getSupportsTablet(config: Pick<ExpoConfig, 'ios'>): boolean {\n return !!config.ios?.supportsTablet;\n}\n\nexport function getIsTabletOnly(config: Pick<ExpoConfig, 'ios'>): boolean {\n return !!config?.ios?.isTabletOnly;\n}\n\nexport function getDeviceFamilies(config: Pick<ExpoConfig, 'ios'>): number[] {\n const supportsTablet = getSupportsTablet(config);\n const isTabletOnly = getIsTabletOnly(config);\n\n if (isTabletOnly && config.ios?.supportsTablet === false) {\n addWarningIOS(\n 'ios.supportsTablet',\n `Found contradictory values: \\`{ ios: { isTabletOnly: true, supportsTablet: false } }\\`. Using \\`{ isTabletOnly: true }\\`.`\n );\n }\n\n // 1 is iPhone, 2 is iPad\n if (isTabletOnly) {\n return [2];\n } else if (supportsTablet) {\n return [1, 2];\n } else {\n // is iPhone only\n return [1];\n }\n}\n\n/**\n * Wrapping the families in double quotes is the only way to set a value with a comma in it.\n *\n * @param deviceFamilies\n */\nexport function formatDeviceFamilies(deviceFamilies: number[]): string {\n return `\"${deviceFamilies.join(',')}\"`;\n}\n\n/**\n * Add to pbxproj under TARGETED_DEVICE_FAMILY\n */\nexport function setDeviceFamily(\n config: Pick<ExpoConfig, 'ios'>,\n { project }: { project: XcodeProject }\n): XcodeProject {\n const deviceFamilies = formatDeviceFamilies(getDeviceFamilies(config));\n\n const configurations = project.pbxXCBuildConfigurationSection();\n // @ts-ignore\n for (const { buildSettings } of Object.values(configurations || {})) {\n // Guessing that this is the best way to emulate Xcode.\n // Using `project.addToBuildSettings` modifies too many targets.\n if (typeof buildSettings?.PRODUCT_NAME !== 'undefined') {\n buildSettings.TARGETED_DEVICE_FAMILY = deviceFamilies;\n }\n }\n\n return project;\n}\n"],"mappings":";;;;;;;;;;;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,gBAA8B,GAAIC,MAAM,IAAK;EACxD,OAAO,IAAAC,8BAAgB,EAACD,MAAM,EAAE,MAAOA,MAAM,IAAK;IAChDA,MAAM,CAACE,UAAU,GAAG,MAAMC,eAAe,CAACH,MAAM,EAAE;MAChDI,OAAO,EAAEJ,MAAM,CAACE;IAClB,CAAC,CAAC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cAAc,IAAI,CAAC,CAAC,CAAC,EAAE;IACnE;IACA;IACA,IAAI,QAAOE,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAEG,YAAY,MAAK,WAAW,EAAE;MACtDH,aAAa,CAACI,sBAAsB,GAAGR,cAAc;IACvD;EACF;EAEA,OAAOT,OAAO;AAChB"}
|
|
@@ -7,97 +7,71 @@ exports.ensureApplicationTargetEntitlementsFileConfigured = ensureApplicationTar
|
|
|
7
7
|
exports.getEntitlementsPath = getEntitlementsPath;
|
|
8
8
|
exports.setAssociatedDomains = setAssociatedDomains;
|
|
9
9
|
exports.withAssociatedDomains = void 0;
|
|
10
|
-
|
|
11
10
|
function _fs() {
|
|
12
11
|
const data = _interopRequireDefault(require("fs"));
|
|
13
|
-
|
|
14
12
|
_fs = function () {
|
|
15
13
|
return data;
|
|
16
14
|
};
|
|
17
|
-
|
|
18
15
|
return data;
|
|
19
16
|
}
|
|
20
|
-
|
|
21
17
|
function _path() {
|
|
22
18
|
const data = _interopRequireDefault(require("path"));
|
|
23
|
-
|
|
24
19
|
_path = function () {
|
|
25
20
|
return data;
|
|
26
21
|
};
|
|
27
|
-
|
|
28
22
|
return data;
|
|
29
23
|
}
|
|
30
|
-
|
|
31
24
|
function _slash() {
|
|
32
25
|
const data = _interopRequireDefault(require("slash"));
|
|
33
|
-
|
|
34
26
|
_slash = function () {
|
|
35
27
|
return data;
|
|
36
28
|
};
|
|
37
|
-
|
|
38
29
|
return data;
|
|
39
30
|
}
|
|
40
|
-
|
|
41
31
|
function _iosPlugins() {
|
|
42
32
|
const data = require("../plugins/ios-plugins");
|
|
43
|
-
|
|
44
33
|
_iosPlugins = function () {
|
|
45
34
|
return data;
|
|
46
35
|
};
|
|
47
|
-
|
|
48
36
|
return data;
|
|
49
37
|
}
|
|
50
|
-
|
|
51
38
|
function _Target() {
|
|
52
39
|
const data = require("./Target");
|
|
53
|
-
|
|
54
40
|
_Target = function () {
|
|
55
41
|
return data;
|
|
56
42
|
};
|
|
57
|
-
|
|
58
43
|
return data;
|
|
59
44
|
}
|
|
60
|
-
|
|
61
45
|
function _Xcodeproj() {
|
|
62
46
|
const data = require("./utils/Xcodeproj");
|
|
63
|
-
|
|
64
47
|
_Xcodeproj = function () {
|
|
65
48
|
return data;
|
|
66
49
|
};
|
|
67
|
-
|
|
68
50
|
return data;
|
|
69
51
|
}
|
|
70
|
-
|
|
71
52
|
function _string() {
|
|
72
53
|
const data = require("./utils/string");
|
|
73
|
-
|
|
74
54
|
_string = function () {
|
|
75
55
|
return data;
|
|
76
56
|
};
|
|
77
|
-
|
|
78
57
|
return data;
|
|
79
58
|
}
|
|
80
|
-
|
|
81
59
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
82
|
-
|
|
83
60
|
const withAssociatedDomains = (0, _iosPlugins().createEntitlementsPlugin)(setAssociatedDomains, 'withAssociatedDomains');
|
|
84
61
|
exports.withAssociatedDomains = withAssociatedDomains;
|
|
85
|
-
|
|
86
62
|
function setAssociatedDomains(config, {
|
|
87
63
|
'com.apple.developer.associated-domains': _,
|
|
88
64
|
...entitlementsPlist
|
|
89
65
|
}) {
|
|
90
66
|
var _config$ios;
|
|
91
|
-
|
|
92
67
|
if ((_config$ios = config.ios) !== null && _config$ios !== void 0 && _config$ios.associatedDomains) {
|
|
93
|
-
return {
|
|
68
|
+
return {
|
|
69
|
+
...entitlementsPlist,
|
|
94
70
|
'com.apple.developer.associated-domains': config.ios.associatedDomains
|
|
95
71
|
};
|
|
96
72
|
}
|
|
97
|
-
|
|
98
73
|
return entitlementsPlist;
|
|
99
74
|
}
|
|
100
|
-
|
|
101
75
|
function getEntitlementsPath(projectRoot, {
|
|
102
76
|
targetName,
|
|
103
77
|
buildConfiguration = 'Release'
|
|
@@ -107,27 +81,21 @@ function getEntitlementsPath(projectRoot, {
|
|
|
107
81
|
targetName,
|
|
108
82
|
buildConfiguration
|
|
109
83
|
});
|
|
110
|
-
|
|
111
84
|
if (!xcBuildConfiguration) {
|
|
112
85
|
return null;
|
|
113
86
|
}
|
|
114
|
-
|
|
115
87
|
const entitlementsPath = getEntitlementsPathFromBuildConfiguration(projectRoot, xcBuildConfiguration);
|
|
116
88
|
return entitlementsPath && _fs().default.existsSync(entitlementsPath) ? entitlementsPath : null;
|
|
117
89
|
}
|
|
118
|
-
|
|
119
90
|
function getEntitlementsPathFromBuildConfiguration(projectRoot, xcBuildConfiguration) {
|
|
120
91
|
var _xcBuildConfiguration;
|
|
121
|
-
|
|
122
92
|
const entitlementsPathRaw = xcBuildConfiguration === null || xcBuildConfiguration === void 0 ? void 0 : (_xcBuildConfiguration = xcBuildConfiguration.buildSettings) === null || _xcBuildConfiguration === void 0 ? void 0 : _xcBuildConfiguration.CODE_SIGN_ENTITLEMENTS;
|
|
123
|
-
|
|
124
93
|
if (entitlementsPathRaw) {
|
|
125
94
|
return _path().default.normalize(_path().default.join(projectRoot, 'ios', (0, _string().trimQuotes)(entitlementsPathRaw)));
|
|
126
95
|
} else {
|
|
127
96
|
return null;
|
|
128
97
|
}
|
|
129
98
|
}
|
|
130
|
-
|
|
131
99
|
function ensureApplicationTargetEntitlementsFileConfigured(projectRoot) {
|
|
132
100
|
const project = (0, _Xcodeproj().getPbxproj)(projectRoot);
|
|
133
101
|
const projectName = (0, _Xcodeproj().getProjectName)(projectRoot);
|
|
@@ -135,36 +103,27 @@ function ensureApplicationTargetEntitlementsFileConfigured(projectRoot) {
|
|
|
135
103
|
const [, applicationTarget] = (0, _Target().findFirstNativeTarget)(project);
|
|
136
104
|
const buildConfigurations = (0, _Xcodeproj().getBuildConfigurationsForListId)(project, applicationTarget.buildConfigurationList);
|
|
137
105
|
let hasChangesToWrite = false;
|
|
138
|
-
|
|
139
106
|
for (const [, xcBuildConfiguration] of buildConfigurations) {
|
|
140
107
|
const oldEntitlementPath = getEntitlementsPathFromBuildConfiguration(projectRoot, xcBuildConfiguration);
|
|
141
|
-
|
|
142
108
|
if (oldEntitlementPath && _fs().default.existsSync(oldEntitlementPath)) {
|
|
143
109
|
return;
|
|
144
110
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
111
|
+
hasChangesToWrite = true;
|
|
112
|
+
// Use posix formatted path, even on Windows
|
|
148
113
|
const entitlementsRelativePath = (0, _slash().default)(_path().default.join(projectName, `${productName}.entitlements`));
|
|
149
|
-
|
|
150
114
|
const entitlementsPath = _path().default.normalize(_path().default.join(projectRoot, 'ios', entitlementsRelativePath));
|
|
151
|
-
|
|
152
115
|
_fs().default.mkdirSync(_path().default.dirname(entitlementsPath), {
|
|
153
116
|
recursive: true
|
|
154
117
|
});
|
|
155
|
-
|
|
156
118
|
if (!_fs().default.existsSync(entitlementsPath)) {
|
|
157
119
|
_fs().default.writeFileSync(entitlementsPath, ENTITLEMENTS_TEMPLATE);
|
|
158
120
|
}
|
|
159
|
-
|
|
160
121
|
xcBuildConfiguration.buildSettings.CODE_SIGN_ENTITLEMENTS = entitlementsRelativePath;
|
|
161
122
|
}
|
|
162
|
-
|
|
163
123
|
if (hasChangesToWrite) {
|
|
164
124
|
_fs().default.writeFileSync(project.filepath, project.writeSync());
|
|
165
125
|
}
|
|
166
126
|
}
|
|
167
|
-
|
|
168
127
|
const ENTITLEMENTS_TEMPLATE = `
|
|
169
128
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
170
129
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Entitlements.js","names":["withAssociatedDomains","createEntitlementsPlugin","setAssociatedDomains","config","_","entitlementsPlist","ios","associatedDomains","getEntitlementsPath","projectRoot","targetName","buildConfiguration","project","getPbxproj","xcBuildConfiguration","getXCBuildConfigurationFromPbxproj","entitlementsPath","getEntitlementsPathFromBuildConfiguration","fs","existsSync","entitlementsPathRaw","buildSettings","CODE_SIGN_ENTITLEMENTS","path","normalize","join","trimQuotes","ensureApplicationTargetEntitlementsFileConfigured","projectName","getProjectName","productName","getProductName","applicationTarget","findFirstNativeTarget","buildConfigurations","getBuildConfigurationsForListId","buildConfigurationList","hasChangesToWrite","oldEntitlementPath","entitlementsRelativePath","slash","mkdirSync","dirname","recursive","writeFileSync","ENTITLEMENTS_TEMPLATE","filepath","writeSync"],"sources":["../../src/ios/Entitlements.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport { JSONObject } from '@expo/json-file';\nimport fs from 'fs';\nimport path from 'path';\nimport slash from 'slash';\nimport { XCBuildConfiguration } from 'xcode';\n\nimport { createEntitlementsPlugin } from '../plugins/ios-plugins';\nimport { findFirstNativeTarget, getXCBuildConfigurationFromPbxproj } from './Target';\nimport {\n getBuildConfigurationsForListId,\n getPbxproj,\n getProductName,\n getProjectName,\n} from './utils/Xcodeproj';\nimport { trimQuotes } from './utils/string';\n\nexport const withAssociatedDomains = createEntitlementsPlugin(\n setAssociatedDomains,\n 'withAssociatedDomains'\n);\n\nexport function setAssociatedDomains(\n config: ExpoConfig,\n { 'com.apple.developer.associated-domains': _, ...entitlementsPlist }: JSONObject\n): JSONObject {\n if (config.ios?.associatedDomains) {\n return {\n ...entitlementsPlist,\n 'com.apple.developer.associated-domains': config.ios.associatedDomains,\n };\n }\n\n return entitlementsPlist;\n}\n\nexport function getEntitlementsPath(\n projectRoot: string,\n {\n targetName,\n buildConfiguration = 'Release',\n }: { targetName?: string; buildConfiguration?: string } = {}\n): string | null {\n const project = getPbxproj(projectRoot);\n const xcBuildConfiguration = getXCBuildConfigurationFromPbxproj(project, {\n targetName,\n buildConfiguration,\n });\n if (!xcBuildConfiguration) {\n return null;\n }\n const entitlementsPath = getEntitlementsPathFromBuildConfiguration(\n projectRoot,\n xcBuildConfiguration\n );\n return entitlementsPath && fs.existsSync(entitlementsPath) ? entitlementsPath : null;\n}\n\nfunction getEntitlementsPathFromBuildConfiguration(\n projectRoot: string,\n xcBuildConfiguration: XCBuildConfiguration\n): string | null {\n const entitlementsPathRaw = xcBuildConfiguration?.buildSettings?.CODE_SIGN_ENTITLEMENTS as\n | string\n | undefined;\n if (entitlementsPathRaw) {\n return path.normalize(path.join(projectRoot, 'ios', trimQuotes(entitlementsPathRaw)));\n } else {\n return null;\n }\n}\n\nexport function ensureApplicationTargetEntitlementsFileConfigured(projectRoot: string): void {\n const project = getPbxproj(projectRoot);\n const projectName = getProjectName(projectRoot);\n const productName = getProductName(project);\n\n const [, applicationTarget] = findFirstNativeTarget(project);\n const buildConfigurations = getBuildConfigurationsForListId(\n project,\n applicationTarget.buildConfigurationList\n );\n let hasChangesToWrite = false;\n for (const [, xcBuildConfiguration] of buildConfigurations) {\n const oldEntitlementPath = getEntitlementsPathFromBuildConfiguration(\n projectRoot,\n xcBuildConfiguration\n );\n if (oldEntitlementPath && fs.existsSync(oldEntitlementPath)) {\n return;\n }\n hasChangesToWrite = true;\n // Use posix formatted path, even on Windows\n const entitlementsRelativePath = slash(path.join(projectName, `${productName}.entitlements`));\n const entitlementsPath = path.normalize(\n path.join(projectRoot, 'ios', entitlementsRelativePath)\n );\n fs.mkdirSync(path.dirname(entitlementsPath), { recursive: true });\n if (!fs.existsSync(entitlementsPath)) {\n fs.writeFileSync(entitlementsPath, ENTITLEMENTS_TEMPLATE);\n }\n xcBuildConfiguration.buildSettings.CODE_SIGN_ENTITLEMENTS = entitlementsRelativePath;\n }\n if (hasChangesToWrite) {\n fs.writeFileSync(project.filepath, project.writeSync());\n }\n}\n\nconst ENTITLEMENTS_TEMPLATE = `\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n</dict>\n</plist>\n`;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Entitlements.js","names":["withAssociatedDomains","createEntitlementsPlugin","setAssociatedDomains","config","_","entitlementsPlist","ios","associatedDomains","getEntitlementsPath","projectRoot","targetName","buildConfiguration","project","getPbxproj","xcBuildConfiguration","getXCBuildConfigurationFromPbxproj","entitlementsPath","getEntitlementsPathFromBuildConfiguration","fs","existsSync","entitlementsPathRaw","buildSettings","CODE_SIGN_ENTITLEMENTS","path","normalize","join","trimQuotes","ensureApplicationTargetEntitlementsFileConfigured","projectName","getProjectName","productName","getProductName","applicationTarget","findFirstNativeTarget","buildConfigurations","getBuildConfigurationsForListId","buildConfigurationList","hasChangesToWrite","oldEntitlementPath","entitlementsRelativePath","slash","mkdirSync","dirname","recursive","writeFileSync","ENTITLEMENTS_TEMPLATE","filepath","writeSync"],"sources":["../../src/ios/Entitlements.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport { JSONObject } from '@expo/json-file';\nimport fs from 'fs';\nimport path from 'path';\nimport slash from 'slash';\nimport { XCBuildConfiguration } from 'xcode';\n\nimport { createEntitlementsPlugin } from '../plugins/ios-plugins';\nimport { findFirstNativeTarget, getXCBuildConfigurationFromPbxproj } from './Target';\nimport {\n getBuildConfigurationsForListId,\n getPbxproj,\n getProductName,\n getProjectName,\n} from './utils/Xcodeproj';\nimport { trimQuotes } from './utils/string';\n\nexport const withAssociatedDomains = createEntitlementsPlugin(\n setAssociatedDomains,\n 'withAssociatedDomains'\n);\n\nexport function setAssociatedDomains(\n config: ExpoConfig,\n { 'com.apple.developer.associated-domains': _, ...entitlementsPlist }: JSONObject\n): JSONObject {\n if (config.ios?.associatedDomains) {\n return {\n ...entitlementsPlist,\n 'com.apple.developer.associated-domains': config.ios.associatedDomains,\n };\n }\n\n return entitlementsPlist;\n}\n\nexport function getEntitlementsPath(\n projectRoot: string,\n {\n targetName,\n buildConfiguration = 'Release',\n }: { targetName?: string; buildConfiguration?: string } = {}\n): string | null {\n const project = getPbxproj(projectRoot);\n const xcBuildConfiguration = getXCBuildConfigurationFromPbxproj(project, {\n targetName,\n buildConfiguration,\n });\n if (!xcBuildConfiguration) {\n return null;\n }\n const entitlementsPath = getEntitlementsPathFromBuildConfiguration(\n projectRoot,\n xcBuildConfiguration\n );\n return entitlementsPath && fs.existsSync(entitlementsPath) ? entitlementsPath : null;\n}\n\nfunction getEntitlementsPathFromBuildConfiguration(\n projectRoot: string,\n xcBuildConfiguration: XCBuildConfiguration\n): string | null {\n const entitlementsPathRaw = xcBuildConfiguration?.buildSettings?.CODE_SIGN_ENTITLEMENTS as\n | string\n | undefined;\n if (entitlementsPathRaw) {\n return path.normalize(path.join(projectRoot, 'ios', trimQuotes(entitlementsPathRaw)));\n } else {\n return null;\n }\n}\n\nexport function ensureApplicationTargetEntitlementsFileConfigured(projectRoot: string): void {\n const project = getPbxproj(projectRoot);\n const projectName = getProjectName(projectRoot);\n const productName = getProductName(project);\n\n const [, applicationTarget] = findFirstNativeTarget(project);\n const buildConfigurations = getBuildConfigurationsForListId(\n project,\n applicationTarget.buildConfigurationList\n );\n let hasChangesToWrite = false;\n for (const [, xcBuildConfiguration] of buildConfigurations) {\n const oldEntitlementPath = getEntitlementsPathFromBuildConfiguration(\n projectRoot,\n xcBuildConfiguration\n );\n if (oldEntitlementPath && fs.existsSync(oldEntitlementPath)) {\n return;\n }\n hasChangesToWrite = true;\n // Use posix formatted path, even on Windows\n const entitlementsRelativePath = slash(path.join(projectName, `${productName}.entitlements`));\n const entitlementsPath = path.normalize(\n path.join(projectRoot, 'ios', entitlementsRelativePath)\n );\n fs.mkdirSync(path.dirname(entitlementsPath), { recursive: true });\n if (!fs.existsSync(entitlementsPath)) {\n fs.writeFileSync(entitlementsPath, ENTITLEMENTS_TEMPLATE);\n }\n xcBuildConfiguration.buildSettings.CODE_SIGN_ENTITLEMENTS = entitlementsRelativePath;\n }\n if (hasChangesToWrite) {\n fs.writeFileSync(project.filepath, project.writeSync());\n }\n}\n\nconst ENTITLEMENTS_TEMPLATE = `\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.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,CACrCD,eAAI,CAACE,IAAI,CAAChB,WAAW,EAAE,KAAK,EAAE8B,wBAAwB,CAAC,CACxD;IACDrB,aAAE,CAACuB,SAAS,CAAClB,eAAI,CAACmB,OAAO,CAAC1B,gBAAgB,CAAC,EAAE;MAAE2B,SAAS,EAAE;IAAK,CAAC,CAAC;IACjE,IAAI,CAACzB,aAAE,CAACC,UAAU,CAACH,gBAAgB,CAAC,EAAE;MACpCE,aAAE,CAAC0B,aAAa,CAAC5B,gBAAgB,EAAE6B,qBAAqB,CAAC;IAC3D;IACA/B,oBAAoB,CAACO,aAAa,CAACC,sBAAsB,GAAGiB,wBAAwB;EACtF;EACA,IAAIF,iBAAiB,EAAE;IACrBnB,aAAE,CAAC0B,aAAa,CAAChC,OAAO,CAACkC,QAAQ,EAAElC,OAAO,CAACmC,SAAS,EAAE,CAAC;EACzD;AACF;AAEA,MAAMF,qBAAqB,GAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC"}
|
package/build/ios/Google.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { ConfigPlugin, ModProps } from '../Plugin.types';
|
|
|
4
4
|
import { InfoPlist } from './IosConfig.types';
|
|
5
5
|
export declare const withGoogle: ConfigPlugin;
|
|
6
6
|
export declare const withGoogleServicesFile: ConfigPlugin;
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function getGoogleSignInReversedClientId(config: Pick<ExpoConfig, 'ios'>, modRequest: Pick<ModProps<InfoPlist>, 'projectRoot'>): string | null;
|
|
8
8
|
export declare function getGoogleServicesFile(config: Pick<ExpoConfig, 'ios'>): string | null;
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function setGoogleSignInReversedClientId(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist, modRequest: Pick<ModProps<InfoPlist>, 'projectRoot'>): InfoPlist;
|
|
10
10
|
export declare function setGoogleConfig(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist, modRequest: ModProps<InfoPlist>): InfoPlist;
|
|
11
11
|
export declare function setGoogleServicesFile(config: Pick<ExpoConfig, 'ios'>, { projectRoot, project }: {
|
|
12
12
|
project: XcodeProject;
|
package/build/ios/Google.js
CHANGED
|
@@ -4,103 +4,75 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getGoogleServicesFile = getGoogleServicesFile;
|
|
7
|
-
exports.
|
|
7
|
+
exports.getGoogleSignInReversedClientId = getGoogleSignInReversedClientId;
|
|
8
8
|
exports.setGoogleConfig = setGoogleConfig;
|
|
9
9
|
exports.setGoogleServicesFile = setGoogleServicesFile;
|
|
10
|
-
exports.
|
|
10
|
+
exports.setGoogleSignInReversedClientId = setGoogleSignInReversedClientId;
|
|
11
11
|
exports.withGoogleServicesFile = exports.withGoogle = void 0;
|
|
12
|
-
|
|
13
12
|
function _plist() {
|
|
14
13
|
const data = _interopRequireDefault(require("@expo/plist"));
|
|
15
|
-
|
|
16
14
|
_plist = function () {
|
|
17
15
|
return data;
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
return data;
|
|
21
18
|
}
|
|
22
|
-
|
|
23
19
|
function _assert() {
|
|
24
20
|
const data = _interopRequireDefault(require("assert"));
|
|
25
|
-
|
|
26
21
|
_assert = function () {
|
|
27
22
|
return data;
|
|
28
23
|
};
|
|
29
|
-
|
|
30
24
|
return data;
|
|
31
25
|
}
|
|
32
|
-
|
|
33
26
|
function _fs() {
|
|
34
27
|
const data = _interopRequireDefault(require("fs"));
|
|
35
|
-
|
|
36
28
|
_fs = function () {
|
|
37
29
|
return data;
|
|
38
30
|
};
|
|
39
|
-
|
|
40
31
|
return data;
|
|
41
32
|
}
|
|
42
|
-
|
|
43
33
|
function _path() {
|
|
44
34
|
const data = _interopRequireDefault(require("path"));
|
|
45
|
-
|
|
46
35
|
_path = function () {
|
|
47
36
|
return data;
|
|
48
37
|
};
|
|
49
|
-
|
|
50
38
|
return data;
|
|
51
39
|
}
|
|
52
|
-
|
|
53
40
|
function _iosPlugins() {
|
|
54
41
|
const data = require("../plugins/ios-plugins");
|
|
55
|
-
|
|
56
42
|
_iosPlugins = function () {
|
|
57
43
|
return data;
|
|
58
44
|
};
|
|
59
|
-
|
|
60
45
|
return data;
|
|
61
46
|
}
|
|
62
|
-
|
|
63
47
|
function _Paths() {
|
|
64
48
|
const data = require("./Paths");
|
|
65
|
-
|
|
66
49
|
_Paths = function () {
|
|
67
50
|
return data;
|
|
68
51
|
};
|
|
69
|
-
|
|
70
52
|
return data;
|
|
71
53
|
}
|
|
72
|
-
|
|
73
54
|
function _Scheme() {
|
|
74
55
|
const data = require("./Scheme");
|
|
75
|
-
|
|
76
56
|
_Scheme = function () {
|
|
77
57
|
return data;
|
|
78
58
|
};
|
|
79
|
-
|
|
80
59
|
return data;
|
|
81
60
|
}
|
|
82
|
-
|
|
83
61
|
function _Xcodeproj() {
|
|
84
62
|
const data = require("./utils/Xcodeproj");
|
|
85
|
-
|
|
86
63
|
_Xcodeproj = function () {
|
|
87
64
|
return data;
|
|
88
65
|
};
|
|
89
|
-
|
|
90
66
|
return data;
|
|
91
67
|
}
|
|
92
|
-
|
|
93
68
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
94
|
-
|
|
95
69
|
const withGoogle = config => {
|
|
96
70
|
return (0, _iosPlugins().withInfoPlist)(config, config => {
|
|
97
71
|
config.modResults = setGoogleConfig(config, config.modResults, config.modRequest);
|
|
98
72
|
return config;
|
|
99
73
|
});
|
|
100
74
|
};
|
|
101
|
-
|
|
102
75
|
exports.withGoogle = withGoogle;
|
|
103
|
-
|
|
104
76
|
const withGoogleServicesFile = config => {
|
|
105
77
|
return (0, _iosPlugins().withXcodeProject)(config, config => {
|
|
106
78
|
config.modResults = setGoogleServicesFile(config, {
|
|
@@ -110,77 +82,51 @@ const withGoogleServicesFile = config => {
|
|
|
110
82
|
return config;
|
|
111
83
|
});
|
|
112
84
|
};
|
|
113
|
-
|
|
114
85
|
exports.withGoogleServicesFile = withGoogleServicesFile;
|
|
115
|
-
|
|
116
86
|
function readGoogleServicesInfoPlist(relativePath, {
|
|
117
87
|
projectRoot
|
|
118
88
|
}) {
|
|
119
89
|
const googleServiceFilePath = _path().default.resolve(projectRoot, relativePath);
|
|
120
|
-
|
|
121
90
|
const contents = _fs().default.readFileSync(googleServiceFilePath, 'utf8');
|
|
122
|
-
|
|
123
91
|
(0, _assert().default)(contents, 'GoogleService-Info.plist is empty');
|
|
124
92
|
return _plist().default.parse(contents);
|
|
125
93
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
var _config$ios$config$go, _config$ios, _config$ios$config, _config$ios$config$go2, _infoPlist$REVERSED_C;
|
|
129
|
-
|
|
130
|
-
const reservedClientId = (_config$ios$config$go = (_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : (_config$ios$config = _config$ios.config) === null || _config$ios$config === void 0 ? void 0 : (_config$ios$config$go2 = _config$ios$config.googleSignIn) === null || _config$ios$config$go2 === void 0 ? void 0 : _config$ios$config$go2.reservedClientId) !== null && _config$ios$config$go !== void 0 ? _config$ios$config$go : null;
|
|
131
|
-
|
|
132
|
-
if (reservedClientId) {
|
|
133
|
-
return reservedClientId;
|
|
134
|
-
}
|
|
135
|
-
|
|
94
|
+
function getGoogleSignInReversedClientId(config, modRequest) {
|
|
95
|
+
var _infoPlist$REVERSED_C;
|
|
136
96
|
const googleServicesFileRelativePath = getGoogleServicesFile(config);
|
|
137
|
-
|
|
138
97
|
if (googleServicesFileRelativePath === null) {
|
|
139
98
|
return null;
|
|
140
99
|
}
|
|
141
|
-
|
|
142
100
|
const infoPlist = readGoogleServicesInfoPlist(googleServicesFileRelativePath, modRequest);
|
|
143
101
|
return (_infoPlist$REVERSED_C = infoPlist.REVERSED_CLIENT_ID) !== null && _infoPlist$REVERSED_C !== void 0 ? _infoPlist$REVERSED_C : null;
|
|
144
102
|
}
|
|
145
|
-
|
|
146
103
|
function getGoogleServicesFile(config) {
|
|
147
|
-
var _config$ios$googleSer, _config$
|
|
148
|
-
|
|
149
|
-
return (_config$ios$googleSer = (_config$ios2 = config.ios) === null || _config$ios2 === void 0 ? void 0 : _config$ios2.googleServicesFile) !== null && _config$ios$googleSer !== void 0 ? _config$ios$googleSer : null;
|
|
104
|
+
var _config$ios$googleSer, _config$ios;
|
|
105
|
+
return (_config$ios$googleSer = (_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : _config$ios.googleServicesFile) !== null && _config$ios$googleSer !== void 0 ? _config$ios$googleSer : null;
|
|
150
106
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
if (reservedClientId === null) {
|
|
107
|
+
function setGoogleSignInReversedClientId(config, infoPlist, modRequest) {
|
|
108
|
+
const reversedClientId = getGoogleSignInReversedClientId(config, modRequest);
|
|
109
|
+
if (reversedClientId === null) {
|
|
156
110
|
return infoPlist;
|
|
157
111
|
}
|
|
158
|
-
|
|
159
|
-
return (0, _Scheme().appendScheme)(reservedClientId, infoPlist);
|
|
112
|
+
return (0, _Scheme().appendScheme)(reversedClientId, infoPlist);
|
|
160
113
|
}
|
|
161
|
-
|
|
162
114
|
function setGoogleConfig(config, infoPlist, modRequest) {
|
|
163
|
-
infoPlist =
|
|
115
|
+
infoPlist = setGoogleSignInReversedClientId(config, infoPlist, modRequest);
|
|
164
116
|
return infoPlist;
|
|
165
117
|
}
|
|
166
|
-
|
|
167
118
|
function setGoogleServicesFile(config, {
|
|
168
119
|
projectRoot,
|
|
169
120
|
project
|
|
170
121
|
}) {
|
|
171
122
|
const googleServicesFileRelativePath = getGoogleServicesFile(config);
|
|
172
|
-
|
|
173
123
|
if (googleServicesFileRelativePath === null) {
|
|
174
124
|
return project;
|
|
175
125
|
}
|
|
176
|
-
|
|
177
126
|
const googleServiceFilePath = _path().default.resolve(projectRoot, googleServicesFileRelativePath);
|
|
178
|
-
|
|
179
127
|
_fs().default.copyFileSync(googleServiceFilePath, _path().default.join((0, _Paths().getSourceRoot)(projectRoot), 'GoogleService-Info.plist'));
|
|
180
|
-
|
|
181
128
|
const projectName = (0, _Xcodeproj().getProjectName)(projectRoot);
|
|
182
129
|
const plistFilePath = `${projectName}/GoogleService-Info.plist`;
|
|
183
|
-
|
|
184
130
|
if (!project.hasFile(plistFilePath)) {
|
|
185
131
|
project = (0, _Xcodeproj().addResourceFileToGroup)({
|
|
186
132
|
filepath: plistFilePath,
|
|
@@ -190,7 +136,6 @@ function setGoogleServicesFile(config, {
|
|
|
190
136
|
verbose: true
|
|
191
137
|
});
|
|
192
138
|
}
|
|
193
|
-
|
|
194
139
|
return project;
|
|
195
140
|
}
|
|
196
141
|
//# sourceMappingURL=Google.js.map
|
package/build/ios/Google.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Google.js","names":["withGoogle","config","withInfoPlist","modResults","setGoogleConfig","modRequest","withGoogleServicesFile","withXcodeProject","setGoogleServicesFile","projectRoot","project","readGoogleServicesInfoPlist","relativePath","googleServiceFilePath","path","resolve","contents","fs","readFileSync","assert","plist","parse","
|
|
1
|
+
{"version":3,"file":"Google.js","names":["withGoogle","config","withInfoPlist","modResults","setGoogleConfig","modRequest","withGoogleServicesFile","withXcodeProject","setGoogleServicesFile","projectRoot","project","readGoogleServicesInfoPlist","relativePath","googleServiceFilePath","path","resolve","contents","fs","readFileSync","assert","plist","parse","getGoogleSignInReversedClientId","googleServicesFileRelativePath","getGoogleServicesFile","infoPlist","REVERSED_CLIENT_ID","ios","googleServicesFile","setGoogleSignInReversedClientId","reversedClientId","appendScheme","copyFileSync","join","getSourceRoot","projectName","getProjectName","plistFilePath","hasFile","addResourceFileToGroup","filepath","groupName","isBuildFile","verbose"],"sources":["../../src/ios/Google.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport plist from '@expo/plist';\nimport assert from 'assert';\nimport fs from 'fs';\nimport path from 'path';\nimport { XcodeProject } from 'xcode';\n\nimport { ConfigPlugin, ModProps } from '../Plugin.types';\nimport { withInfoPlist, withXcodeProject } from '../plugins/ios-plugins';\nimport { InfoPlist } from './IosConfig.types';\nimport { getSourceRoot } from './Paths';\nimport { appendScheme } from './Scheme';\nimport { addResourceFileToGroup, getProjectName } from './utils/Xcodeproj';\n\nexport const withGoogle: ConfigPlugin = (config) => {\n return withInfoPlist(config, (config) => {\n config.modResults = setGoogleConfig(config, config.modResults, config.modRequest);\n return config;\n });\n};\n\nexport const withGoogleServicesFile: ConfigPlugin = (config) => {\n return withXcodeProject(config, (config) => {\n config.modResults = setGoogleServicesFile(config, {\n projectRoot: config.modRequest.projectRoot,\n project: config.modResults,\n });\n return config;\n });\n};\n\nfunction readGoogleServicesInfoPlist(\n relativePath: string,\n { projectRoot }: { projectRoot: string }\n) {\n const googleServiceFilePath = path.resolve(projectRoot, relativePath);\n const contents = fs.readFileSync(googleServiceFilePath, 'utf8');\n assert(contents, 'GoogleService-Info.plist is empty');\n return plist.parse(contents);\n}\n\nexport function getGoogleSignInReversedClientId(\n config: Pick<ExpoConfig, 'ios'>,\n modRequest: Pick<ModProps<InfoPlist>, 'projectRoot'>\n): string | null {\n const googleServicesFileRelativePath = getGoogleServicesFile(config);\n if (googleServicesFileRelativePath === null) {\n return null;\n }\n\n const infoPlist = readGoogleServicesInfoPlist(googleServicesFileRelativePath, modRequest);\n\n return infoPlist.REVERSED_CLIENT_ID ?? null;\n}\n\nexport function getGoogleServicesFile(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.googleServicesFile ?? null;\n}\n\nexport function setGoogleSignInReversedClientId(\n config: Pick<ExpoConfig, 'ios'>,\n infoPlist: InfoPlist,\n modRequest: Pick<ModProps<InfoPlist>, 'projectRoot'>\n): InfoPlist {\n const reversedClientId = getGoogleSignInReversedClientId(config, modRequest);\n\n if (reversedClientId === null) {\n return infoPlist;\n }\n\n return appendScheme(reversedClientId, infoPlist);\n}\n\nexport function setGoogleConfig(\n config: Pick<ExpoConfig, 'ios'>,\n infoPlist: InfoPlist,\n modRequest: ModProps<InfoPlist>\n): InfoPlist {\n infoPlist = setGoogleSignInReversedClientId(config, infoPlist, modRequest);\n return infoPlist;\n}\n\nexport function setGoogleServicesFile(\n config: Pick<ExpoConfig, 'ios'>,\n { projectRoot, project }: { project: XcodeProject; projectRoot: string }\n): XcodeProject {\n const googleServicesFileRelativePath = getGoogleServicesFile(config);\n if (googleServicesFileRelativePath === null) {\n return project;\n }\n\n const googleServiceFilePath = path.resolve(projectRoot, googleServicesFileRelativePath);\n fs.copyFileSync(\n googleServiceFilePath,\n path.join(getSourceRoot(projectRoot), 'GoogleService-Info.plist')\n );\n\n const projectName = getProjectName(projectRoot);\n const plistFilePath = `${projectName}/GoogleService-Info.plist`;\n if (!project.hasFile(plistFilePath)) {\n project = addResourceFileToGroup({\n filepath: plistFilePath,\n groupName: projectName,\n project,\n isBuildFile: true,\n verbose: true,\n });\n }\n return project;\n}\n"],"mappings":";;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA2E;AAEpE,MAAMA,UAAwB,GAAIC,MAAM,IAAK;EAClD,OAAO,IAAAC,2BAAa,EAACD,MAAM,EAAGA,MAAM,IAAK;IACvCA,MAAM,CAACE,UAAU,GAAGC,eAAe,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,EAAEF,MAAM,CAACI,UAAU,CAAC;IACjF,OAAOJ,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAAC;AAEK,MAAMK,sBAAoC,GAAIL,MAAM,IAAK;EAC9D,OAAO,IAA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,SAAS;EAClB;EAEA,OAAO,IAAAM,sBAAY,EAACD,gBAAgB,EAAEL,SAAS,CAAC;AAClD;AAEO,SAASrB,eAAe,CAC7BH,MAA+B,EAC/BwB,SAAoB,EACpBpB,UAA+B,EACpB;EACXoB,SAAS,GAAGI,+BAA+B,CAAC5B,MAAM,EAAEwB,SAAS,EAAEpB,UAAU,CAAC;EAC1E,OAAOoB,SAAS;AAClB;AAEO,SAASjB,qBAAqB,CACnCP,MAA+B,EAC/B;EAAEQ,WAAW;EAAEC;AAAwD,CAAC,EAC1D;EACd,MAAMa,8BAA8B,GAAGC,qBAAqB,CAACvB,MAAM,CAAC;EACpE,IAAIsB,8BAA8B,KAAK,IAAI,EAAE;IAC3C,OAAOb,OAAO;EAChB;EAEA,MAAMG,qBAAqB,GAAGC,eAAI,CAACC,OAAO,CAACN,WAAW,EAAEc,8BAA8B,CAAC;EACvFN,aAAE,CAACe,YAAY,CACbnB,qBAAqB,EACrBC,eAAI,CAACmB,IAAI,CAAC,IAAAC,sBAAa,EAACzB,WAAW,CAAC,EAAE,0BAA0B,CAAC,CAClE;EAED,MAAM0B,WAAW,GAAG,IAAAC,2BAAc,EAAC3B,WAAW,CAAC;EAC/C,MAAM4B,aAAa,GAAI,GAAEF,WAAY,2BAA0B;EAC/D,IAAI,CAACzB,OAAO,CAAC4B,OAAO,CAACD,aAAa,CAAC,EAAE;IACnC3B,OAAO,GAAG,IAAA6B,mCAAsB,EAAC;MAC/BC,QAAQ,EAAEH,aAAa;MACvBI,SAAS,EAAEN,WAAW;MACtBzB,OAAO;MACPgC,WAAW,EAAE,IAAI;MACjBC,OAAO,EAAE;IACX,CAAC,CAAC;EACJ;EACA,OAAOjC,OAAO;AAChB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { JSONValue } from '@expo/json-file';
|
|
2
|
-
export
|
|
2
|
+
export type URLScheme = {
|
|
3
3
|
CFBundleURLName?: string;
|
|
4
4
|
CFBundleURLSchemes: string[];
|
|
5
5
|
};
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
6
|
+
export type InterfaceOrientation = 'UIInterfaceOrientationPortrait' | 'UIInterfaceOrientationPortraitUpsideDown' | 'UIInterfaceOrientationLandscapeLeft' | 'UIInterfaceOrientationLandscapeRight';
|
|
7
|
+
export type InterfaceStyle = 'Light' | 'Dark' | 'Automatic';
|
|
8
|
+
export type InfoPlist = Record<string, JSONValue | undefined> & {
|
|
9
9
|
UIStatusBarHidden?: boolean;
|
|
10
10
|
UIStatusBarStyle?: string;
|
|
11
11
|
UILaunchStoryboardName?: string | 'SplashScreen';
|
|
@@ -18,11 +18,6 @@ export declare type InfoPlist = Record<string, JSONValue | undefined> & {
|
|
|
18
18
|
CFBundleDevelopmentRegion?: string;
|
|
19
19
|
ITSAppUsesNonExemptEncryption?: boolean;
|
|
20
20
|
LSApplicationQueriesSchemes?: string[];
|
|
21
|
-
FacebookAppID?: string;
|
|
22
|
-
FacebookDisplayName?: string;
|
|
23
|
-
FacebookAutoInitEnabled?: boolean;
|
|
24
|
-
FacebookAutoLogAppEventsEnabled?: boolean;
|
|
25
|
-
FacebookAdvertiserIDCollectionEnabled?: boolean;
|
|
26
21
|
UIBackgroundModes?: string[];
|
|
27
22
|
UISupportedInterfaceOrientations?: InterfaceOrientation[];
|
|
28
23
|
GMSApiKey?: string;
|
|
@@ -36,13 +31,13 @@ export declare type InfoPlist = Record<string, JSONValue | undefined> & {
|
|
|
36
31
|
live?: string;
|
|
37
32
|
};
|
|
38
33
|
};
|
|
39
|
-
export
|
|
34
|
+
export type ExpoPlist = {
|
|
40
35
|
EXUpdatesCheckOnLaunch?: string;
|
|
41
36
|
EXUpdatesEnabled?: boolean;
|
|
42
37
|
EXUpdatesLaunchWaitMs?: number;
|
|
43
38
|
EXUpdatesReleaseChannel?: string;
|
|
44
39
|
EXUpdatesRuntimeVersion?: string;
|
|
45
|
-
EXUpdatesRequestHeaders
|
|
40
|
+
EXUpdatesRequestHeaders?: Record<string, string>;
|
|
46
41
|
EXUpdatesSDKVersion?: string;
|
|
47
42
|
EXUpdatesURL?: string;
|
|
48
43
|
EXUpdatesCodeSigningCertificate?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IosConfig.types.js","names":[],"sources":["../../src/ios/IosConfig.types.ts"],"sourcesContent":["import { JSONValue } from '@expo/json-file';\n\nexport type URLScheme = {\n CFBundleURLName?: string;\n CFBundleURLSchemes: string[];\n};\n\nexport type InterfaceOrientation =\n | 'UIInterfaceOrientationPortrait'\n | 'UIInterfaceOrientationPortraitUpsideDown'\n | 'UIInterfaceOrientationLandscapeLeft'\n | 'UIInterfaceOrientationLandscapeRight';\n\nexport type InterfaceStyle = 'Light' | 'Dark' | 'Automatic';\n\nexport type InfoPlist = Record<string, JSONValue | undefined> & {\n UIStatusBarHidden?: boolean;\n UIStatusBarStyle?: string;\n UILaunchStoryboardName?: string | 'SplashScreen';\n CFBundleShortVersionString?: string;\n CFBundleVersion?: string;\n CFBundleDisplayName?: string;\n CFBundleIdentifier?: string;\n CFBundleName?: string;\n CFBundleURLTypes?: URLScheme[];\n CFBundleDevelopmentRegion?: string;\n ITSAppUsesNonExemptEncryption?: boolean;\n LSApplicationQueriesSchemes?: string[];\n
|
|
1
|
+
{"version":3,"file":"IosConfig.types.js","names":[],"sources":["../../src/ios/IosConfig.types.ts"],"sourcesContent":["import { JSONValue } from '@expo/json-file';\n\nexport type URLScheme = {\n CFBundleURLName?: string;\n CFBundleURLSchemes: string[];\n};\n\nexport type InterfaceOrientation =\n | 'UIInterfaceOrientationPortrait'\n | 'UIInterfaceOrientationPortraitUpsideDown'\n | 'UIInterfaceOrientationLandscapeLeft'\n | 'UIInterfaceOrientationLandscapeRight';\n\nexport type InterfaceStyle = 'Light' | 'Dark' | 'Automatic';\n\nexport type InfoPlist = Record<string, JSONValue | undefined> & {\n UIStatusBarHidden?: boolean;\n UIStatusBarStyle?: string;\n UILaunchStoryboardName?: string | 'SplashScreen';\n CFBundleShortVersionString?: string;\n CFBundleVersion?: string;\n CFBundleDisplayName?: string;\n CFBundleIdentifier?: string;\n CFBundleName?: string;\n CFBundleURLTypes?: URLScheme[];\n CFBundleDevelopmentRegion?: string;\n ITSAppUsesNonExemptEncryption?: boolean;\n LSApplicationQueriesSchemes?: string[];\n UIBackgroundModes?: string[];\n UISupportedInterfaceOrientations?: InterfaceOrientation[];\n GMSApiKey?: string;\n GADApplicationIdentifier?: string;\n UIUserInterfaceStyle?: InterfaceStyle;\n UIRequiresFullScreen?: boolean;\n SKAdNetworkItems?: { SKAdNetworkIdentifier: string }[];\n branch_key?: { live?: string };\n};\n\nexport type ExpoPlist = {\n EXUpdatesCheckOnLaunch?: string;\n EXUpdatesEnabled?: boolean;\n EXUpdatesLaunchWaitMs?: number;\n EXUpdatesReleaseChannel?: string;\n EXUpdatesRuntimeVersion?: string;\n EXUpdatesRequestHeaders?: Record<string, string>;\n EXUpdatesSDKVersion?: string;\n EXUpdatesURL?: string;\n EXUpdatesCodeSigningCertificate?: string;\n EXUpdatesCodeSigningMetadata?: Record<string, string>;\n};\n"],"mappings":""}
|
package/build/ios/Locales.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { XcodeProject } from 'xcode';
|
|
3
3
|
import { ConfigPlugin } from '../Plugin.types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type LocaleJson = Record<string, string>;
|
|
5
|
+
type ResolvedLocalesJson = Record<string, LocaleJson>;
|
|
6
|
+
type ExpoConfigLocales = NonNullable<ExpoConfig['locales']>;
|
|
7
7
|
export declare const withLocales: ConfigPlugin;
|
|
8
8
|
export declare function getLocales(config: Pick<ExpoConfig, 'locales'>): Record<string, string | LocaleJson> | null;
|
|
9
9
|
export declare function setLocalesAsync(config: Pick<ExpoConfig, 'locales'>, { projectRoot, project }: {
|