@expo/config-plugins 4.0.4 → 4.0.9
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/README.md +14 -0
- package/build/Plugin.types.js +6 -6
- package/build/android/AllowBackup.js +1 -1
- package/build/android/Colors.js +3 -3
- package/build/android/EasBuild.js +1 -1
- package/build/android/GoogleServices.js +3 -3
- package/build/android/IntentFilters.js +1 -1
- package/build/android/JsEngine.js +2 -1
- package/build/android/JsEngine.js.map +1 -1
- package/build/android/Manifest.js +10 -10
- package/build/android/Name.d.ts +2 -1
- package/build/android/Name.js +7 -4
- package/build/android/Name.js.map +1 -1
- package/build/android/Orientation.js +2 -1
- package/build/android/Orientation.js.map +1 -1
- package/build/android/Package.js +4 -4
- package/build/android/Package.js.map +1 -1
- package/build/android/Paths.js +9 -9
- package/build/android/Permissions.js +6 -6
- package/build/android/Resources.js +5 -5
- package/build/android/Scheme.js +3 -3
- package/build/android/StatusBar.js +3 -3
- package/build/android/Strings.js +1 -1
- package/build/android/Styles.js +5 -5
- package/build/android/Updates.d.ts +0 -5
- package/build/android/Updates.js +14 -23
- package/build/android/Updates.js.map +1 -1
- package/build/android/Version.js +2 -2
- package/build/android/WindowSoftInputMode.js +1 -1
- package/build/android/codeMod.js +2 -2
- package/build/android/index.d.ts +1 -3
- package/build/android/index.js +1 -35
- package/build/android/index.js.map +1 -1
- package/build/index.js +54 -53
- package/build/index.js.map +1 -1
- package/build/ios/Bitcode.d.ts +33 -0
- package/build/ios/Bitcode.js +131 -0
- package/build/ios/Bitcode.js.map +1 -0
- package/build/ios/BuildScheme.js +2 -2
- package/build/ios/BundleIdentifier.js +3 -3
- package/build/ios/DeviceFamily.js +3 -3
- package/build/ios/Entitlements.js +2 -2
- package/build/ios/Entitlements.js.map +1 -1
- package/build/ios/Google.js +2 -2
- package/build/ios/JsEngine.js +2 -1
- package/build/ios/JsEngine.js.map +1 -1
- package/build/ios/Locales.js +1 -1
- package/build/ios/Maps.js +29 -8
- package/build/ios/Maps.js.map +1 -1
- package/build/ios/Orientation.js +2 -1
- package/build/ios/Orientation.js.map +1 -1
- package/build/ios/Paths.js +14 -14
- package/build/ios/Paths.js.map +1 -1
- package/build/ios/Permissions.js +1 -1
- package/build/ios/Permissions.js.map +1 -1
- package/build/ios/Scheme.js +4 -4
- package/build/ios/Swift.js +2 -2
- package/build/ios/Target.js +5 -5
- package/build/ios/Updates.d.ts +0 -5
- package/build/ios/Updates.js +14 -23
- package/build/ios/Updates.js.map +1 -1
- package/build/ios/Version.js +3 -3
- package/build/ios/codeMod.js +2 -2
- package/build/ios/index.d.ts +2 -3
- package/build/ios/index.js +20 -35
- package/build/ios/index.js.map +1 -1
- package/build/ios/utils/Xcodeproj.js +9 -9
- package/build/plugins/android-plugins.js +1 -1
- package/build/plugins/createBaseMod.js +2 -2
- package/build/plugins/createBaseMod.js.map +1 -1
- package/build/plugins/ios-plugins.js +2 -2
- package/build/plugins/mod-compiler.js +3 -3
- package/build/plugins/mod-compiler.js.map +1 -1
- package/build/plugins/withAndroidBaseMods.js +1 -1
- package/build/plugins/withIosBaseMods.js +1 -1
- package/build/plugins/withStaticPlugin.js +16 -5
- package/build/plugins/withStaticPlugin.js.map +1 -1
- package/build/utils/Updates.d.ts +1 -0
- package/build/utils/Updates.js +24 -1
- package/build/utils/Updates.js.map +1 -1
- package/build/utils/XML.d.ts +6 -0
- package/build/utils/XML.js +57 -10
- package/build/utils/XML.js.map +1 -1
- package/build/utils/errors.js +1 -1
- package/build/utils/generateCode.js +2 -2
- package/build/utils/history.js +1 -1
- package/build/utils/modules.js +1 -1
- package/build/utils/plugin-resolver.js +4 -4
- package/build/utils/sortObject.js +2 -2
- package/build/utils/warnings.js +1 -1
- package/package.json +4 -4
- package/build/android/RootViewBackgroundColor.d.ts +0 -6
- package/build/android/RootViewBackgroundColor.js +0 -81
- package/build/android/RootViewBackgroundColor.js.map +0 -1
- package/build/android/UserInterfaceStyle.d.ts +0 -10
- package/build/android/UserInterfaceStyle.js +0 -119
- package/build/android/UserInterfaceStyle.js.map +0 -1
- package/build/ios/RootViewBackgroundColor.d.ts +0 -6
- package/build/ios/RootViewBackgroundColor.js +0 -70
- package/build/ios/RootViewBackgroundColor.js.map +0 -1
- package/build/ios/UserInterfaceStyle.d.ts +0 -5
- package/build/ios/UserInterfaceStyle.js +0 -59
- package/build/ios/UserInterfaceStyle.js.map +0 -1
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getBundleIdentifier = getBundleIdentifier;
|
|
7
|
-
exports.setBundleIdentifier = setBundleIdentifier;
|
|
8
7
|
exports.getBundleIdentifierFromPbxproj = getBundleIdentifierFromPbxproj;
|
|
9
|
-
exports.updateBundleIdentifierForPbxproj = updateBundleIdentifierForPbxproj;
|
|
10
|
-
exports.setBundleIdentifierForPbxproj = setBundleIdentifierForPbxproj;
|
|
11
8
|
exports.resetAllPlistBundleIdentifiers = resetAllPlistBundleIdentifiers;
|
|
12
9
|
exports.resetPlistBundleIdentifier = resetPlistBundleIdentifier;
|
|
10
|
+
exports.setBundleIdentifier = setBundleIdentifier;
|
|
11
|
+
exports.setBundleIdentifierForPbxproj = setBundleIdentifierForPbxproj;
|
|
12
|
+
exports.updateBundleIdentifierForPbxproj = updateBundleIdentifierForPbxproj;
|
|
13
13
|
exports.withBundleIdentifier = void 0;
|
|
14
14
|
|
|
15
15
|
function _plist() {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getSupportsTablet = getSupportsTablet;
|
|
7
|
-
exports.getIsTabletOnly = getIsTabletOnly;
|
|
8
|
-
exports.getDeviceFamilies = getDeviceFamilies;
|
|
9
6
|
exports.formatDeviceFamilies = formatDeviceFamilies;
|
|
7
|
+
exports.getDeviceFamilies = getDeviceFamilies;
|
|
8
|
+
exports.getIsTabletOnly = getIsTabletOnly;
|
|
9
|
+
exports.getSupportsTablet = getSupportsTablet;
|
|
10
10
|
exports.setDeviceFamily = setDeviceFamily;
|
|
11
11
|
exports.withDeviceFamily = void 0;
|
|
12
12
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.setAssociatedDomains = setAssociatedDomains;
|
|
7
6
|
exports.getEntitlementsPath = getEntitlementsPath;
|
|
7
|
+
exports.setAssociatedDomains = setAssociatedDomains;
|
|
8
8
|
exports.withAssociatedDomains = void 0;
|
|
9
9
|
|
|
10
10
|
function _fsExtra() {
|
|
@@ -137,7 +137,7 @@ function getEntitlementsPath(projectRoot) {
|
|
|
137
137
|
buildSettings
|
|
138
138
|
}
|
|
139
139
|
}) => {
|
|
140
|
-
buildSettings.CODE_SIGN_ENTITLEMENTS = entitlementsRelativePath
|
|
140
|
+
buildSettings.CODE_SIGN_ENTITLEMENTS = `"${entitlementsRelativePath}"`;
|
|
141
141
|
});
|
|
142
142
|
|
|
143
143
|
_fsExtra().default.writeFileSync(project.filepath, project.writeSync());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ios/Entitlements.ts"],"names":["withAssociatedDomains","setAssociatedDomains","config","_","entitlementsPlist","ios","associatedDomains","getEntitlementsPath","projectRoot","paths","Paths","getAllEntitlementsPaths","targetPath","project","projectName","productName","entitlementsRelativePath","path","join","entitlementsPath","normalize","pathsToDelete","length","last","pop","push","template","ENTITLEMENTS_TEMPLATE","fs","readFileSync","ensureDirSync","dirname","writeFileSync","Object","entries","pbxXCBuildConfigurationSection","filter","isNotComment","isBuildConfig","isNotTestHost","forEach","buildSettings","CODE_SIGN_ENTITLEMENTS","filepath","writeSync","deleteEntitlementsFiles","entitlementsPaths","removeSync"],"mappings":";;;;;;;;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AA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KG,SAAL,CAAeX,KAAK,CAACe,GAAN,EAAf,CAAN,CAAb;;AACA,QAAID,IAAI,KAAKJ,gBAAb,EAA+B;AAC7BE,MAAAA,aAAa,CAACI,IAAd,CAAmBF,IAAnB;AACD,KAFD,MAEO;AACLX,MAAAA,UAAU,GAAGW,IAAb;AACD;AACF,GA1B8D,CA4B/D;;;AACA,MAAI,CAACX,UAAL,EAAiB;AACfA,IAAAA,UAAU,GAAGO,gBAAb,CADe,CAGf;;AACA,QAAIO,QAAQ,GAAGC,qBAAf,CAJe,CAMf;;AACA,QAAIN,aAAa,CAACC,MAAlB,EAA0B;AACxB;AACA,YAAMC,IAAI,GAAGF,aAAa,CAACA,aAAa,CAACC,MAAd,GAAuB,CAAxB,CAA1B;AACAI,MAAAA,QAAQ,GAAGE,mBAAGC,YAAH,CAAgBN,IAAhB,EAAsB,MAAtB,CAAX;AACD;;AAEDK,uBAAGE,aAAH,CAAiBb,gBAAKc,OAAL,CAAaZ,gBAAb,CAAjB;;AACAS,uBAAGI,aAAH,CAAiBb,gBAAjB,EAAmCO,QAAnC;;AAEAO,IAAAA,MAAM,CAACC,OAAP,CAAerB,OAAO,CAACsB,8BAAR,EAAf,EACGC,MADH,CACUC,yBADV,EAEGD,MAFH,CAEUE,0BAFV,EAGGF,MAHH,CAGUG,0BAHV,EAIGC,OAJH,CAIW,CAAC;AAAE,SAAG;AAAEC,QAAAA;AAAF;AAAL,KAAD,KAAmC;AAC1CA,MAAAA,aAAa,CAACC,sBAAd,
|
|
1
|
+
{"version":3,"sources":["../../src/ios/Entitlements.ts"],"names":["withAssociatedDomains","setAssociatedDomains","config","_","entitlementsPlist","ios","associatedDomains","getEntitlementsPath","projectRoot","paths","Paths","getAllEntitlementsPaths","targetPath","project","projectName","productName","entitlementsRelativePath","path","join","entitlementsPath","normalize","pathsToDelete","length","last","pop","push","template","ENTITLEMENTS_TEMPLATE","fs","readFileSync","ensureDirSync","dirname","writeFileSync","Object","entries","pbxXCBuildConfigurationSection","filter","isNotComment","isBuildConfig","isNotTestHost","forEach","buildSettings","CODE_SIGN_ENTITLEMENTS","filepath","writeSync","deleteEntitlementsFiles","entitlementsPaths","removeSync"],"mappings":";;;;;;;;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;;;AASO,MAAMA,qBAAqB,GAAG,4CACnCC,oBADmC,EAEnC,uBAFmC,CAA9B;;;AAKA,SAASA,oBAAT,CACLC,MADK,EAEL;AAAE,4CAA0CC,CAA5C;AAA+C,KAAGC;AAAlD,CAFK,EAGO;AAAA;;AACZ,qBAAIF,MAAM,CAACG,GAAX,wCAAI,YAAYC,iBAAhB,EAAmC;AACjC,WAAO,EACL,GAAGF,iBADE;AAEL,gDAA0CF,MAAM,CAACG,GAAP,CAAWC;AAFhD,KAAP;AAID;;AAED,SAAOF,iBAAP;AACD;;AAEM,SAASG,mBAAT,CAA6BC,WAA7B,EAA0D;AAC/D,QAAMC,KAAK,GAAGC,KAAK,GAACC,uBAAN,CAA8BH,WAA9B,CAAd;AACA,MAAII,UAAyB,GAAG,IAAhC;AAEA;AACF;AACA;;AACE,QAAMC,OAAO,GAAG,6BAAWL,WAAX,CAAhB;AACA,QAAMM,WAAW,GAAG,iCAAeN,WAAf,CAApB;AACA,QAAMO,WAAW,GAAG,iCAAeF,OAAf,CAApB,CAT+D,CAW/D;;AACA,QAAMG,wBAAwB,GAAG,sBAAMC,gBAAKC,IAAL,CAAUJ,WAAV,EAAwB,GAAEC,WAAY,eAAtC,CAAN,CAAjC;AACA,QAAMI,gBAAgB,GAAG,sBACvBF,gBAAKG,SAAL,CAAeH,gBAAKC,IAAL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EAAnC;AACD,GArD8D,CAuD/D;;;AACAC,EAAAA,uBAAuB,CAACxB,aAAD,CAAvB;AAEA,SAAOF,gBAAP;AACD;;AAED,SAAS0B,uBAAT,CAAiCC,iBAAjC,EAA8D;AAC5D,OAAK,MAAM7B,IAAX,IAAmB6B,iBAAnB,EAAsC;AACpClB,uBAAGmB,UAAH,CAAc9B,IAAd;AACD;AACF;;AAED,MAAMU,qBAAqB,GAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,CAPA","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport { JSONObject } from '@expo/json-file';\nimport fs from 'fs-extra';\nimport path from 'path';\nimport slash from 'slash';\n\nimport { createEntitlementsPlugin } from '../plugins/ios-plugins';\nimport * as Paths from './Paths';\nimport {\n getPbxproj,\n getProductName,\n getProjectName,\n isBuildConfig,\n isNotComment,\n isNotTestHost,\n} from './utils/Xcodeproj';\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(projectRoot: string): string {\n const paths = Paths.getAllEntitlementsPaths(projectRoot);\n let targetPath: string | null = null;\n\n /**\n * Add file to pbxproj under CODE_SIGN_ENTITLEMENTS\n */\n const project = getPbxproj(projectRoot);\n const projectName = getProjectName(projectRoot);\n const productName = getProductName(project);\n\n // Use posix formatted path, even on Windows\n const entitlementsRelativePath = slash(path.join(projectName, `${productName}.entitlements`));\n const entitlementsPath = slash(\n path.normalize(path.join(projectRoot, 'ios', entitlementsRelativePath))\n );\n\n const pathsToDelete: string[] = [];\n\n while (paths.length) {\n const last = slash(path.normalize(paths.pop()!));\n if (last !== entitlementsPath) {\n pathsToDelete.push(last);\n } else {\n targetPath = last;\n }\n }\n\n // Create a new entitlements file\n if (!targetPath) {\n targetPath = entitlementsPath;\n\n // Use the default template\n let template = ENTITLEMENTS_TEMPLATE;\n\n // If an old entitlements file exists, copy it's contents into the new file.\n if (pathsToDelete.length) {\n // Get the last entitlements file and use it as the template\n const last = pathsToDelete[pathsToDelete.length - 1]!;\n template = fs.readFileSync(last, 'utf8');\n }\n\n fs.ensureDirSync(path.dirname(entitlementsPath));\n fs.writeFileSync(entitlementsPath, template);\n\n Object.entries(project.pbxXCBuildConfigurationSection())\n .filter(isNotComment)\n .filter(isBuildConfig)\n .filter(isNotTestHost)\n .forEach(({ 1: { buildSettings } }: any) => {\n buildSettings.CODE_SIGN_ENTITLEMENTS = `\"${entitlementsRelativePath}\"`;\n });\n fs.writeFileSync(project.filepath, project.writeSync());\n }\n\n // Clean up others\n deleteEntitlementsFiles(pathsToDelete);\n\n return entitlementsPath;\n}\n\nfunction deleteEntitlementsFiles(entitlementsPaths: string[]) {\n for (const path of entitlementsPaths) {\n fs.removeSync(path);\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"],"file":"Entitlements.js"}
|
package/build/ios/Google.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getGoogleSignInReservedClientId = getGoogleSignInReservedClientId;
|
|
7
6
|
exports.getGoogleServicesFile = getGoogleServicesFile;
|
|
8
|
-
exports.
|
|
7
|
+
exports.getGoogleSignInReservedClientId = getGoogleSignInReservedClientId;
|
|
9
8
|
exports.setGoogleConfig = setGoogleConfig;
|
|
10
9
|
exports.setGoogleServicesFile = setGoogleServicesFile;
|
|
10
|
+
exports.setGoogleSignInReservedClientId = setGoogleSignInReservedClientId;
|
|
11
11
|
exports.withGoogleServicesFile = exports.withGoogle = void 0;
|
|
12
12
|
|
|
13
13
|
function _fsExtra() {
|
package/build/ios/JsEngine.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.JS_ENGINE_PROP_KEY = exports.DEFAULT_JS_ENGINE = void 0;
|
|
6
7
|
exports.getJsEngine = getJsEngine;
|
|
7
8
|
exports.setJsEngine = setJsEngine;
|
|
8
|
-
exports.withJsEnginePodfileProps =
|
|
9
|
+
exports.withJsEnginePodfileProps = void 0;
|
|
9
10
|
|
|
10
11
|
function _iosPlugins() {
|
|
11
12
|
const data = require("../plugins/ios-plugins");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ios/JsEngine.ts"],"names":["JS_ENGINE_PROP_KEY","DEFAULT_JS_ENGINE","withJsEnginePodfileProps","config","modResults","setJsEngine","getJsEngine","ios","jsEngine","podfileProperties"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/ios/JsEngine.ts"],"names":["JS_ENGINE_PROP_KEY","DEFAULT_JS_ENGINE","withJsEnginePodfileProps","config","modResults","setJsEngine","getJsEngine","ios","jsEngine","podfileProperties"],"mappings":";;;;;;;;;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEO,MAAMA,kBAAkB,GAAG,eAA3B;;AACA,MAAMC,iBAAiB,GAAG,KAA1B;;;AAEA,MAAMC,wBAAsC,GAAGC,MAAM,IAAI;AAC9D,SAAO,yCAAsBA,MAAtB,EAA8BA,MAAM,IAAI;AAC7CA,IAAAA,MAAM,CAACC,UAAP,GAAoBC,WAAW,CAACF,MAAD,EAASA,MAAM,CAACC,UAAhB,CAA/B;AACA,WAAOD,MAAP;AACD,GAHM,CAAP;AAID,CALM;;;;AAOA,SAASG,WAAT,CAAqBH,MAArB,EAAmE;AAAA;;AACxE,wDAAOA,MAAM,CAACI,GAAd,gDAAO,YAAYC,QAAnB,uEAA+BL,MAAM,CAACK,QAAtC,uCAAkDP,iBAAlD;AACD;;AAEM,SAASI,WAAT,CACLF,MADK,EAELM,iBAFK,EAGmB;AAAA;;AACxBA,EAAAA,iBAAiB,CAACT,kBAAD,CAAjB,qDACEG,MAAM,CAACI,GADT,iDACE,aAAYC,QADd,yEAC0BL,MAAM,CAACK,QADjC,yCAC6CP,iBAD7C;AAEA,SAAOQ,iBAAP;AACD","sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\n\nimport type { ConfigPlugin } from '../Plugin.types';\nimport { withPodfileProperties } from '../plugins/ios-plugins';\n\nexport const JS_ENGINE_PROP_KEY = 'expo.jsEngine';\nexport const DEFAULT_JS_ENGINE = 'jsc';\n\nexport const withJsEnginePodfileProps: ConfigPlugin = config => {\n return withPodfileProperties(config, config => {\n config.modResults = setJsEngine(config, config.modResults);\n return config;\n });\n};\n\nexport function getJsEngine(config: Pick<ExpoConfig, 'ios' | 'jsEngine'>) {\n return config.ios?.jsEngine ?? config.jsEngine ?? DEFAULT_JS_ENGINE;\n}\n\nexport function setJsEngine(\n config: Pick<ExpoConfig, 'ios' | 'jsEngine'>,\n podfileProperties: Record<string, string>\n): Record<string, string> {\n podfileProperties[JS_ENGINE_PROP_KEY] =\n config.ios?.jsEngine ?? config.jsEngine ?? DEFAULT_JS_ENGINE;\n return podfileProperties;\n}\n"],"file":"JsEngine.js"}
|
package/build/ios/Locales.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getLocales = getLocales;
|
|
7
|
-
exports.setLocalesAsync = setLocalesAsync;
|
|
8
7
|
exports.getResolvedLocalesAsync = getResolvedLocalesAsync;
|
|
8
|
+
exports.setLocalesAsync = setLocalesAsync;
|
|
9
9
|
exports.withLocales = void 0;
|
|
10
10
|
|
|
11
11
|
function _jsonFile() {
|
package/build/ios/Maps.js
CHANGED
|
@@ -3,15 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.setGoogleMapsApiKey = setGoogleMapsApiKey;
|
|
6
|
+
exports.MATCH_INIT = void 0;
|
|
8
7
|
exports.addGoogleMapsAppDelegateImport = addGoogleMapsAppDelegateImport;
|
|
9
|
-
exports.removeGoogleMapsAppDelegateImport = removeGoogleMapsAppDelegateImport;
|
|
10
8
|
exports.addGoogleMapsAppDelegateInit = addGoogleMapsAppDelegateInit;
|
|
11
|
-
exports.removeGoogleMapsAppDelegateInit = removeGoogleMapsAppDelegateInit;
|
|
12
9
|
exports.addMapsCocoaPods = addMapsCocoaPods;
|
|
10
|
+
exports.getGoogleMapsApiKey = getGoogleMapsApiKey;
|
|
11
|
+
exports.removeGoogleMapsAppDelegateImport = removeGoogleMapsAppDelegateImport;
|
|
12
|
+
exports.removeGoogleMapsAppDelegateInit = removeGoogleMapsAppDelegateInit;
|
|
13
13
|
exports.removeMapsCocoaPods = removeMapsCocoaPods;
|
|
14
|
-
exports.
|
|
14
|
+
exports.setGoogleMapsApiKey = setGoogleMapsApiKey;
|
|
15
|
+
exports.withMaps = void 0;
|
|
16
|
+
|
|
17
|
+
function _debug() {
|
|
18
|
+
const data = _interopRequireDefault(require("debug"));
|
|
19
|
+
|
|
20
|
+
_debug = function () {
|
|
21
|
+
return data;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return data;
|
|
25
|
+
}
|
|
15
26
|
|
|
16
27
|
function _fsExtra() {
|
|
17
28
|
const data = _interopRequireDefault(require("fs-extra"));
|
|
@@ -75,7 +86,8 @@ function _resolvePackageRootFolder() {
|
|
|
75
86
|
|
|
76
87
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
77
88
|
|
|
78
|
-
// Match against `UMModuleRegistryAdapter` (unimodules), and React Native without unimodules (Expo Modules).
|
|
89
|
+
const debug = (0, _debug().default)('expo:config-plugins:ios:maps'); // Match against `UMModuleRegistryAdapter` (unimodules), and React Native without unimodules (Expo Modules).
|
|
90
|
+
|
|
79
91
|
const MATCH_INIT = /(?:(self\.|_)(\w+)\s?=\s?\[\[UMModuleRegistryAdapter alloc\])|(?:RCTBridge\s?\*\s?(\w+)\s?=\s?\[\[RCTBridge alloc\])/g;
|
|
80
92
|
exports.MATCH_INIT = MATCH_INIT;
|
|
81
93
|
const withGoogleMapsKey = (0, _iosPlugins().createInfoPlistPlugin)(setGoogleMapsApiKey, 'withGoogleMapsKey');
|
|
@@ -84,6 +96,7 @@ const withMaps = config => {
|
|
|
84
96
|
config = withGoogleMapsKey(config);
|
|
85
97
|
const apiKey = getGoogleMapsApiKey(config); // Technically adds react-native-maps (Apple maps) and google maps.
|
|
86
98
|
|
|
99
|
+
debug('Google Maps API Key:', apiKey);
|
|
87
100
|
config = withMapsCocoaPods(config, {
|
|
88
101
|
useGoogleMaps: !!apiKey
|
|
89
102
|
}); // Adds/Removes AppDelegate setup for Google Maps API on iOS
|
|
@@ -186,6 +199,11 @@ function isReactNativeMapsInstalled(projectRoot) {
|
|
|
186
199
|
return (0, _resolvePackageRootFolder().resolvePackageRootFolder)(projectRoot, 'react-native-maps');
|
|
187
200
|
}
|
|
188
201
|
|
|
202
|
+
function isReactNativeMapsAutolinked(config) {
|
|
203
|
+
// TODO: Detect autolinking
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
|
|
189
207
|
const withMapsCocoaPods = (config, {
|
|
190
208
|
useGoogleMaps
|
|
191
209
|
}) => {
|
|
@@ -197,8 +215,11 @@ const withMapsCocoaPods = (config, {
|
|
|
197
215
|
// Generally prebuild runs after a yarn install so this should always work as expected.
|
|
198
216
|
|
|
199
217
|
const googleMapsPath = isReactNativeMapsInstalled(config.modRequest.projectRoot);
|
|
218
|
+
const isLinked = isReactNativeMapsAutolinked(config);
|
|
219
|
+
debug('Is Expo Autolinked:', isLinked);
|
|
220
|
+
debug('react-native-maps path:', googleMapsPath);
|
|
200
221
|
|
|
201
|
-
if (googleMapsPath && useGoogleMaps) {
|
|
222
|
+
if (isLinked && googleMapsPath && useGoogleMaps) {
|
|
202
223
|
// Make the pod path relative to the ios folder.
|
|
203
224
|
const googleMapsPodPath = _path().default.relative(config.modRequest.platformProjectRoot, googleMapsPath);
|
|
204
225
|
|
|
@@ -229,7 +250,7 @@ const withGoogleMapsAppDelegate = (config, {
|
|
|
229
250
|
}) => {
|
|
230
251
|
return (0, _iosPlugins().withAppDelegate)(config, config => {
|
|
231
252
|
if (config.modResults.language === 'objc') {
|
|
232
|
-
if (apiKey && isReactNativeMapsInstalled(config.modRequest.projectRoot)) {
|
|
253
|
+
if (apiKey && isReactNativeMapsAutolinked(config) && isReactNativeMapsInstalled(config.modRequest.projectRoot)) {
|
|
233
254
|
try {
|
|
234
255
|
config.modResults.contents = addGoogleMapsAppDelegateImport(config.modResults.contents).contents;
|
|
235
256
|
config.modResults.contents = addGoogleMapsAppDelegateInit(config.modResults.contents, apiKey).contents;
|
package/build/ios/Maps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ios/Maps.ts"],"names":["MATCH_INIT","withGoogleMapsKey","setGoogleMapsApiKey","withMaps","config","apiKey","getGoogleMapsApiKey","withMapsCocoaPods","useGoogleMaps","withGoogleMapsAppDelegate","ios","googleMapsApiKey","GMSApiKey","infoPlist","addGoogleMapsAppDelegateImport","src","newSrc","push","tag","join","anchor","offset","comment","removeGoogleMapsAppDelegateImport","addGoogleMapsAppDelegateInit","removeGoogleMapsAppDelegateInit","addMapsCocoaPods","googleMapsPath","removeMapsCocoaPods","isReactNativeMapsInstalled","projectRoot","filePath","path","modRequest","platformProjectRoot","contents","fs","readFile","results","googleMapsPodPath","relative","error","code","Error","did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AlB,GAA6BZ,iCAAiC,CAC5DnB,MAAM,CAAC2C,UAAP,CAAkBZ,QAD0C,CAAjC,CAE3BA,QAFF;AAGA/B,QAAAA,MAAM,CAAC2C,UAAP,CAAkBZ,QAAlB,GAA6BV,+BAA+B,CAC1DrB,MAAM,CAAC2C,UAAP,CAAkBZ,QADwC,CAA/B,CAE3BA,QAFF;AAGD;AACF,KA1BD,MA0BO;AACL,YAAM,IAAIQ,KAAJ,CAAU,qEAAV,CAAN;AACD;;AACD,WAAOvC,MAAP;AACD,GA/BM,CAAP;AAgCD,CAjCD","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport fs from 'fs-extra';\nimport path from 'path';\n\nimport { ConfigPlugin, InfoPlist } from '../Plugin.types';\nimport { createInfoPlistPlugin, withAppDelegate } from '../plugins/ios-plugins';\nimport { withDangerousMod } from '../plugins/withDangerousMod';\nimport { mergeContents, MergeResults, removeContents } from '../utils/generateCode';\nimport { resolvePackageRootFolder } from '../utils/resolvePackageRootFolder';\n\n// Match against `UMModuleRegistryAdapter` (unimodules), and React Native without unimodules (Expo Modules).\nexport const MATCH_INIT = /(?:(self\\.|_)(\\w+)\\s?=\\s?\\[\\[UMModuleRegistryAdapter alloc\\])|(?:RCTBridge\\s?\\*\\s?(\\w+)\\s?=\\s?\\[\\[RCTBridge alloc\\])/g;\n\nconst withGoogleMapsKey = createInfoPlistPlugin(setGoogleMapsApiKey, 'withGoogleMapsKey');\n\nexport const withMaps: ConfigPlugin = config => {\n config = withGoogleMapsKey(config);\n\n const apiKey = getGoogleMapsApiKey(config);\n // Technically adds react-native-maps (Apple maps) and google maps.\n config = withMapsCocoaPods(config, { useGoogleMaps: !!apiKey });\n // Adds/Removes AppDelegate setup for Google Maps API on iOS\n config = withGoogleMapsAppDelegate(config, { apiKey });\n\n return config;\n};\n\nexport function getGoogleMapsApiKey(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.config?.googleMapsApiKey ?? null;\n}\n\nexport function setGoogleMapsApiKey(\n config: Pick<ExpoConfig, 'ios'>,\n { GMSApiKey, ...infoPlist }: InfoPlist\n): InfoPlist {\n const apiKey = getGoogleMapsApiKey(config);\n\n if (apiKey === null) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n GMSApiKey: apiKey,\n };\n}\n\nexport function addGoogleMapsAppDelegateImport(src: string): MergeResults {\n const newSrc = [];\n newSrc.push(\n '#if __has_include(<GoogleMaps/GoogleMaps.h>)',\n '#import <GoogleMaps/GoogleMaps.h>',\n '#endif'\n );\n\n return mergeContents({\n tag: 'react-native-maps-import',\n src,\n newSrc: newSrc.join('\\n'),\n anchor: /#import \"AppDelegate\\.h\"/,\n offset: 1,\n comment: '//',\n });\n}\n\nexport function removeGoogleMapsAppDelegateImport(src: string): MergeResults {\n return removeContents({\n tag: 'react-native-maps-import',\n src,\n });\n}\n\nexport function addGoogleMapsAppDelegateInit(src: string, apiKey: string): MergeResults {\n const newSrc = [];\n newSrc.push(\n '#if __has_include(<GoogleMaps/GoogleMaps.h>)',\n ` [GMSServices provideAPIKey:@\"${apiKey}\"];`,\n '#endif'\n );\n\n return mergeContents({\n tag: 'react-native-maps-init',\n src,\n newSrc: newSrc.join('\\n'),\n anchor: MATCH_INIT,\n offset: 0,\n comment: '//',\n });\n}\n\nexport function removeGoogleMapsAppDelegateInit(src: string): MergeResults {\n return removeContents({\n tag: 'react-native-maps-init',\n src,\n });\n}\n\n/**\n * @param src\n * @param useGoogleMaps\n * @param googleMapsPath '../node_modules/react-native-maps'\n * @returns\n */\nexport function addMapsCocoaPods(src: string, googleMapsPath: string): MergeResults {\n return mergeContents({\n tag: 'react-native-maps',\n src,\n newSrc: ` pod 'react-native-google-maps', path: '${googleMapsPath}'`,\n anchor: /use_native_modules/,\n offset: 0,\n comment: '#',\n });\n}\n\nexport function removeMapsCocoaPods(src: string): MergeResults {\n return removeContents({\n tag: 'react-native-maps',\n src,\n });\n}\n\nfunction isReactNativeMapsInstalled(projectRoot: string): string | null {\n return resolvePackageRootFolder(projectRoot, 'react-native-maps');\n}\n\nconst withMapsCocoaPods: ConfigPlugin<{ useGoogleMaps: boolean }> = (config, { useGoogleMaps }) => {\n return withDangerousMod(config, [\n 'ios',\n async config => {\n const filePath = path.join(config.modRequest.platformProjectRoot, 'Podfile');\n const contents = await fs.readFile(filePath, 'utf-8');\n let results: MergeResults;\n // Only add the block if react-native-maps is installed in the project (best effort).\n // Generally prebuild runs after a yarn install so this should always work as expected.\n const googleMapsPath = isReactNativeMapsInstalled(config.modRequest.projectRoot);\n if (googleMapsPath && useGoogleMaps) {\n // Make the pod path relative to the ios folder.\n const googleMapsPodPath = path.relative(\n config.modRequest.platformProjectRoot,\n googleMapsPath\n );\n try {\n results = addMapsCocoaPods(contents, googleMapsPodPath);\n } catch (error) {\n if (error.code === 'ERR_NO_MATCH') {\n throw new Error(\n `Cannot add react-native-maps to the project's ios/Podfile because it's malformed. Please report this with a copy of your project Podfile.`\n );\n }\n throw error;\n }\n } else {\n // If the package is no longer installed, then remove the block.\n results = removeMapsCocoaPods(contents);\n }\n if (results.didMerge || results.didClear) {\n await fs.writeFile(filePath, results.contents);\n }\n return config;\n },\n ]);\n};\n\nconst withGoogleMapsAppDelegate: ConfigPlugin<{ apiKey: string | null }> = (config, { apiKey }) => {\n return withAppDelegate(config, config => {\n if (config.modResults.language === 'objc') {\n if (apiKey && isReactNativeMapsInstalled(config.modRequest.projectRoot)) {\n try {\n config.modResults.contents = addGoogleMapsAppDelegateImport(\n config.modResults.contents\n ).contents;\n config.modResults.contents = addGoogleMapsAppDelegateInit(\n config.modResults.contents,\n apiKey\n ).contents;\n } catch (error) {\n if (error.code === 'ERR_NO_MATCH') {\n throw new Error(\n `Cannot add Google Maps to the project's AppDelegate because it's malformed. Please report this with a copy of your project AppDelegate.`\n );\n }\n throw error;\n }\n } else {\n config.modResults.contents = removeGoogleMapsAppDelegateImport(\n config.modResults.contents\n ).contents;\n config.modResults.contents = removeGoogleMapsAppDelegateInit(\n config.modResults.contents\n ).contents;\n }\n } else {\n throw new Error('Cannot setup Google Maps because the AppDelegate is not Objective C');\n }\n return config;\n });\n};\n"],"file":"Maps.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/ios/Maps.ts"],"names":["debug","MATCH_INIT","withGoogleMapsKey","setGoogleMapsApiKey","withMaps","config","apiKey","getGoogleMapsApiKey","withMapsCocoaPods","useGoogleMaps","withGoogleMapsAppDelegate","ios","googleMapsApiKey","GMSApiKey","infoPlist","addGoogleMapsAppDelegateImport","src","newSrc","push","tag","join","anchor","offset","comment","removeGoogleMapsAppDelegateImport","addGoogleMapsAppDelegateInit","removeGoogleMapsAppDelegateInit","addMapsCocoaPods","googleMapsPath","removeMapsCocoaPods","isReactNativeMapsInstalled","projectRoot","isReactNativeMapsAutolinked","filePath","path","modRequest","platformProjectRoot","contents","fs","readFile","results","isLinked","googleMapsPodPath","relative","error","code","Error","didMerge","didClear","writeFile","modResults","language"],"mappings":";;;;;;;;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAEA,MAAMA,KAAK,GAAG,sBAAM,8BAAN,CAAd,C,CAEA;;AACO,MAAMC,UAAU,GAAG,uHAAnB;;AAEP,MAAMC,iBAAiB,GAAG,yCAAsBC,mBAAtB,EAA2C,mBAA3C,CAA1B;;AAEO,MAAMC,QAAsB,GAAGC,MAAM,IAAI;AAC9CA,EAAAA,MAAM,GAAGH,iBAAiB,CAACG,MAAD,CAA1B;AAEA,QAAMC,MAAM,GAAGC,mBAAmB,CAACF,MAAD,CAAlC,CAH8C,CAI9C;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O;AACL,YAAM,IAAIS,KAAJ,CAAU,qEAAV,CAAN;AACD;;AACD,WAAOzC,MAAP;AACD,GAnCM,CAAP;AAoCD,CArCD","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport Debug from 'debug';\nimport fs from 'fs-extra';\nimport path from 'path';\n\nimport { ConfigPlugin, InfoPlist } from '../Plugin.types';\nimport { createInfoPlistPlugin, withAppDelegate } from '../plugins/ios-plugins';\nimport { withDangerousMod } from '../plugins/withDangerousMod';\nimport { mergeContents, MergeResults, removeContents } from '../utils/generateCode';\nimport { resolvePackageRootFolder } from '../utils/resolvePackageRootFolder';\n\nconst debug = Debug('expo:config-plugins:ios:maps');\n\n// Match against `UMModuleRegistryAdapter` (unimodules), and React Native without unimodules (Expo Modules).\nexport const MATCH_INIT = /(?:(self\\.|_)(\\w+)\\s?=\\s?\\[\\[UMModuleRegistryAdapter alloc\\])|(?:RCTBridge\\s?\\*\\s?(\\w+)\\s?=\\s?\\[\\[RCTBridge alloc\\])/g;\n\nconst withGoogleMapsKey = createInfoPlistPlugin(setGoogleMapsApiKey, 'withGoogleMapsKey');\n\nexport const withMaps: ConfigPlugin = config => {\n config = withGoogleMapsKey(config);\n\n const apiKey = getGoogleMapsApiKey(config);\n // Technically adds react-native-maps (Apple maps) and google maps.\n\n debug('Google Maps API Key:', apiKey);\n config = withMapsCocoaPods(config, { useGoogleMaps: !!apiKey });\n\n // Adds/Removes AppDelegate setup for Google Maps API on iOS\n config = withGoogleMapsAppDelegate(config, { apiKey });\n\n return config;\n};\n\nexport function getGoogleMapsApiKey(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.config?.googleMapsApiKey ?? null;\n}\n\nexport function setGoogleMapsApiKey(\n config: Pick<ExpoConfig, 'ios'>,\n { GMSApiKey, ...infoPlist }: InfoPlist\n): InfoPlist {\n const apiKey = getGoogleMapsApiKey(config);\n\n if (apiKey === null) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n GMSApiKey: apiKey,\n };\n}\n\nexport function addGoogleMapsAppDelegateImport(src: string): MergeResults {\n const newSrc = [];\n newSrc.push(\n '#if __has_include(<GoogleMaps/GoogleMaps.h>)',\n '#import <GoogleMaps/GoogleMaps.h>',\n '#endif'\n );\n\n return mergeContents({\n tag: 'react-native-maps-import',\n src,\n newSrc: newSrc.join('\\n'),\n anchor: /#import \"AppDelegate\\.h\"/,\n offset: 1,\n comment: '//',\n });\n}\n\nexport function removeGoogleMapsAppDelegateImport(src: string): MergeResults {\n return removeContents({\n tag: 'react-native-maps-import',\n src,\n });\n}\n\nexport function addGoogleMapsAppDelegateInit(src: string, apiKey: string): MergeResults {\n const newSrc = [];\n newSrc.push(\n '#if __has_include(<GoogleMaps/GoogleMaps.h>)',\n ` [GMSServices provideAPIKey:@\"${apiKey}\"];`,\n '#endif'\n );\n\n return mergeContents({\n tag: 'react-native-maps-init',\n src,\n newSrc: newSrc.join('\\n'),\n anchor: MATCH_INIT,\n offset: 0,\n comment: '//',\n });\n}\n\nexport function removeGoogleMapsAppDelegateInit(src: string): MergeResults {\n return removeContents({\n tag: 'react-native-maps-init',\n src,\n });\n}\n\n/**\n * @param src\n * @param useGoogleMaps\n * @param googleMapsPath '../node_modules/react-native-maps'\n * @returns\n */\nexport function addMapsCocoaPods(src: string, googleMapsPath: string): MergeResults {\n return mergeContents({\n tag: 'react-native-maps',\n src,\n newSrc: ` pod 'react-native-google-maps', path: '${googleMapsPath}'`,\n anchor: /use_native_modules/,\n offset: 0,\n comment: '#',\n });\n}\n\nexport function removeMapsCocoaPods(src: string): MergeResults {\n return removeContents({\n tag: 'react-native-maps',\n src,\n });\n}\n\nfunction isReactNativeMapsInstalled(projectRoot: string): string | null {\n return resolvePackageRootFolder(projectRoot, 'react-native-maps');\n}\n\nfunction isReactNativeMapsAutolinked(config: Pick<ExpoConfig, '_internal'>): boolean {\n // TODO: Detect autolinking\n return true;\n}\n\nconst withMapsCocoaPods: ConfigPlugin<{ useGoogleMaps: boolean }> = (config, { useGoogleMaps }) => {\n return withDangerousMod(config, [\n 'ios',\n async config => {\n const filePath = path.join(config.modRequest.platformProjectRoot, 'Podfile');\n const contents = await fs.readFile(filePath, 'utf-8');\n let results: MergeResults;\n // Only add the block if react-native-maps is installed in the project (best effort).\n // Generally prebuild runs after a yarn install so this should always work as expected.\n const googleMapsPath = isReactNativeMapsInstalled(config.modRequest.projectRoot);\n const isLinked = isReactNativeMapsAutolinked(config);\n debug('Is Expo Autolinked:', isLinked);\n debug('react-native-maps path:', googleMapsPath);\n if (isLinked && googleMapsPath && useGoogleMaps) {\n // Make the pod path relative to the ios folder.\n const googleMapsPodPath = path.relative(\n config.modRequest.platformProjectRoot,\n googleMapsPath\n );\n try {\n results = addMapsCocoaPods(contents, googleMapsPodPath);\n } catch (error: any) {\n if (error.code === 'ERR_NO_MATCH') {\n throw new Error(\n `Cannot add react-native-maps to the project's ios/Podfile because it's malformed. Please report this with a copy of your project Podfile.`\n );\n }\n throw error;\n }\n } else {\n // If the package is no longer installed, then remove the block.\n results = removeMapsCocoaPods(contents);\n }\n if (results.didMerge || results.didClear) {\n await fs.writeFile(filePath, results.contents);\n }\n return config;\n },\n ]);\n};\n\nconst withGoogleMapsAppDelegate: ConfigPlugin<{ apiKey: string | null }> = (config, { apiKey }) => {\n return withAppDelegate(config, config => {\n if (config.modResults.language === 'objc') {\n if (\n apiKey &&\n isReactNativeMapsAutolinked(config) &&\n isReactNativeMapsInstalled(config.modRequest.projectRoot)\n ) {\n try {\n config.modResults.contents = addGoogleMapsAppDelegateImport(\n config.modResults.contents\n ).contents;\n config.modResults.contents = addGoogleMapsAppDelegateInit(\n config.modResults.contents,\n apiKey\n ).contents;\n } catch (error) {\n if (error.code === 'ERR_NO_MATCH') {\n throw new Error(\n `Cannot add Google Maps to the project's AppDelegate because it's malformed. Please report this with a copy of your project AppDelegate.`\n );\n }\n throw error;\n }\n } else {\n config.modResults.contents = removeGoogleMapsAppDelegateImport(\n config.modResults.contents\n ).contents;\n config.modResults.contents = removeGoogleMapsAppDelegateInit(\n config.modResults.contents\n ).contents;\n }\n } else {\n throw new Error('Cannot setup Google Maps because the AppDelegate is not Objective C');\n }\n return config;\n });\n};\n"],"file":"Maps.js"}
|
package/build/ios/Orientation.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.PORTRAIT_ORIENTATIONS = exports.LANDSCAPE_ORIENTATIONS = void 0;
|
|
6
7
|
exports.getOrientation = getOrientation;
|
|
7
8
|
exports.setOrientation = setOrientation;
|
|
8
|
-
exports.
|
|
9
|
+
exports.withOrientation = void 0;
|
|
9
10
|
|
|
10
11
|
function _iosPlugins() {
|
|
11
12
|
const data = require("../plugins/ios-plugins");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ios/Orientation.ts"],"names":["withOrientation","setOrientation","getOrientation","config","orientation","PORTRAIT_ORIENTATIONS","LANDSCAPE_ORIENTATIONS","getUISupportedInterfaceOrientations","infoPlist","UISupportedInterfaceOrientations"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/ios/Orientation.ts"],"names":["withOrientation","setOrientation","getOrientation","config","orientation","PORTRAIT_ORIENTATIONS","LANDSCAPE_ORIENTATIONS","getUISupportedInterfaceOrientations","infoPlist","UISupportedInterfaceOrientations"],"mappings":";;;;;;;;;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGO,MAAMA,eAAe,GAAG,yCAAsBC,cAAtB,EAAsC,iBAAtC,CAAxB;;;AAEA,SAASC,cAAT,CAAwBC,MAAxB,EAAiE;AAAA;;AACtE,gCAAOA,MAAM,CAACC,WAAd,qEAA6B,IAA7B;AACD;;AAEM,MAAMC,qBAA6C,GAAG,CAC3D,gCAD2D,EAE3D,0CAF2D,CAAtD;;AAKA,MAAMC,sBAA8C,GAAG,CAC5D,qCAD4D,EAE5D,sCAF4D,CAAvD;;;AAKP,SAASC,mCAAT,CAA6CH,WAA7C,EAAiG;AAC/F,MAAIA,WAAW,KAAK,UAApB,EAAgC;AAC9B,WAAOC,qBAAP;AACD,GAFD,MAEO,IAAID,WAAW,KAAK,WAApB,EAAiC;AACtC,WAAOE,sBAAP;AACD,GAFM,MAEA;AACL,WAAO,CAAC,GAAGD,qBAAJ,EAA2B,GAAGC,sBAA9B,CAAP;AACD;AACF;;AAEM,SAASL,cAAT,CACLE,MADK,EAELK,SAFK,EAGM;AACX,QAAMJ,WAAW,GAAGF,cAAc,CAACC,MAAD,CAAlC;AAEA,SAAO,EACL,GAAGK,SADE;AAELC,IAAAA,gCAAgC,EAAEF,mCAAmC,CAACH,WAAD;AAFhE,GAAP;AAID","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { createInfoPlistPlugin } from '../plugins/ios-plugins';\nimport { InfoPlist, InterfaceOrientation } from './IosConfig.types';\n\nexport const withOrientation = createInfoPlistPlugin(setOrientation, 'withOrientation');\n\nexport function getOrientation(config: Pick<ExpoConfig, 'orientation'>) {\n return config.orientation ?? null;\n}\n\nexport const PORTRAIT_ORIENTATIONS: InterfaceOrientation[] = [\n 'UIInterfaceOrientationPortrait',\n 'UIInterfaceOrientationPortraitUpsideDown',\n];\n\nexport const LANDSCAPE_ORIENTATIONS: InterfaceOrientation[] = [\n 'UIInterfaceOrientationLandscapeLeft',\n 'UIInterfaceOrientationLandscapeRight',\n];\n\nfunction getUISupportedInterfaceOrientations(orientation: string | null): InterfaceOrientation[] {\n if (orientation === 'portrait') {\n return PORTRAIT_ORIENTATIONS;\n } else if (orientation === 'landscape') {\n return LANDSCAPE_ORIENTATIONS;\n } else {\n return [...PORTRAIT_ORIENTATIONS, ...LANDSCAPE_ORIENTATIONS];\n }\n}\n\nexport function setOrientation(\n config: Pick<ExpoConfig, 'orientation'>,\n infoPlist: InfoPlist\n): InfoPlist {\n const orientation = getOrientation(config);\n\n return {\n ...infoPlist,\n UISupportedInterfaceOrientations: getUISupportedInterfaceOrientations(orientation),\n };\n}\n"],"file":"Orientation.js"}
|
package/build/ios/Paths.js
CHANGED
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.findSchemeNames = findSchemeNames;
|
|
7
|
+
exports.findSchemePaths = findSchemePaths;
|
|
8
|
+
exports.getAllEntitlementsPaths = getAllEntitlementsPaths;
|
|
9
|
+
exports.getAllInfoPlistPaths = getAllInfoPlistPaths;
|
|
10
|
+
exports.getAllPBXProjectPaths = getAllPBXProjectPaths;
|
|
11
|
+
exports.getAllXcodeProjectPaths = getAllXcodeProjectPaths;
|
|
12
|
+
exports.getAppDelegate = getAppDelegate;
|
|
7
13
|
exports.getAppDelegateFilePath = getAppDelegateFilePath;
|
|
14
|
+
exports.getAppDelegateHeaderFilePath = getAppDelegateHeaderFilePath;
|
|
8
15
|
exports.getAppDelegateObjcHeaderFilePath = getAppDelegateObjcHeaderFilePath;
|
|
16
|
+
exports.getEntitlementsPath = getEntitlementsPath;
|
|
17
|
+
exports.getExpoPlistPath = getExpoPlistPath;
|
|
9
18
|
exports.getFileInfo = getFileInfo;
|
|
10
|
-
exports.getAppDelegate = getAppDelegate;
|
|
11
|
-
exports.getSourceRoot = getSourceRoot;
|
|
12
|
-
exports.findSchemePaths = findSchemePaths;
|
|
13
|
-
exports.findSchemeNames = findSchemeNames;
|
|
14
|
-
exports.getAllXcodeProjectPaths = getAllXcodeProjectPaths;
|
|
15
|
-
exports.getXcodeProjectPath = getXcodeProjectPath;
|
|
16
|
-
exports.getAllPBXProjectPaths = getAllPBXProjectPaths;
|
|
17
|
-
exports.getPBXProjectPath = getPBXProjectPath;
|
|
18
|
-
exports.getAllInfoPlistPaths = getAllInfoPlistPaths;
|
|
19
19
|
exports.getInfoPlistPath = getInfoPlistPath;
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
20
|
+
exports.getPBXProjectPath = getPBXProjectPath;
|
|
21
|
+
exports.getSourceRoot = getSourceRoot;
|
|
22
22
|
exports.getSupportingPath = getSupportingPath;
|
|
23
|
-
exports.
|
|
23
|
+
exports.getXcodeProjectPath = getXcodeProjectPath;
|
|
24
24
|
|
|
25
25
|
function _fsExtra() {
|
|
26
26
|
const data = require("fs-extra");
|
|
@@ -194,7 +194,7 @@ function findSchemePaths(projectRoot) {
|
|
|
194
194
|
|
|
195
195
|
function findSchemeNames(projectRoot) {
|
|
196
196
|
const schemePaths = findSchemePaths(projectRoot);
|
|
197
|
-
return schemePaths.map(schemePath => path().
|
|
197
|
+
return schemePaths.map(schemePath => path().parse(schemePath).name);
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
function getAllXcodeProjectPaths(projectRoot) {
|
package/build/ios/Paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ios/Paths.ts"],"names":["ignoredPaths","getAppDelegateHeaderFilePath","projectRoot","using","extra","absolute","cwd","ignore","UnexpectedError","length","warnMultipleFiles","tag","fileName","getAppDelegateFilePath","getAppDelegateObjcHeaderFilePath","getLanguage","filePath","extension","path","extname","getFileInfo","normalize","contents","language","getAppDelegate","getSourceRoot","appDelegate","dirname","findSchemePaths","findSchemeNames","schemePaths","map","schemePath","basename","split","getAllXcodeProjectPaths","iosFolder","pbxprojPaths","filter","project","test","sort","value","join","getXcodeProjectPath","getAllPBXProjectPaths","projectPaths","paths","getPBXProjectPath","getAllInfoPlistPaths","a","b","getInfoPlistPath","getAllEntitlementsPaths","getEntitlementsPath","getSupportingPath","resolve","getExpoPlistPath","supportingPath","usingPath","relative","extraPaths","v","JSON","stringify"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;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AAjF;AACA,iCACG,SAAQO,GAAI,EADf,EAEG,kBAAiBC,QAAS,uBAAsB+C,SAAU,qBAAoBI,IAAI,CAACC,SAAL,CAC7EH,UAD6E,CAE7E,EAJJ;AAMD","sourcesContent":["import { pathExistsSync, readFileSync } from 'fs-extra';\nimport { sync as globSync } from 'glob';\nimport * as path from 'path';\n\nimport { UnexpectedError } from '../utils/errors';\nimport { addWarningIOS } from '../utils/warnings';\n\nconst ignoredPaths = ['**/@(Carthage|Pods|vendor|node_modules)/**'];\n\ninterface ProjectFile<L extends string = string> {\n path: string;\n language: L;\n contents: string;\n}\n\nexport type AppDelegateProjectFile = ProjectFile<'objc' | 'swift'>;\n\nexport function getAppDelegateHeaderFilePath(projectRoot: string): string {\n const [using, ...extra] = globSync('ios/*/AppDelegate.h', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n\n if (!using) {\n throw new UnexpectedError(\n `Could not locate a valid AppDelegate header at root: \"${projectRoot}\"`\n );\n }\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'app-delegate-header',\n fileName: 'AppDelegate',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nexport function getAppDelegateFilePath(projectRoot: string): string {\n const [using, ...extra] = globSync('ios/*/AppDelegate.@(m|swift)', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n\n if (!using) {\n throw new UnexpectedError(`Could not locate a valid AppDelegate at root: \"${projectRoot}\"`);\n }\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'app-delegate',\n fileName: 'AppDelegate',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nexport function getAppDelegateObjcHeaderFilePath(projectRoot: string): string {\n const [using, ...extra] = globSync('ios/*/AppDelegate.h', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n\n if (!using) {\n throw new UnexpectedError(`Could not locate a valid AppDelegate.h at root: \"${projectRoot}\"`);\n }\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'app-delegate-objc-header',\n fileName: 'AppDelegate.h',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nfunction getLanguage(filePath: string): 'objc' | 'swift' {\n const extension = path.extname(filePath);\n switch (extension) {\n case '.m':\n case '.h':\n return 'objc';\n case '.swift':\n return 'swift';\n default:\n throw new UnexpectedError(`Unexpected iOS file extension: ${extension}`);\n }\n}\n\nexport function getFileInfo(filePath: string) {\n return {\n path: path.normalize(filePath),\n contents: readFileSync(filePath, 'utf8'),\n language: getLanguage(filePath),\n };\n}\n\nexport function getAppDelegate(projectRoot: string): AppDelegateProjectFile {\n const filePath = getAppDelegateFilePath(projectRoot);\n return getFileInfo(filePath);\n}\n\nexport function getSourceRoot(projectRoot: string): string {\n const appDelegate = getAppDelegate(projectRoot);\n return path.dirname(appDelegate.path);\n}\n\nexport function findSchemePaths(projectRoot: string): string[] {\n return globSync('ios/*.xcodeproj/xcshareddata/xcschemes/*.xcscheme', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n}\n\nexport function findSchemeNames(projectRoot: string): string[] {\n const schemePaths = findSchemePaths(projectRoot);\n return schemePaths.map(schemePath => path.basename(schemePath).split('.')[0]);\n}\n\nexport function getAllXcodeProjectPaths(projectRoot: string): string[] {\n const iosFolder = 'ios';\n const pbxprojPaths = globSync('**/*.xcodeproj', { cwd: projectRoot, ignore: ignoredPaths })\n .filter(project => !/test|example|sample/i.test(project) || path.dirname(project) === iosFolder)\n .sort(project => (path.dirname(project) === iosFolder ? -1 : 1))\n // sort alphabetically to ensure this works the same across different devices (Fail in CI (linux) without this)\n .sort();\n\n if (!pbxprojPaths.length) {\n throw new UnexpectedError(\n `Failed to locate the ios/*.xcodeproj files relative to path \"${projectRoot}\".`\n );\n }\n return pbxprojPaths.map(value => path.join(projectRoot, value));\n}\n\n/**\n * Get the pbxproj for the given path\n */\nexport function getXcodeProjectPath(projectRoot: string): string {\n const [using, ...extra] = getAllXcodeProjectPaths(projectRoot);\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'xcodeproj',\n fileName: '*.xcodeproj',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nexport function getAllPBXProjectPaths(projectRoot: string): string[] {\n const projectPaths = getAllXcodeProjectPaths(projectRoot);\n const paths = projectPaths\n .map(value => path.join(value, 'project.pbxproj'))\n .filter(value => pathExistsSync(value));\n\n if (!paths.length) {\n throw new UnexpectedError(\n `Failed to locate the ios/*.xcodeproj/project.pbxproj files relative to path \"${projectRoot}\".`\n );\n }\n return paths;\n}\n\nexport function getPBXProjectPath(projectRoot: string): string {\n const [using, ...extra] = getAllPBXProjectPaths(projectRoot);\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'project-pbxproj',\n fileName: 'project.pbxproj',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nexport function getAllInfoPlistPaths(projectRoot: string): string[] {\n const paths = globSync('ios/*/Info.plist', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n }).sort(\n // longer name means more suffixes, we want the shortest possible one to be first.\n (a, b) => a.length - b.length\n );\n\n if (!paths.length) {\n throw new UnexpectedError(\n `Failed to locate Info.plist files relative to path \"${projectRoot}\".`\n );\n }\n return paths;\n}\n\nexport function getInfoPlistPath(projectRoot: string): string {\n const [using, ...extra] = getAllInfoPlistPaths(projectRoot);\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'info-plist',\n fileName: 'Info.plist',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nexport function getAllEntitlementsPaths(projectRoot: string): string[] {\n const paths = globSync('ios/*/*.entitlements', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n return paths;\n}\n\n/**\n * Get the entitlements file path if it exists.\n *\n * @param projectRoot\n */\nexport function getEntitlementsPath(projectRoot: string): string | null {\n const [using, ...extra] = getAllEntitlementsPaths(projectRoot);\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'entitlements',\n fileName: '*.entitlements',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using ?? null;\n}\n\nexport function getSupportingPath(projectRoot: string): string {\n return path.resolve(projectRoot, 'ios', path.basename(getSourceRoot(projectRoot)), 'Supporting');\n}\n\nexport function getExpoPlistPath(projectRoot: string): string {\n const supportingPath = getSupportingPath(projectRoot);\n return path.join(supportingPath, 'Expo.plist');\n}\n\nfunction warnMultipleFiles({\n tag,\n fileName,\n projectRoot,\n using,\n extra,\n}: {\n tag: string;\n fileName: string;\n projectRoot?: string;\n using: string;\n extra: string[];\n}) {\n const usingPath = projectRoot ? path.relative(projectRoot, using) : using;\n const extraPaths = projectRoot ? extra.map(v => path.relative(projectRoot, v)) : extra;\n addWarningIOS(\n `paths-${tag}`,\n `Found multiple ${fileName} file paths, using \"${usingPath}\". Ignored paths: ${JSON.stringify(\n extraPaths\n )}`\n );\n}\n"],"file":"Paths.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/ios/Paths.ts"],"names":["ignoredPaths","getAppDelegateHeaderFilePath","projectRoot","using","extra","absolute","cwd","ignore","UnexpectedError","length","warnMultipleFiles","tag","fileName","getAppDelegateFilePath","getAppDelegateObjcHeaderFilePath","getLanguage","filePath","extension","path","extname","getFileInfo","normalize","contents","language","getAppDelegate","getSourceRoot","appDelegate","dirname","findSchemePaths","findSchemeNames","schemePaths","map","schemePath","parse","name","getAllXcodeProjectPaths","iosFolder","pbxprojPaths","filter","project","test","sort","value","join","getXcodeProjectPath","getAllPBXProjectPaths","projectPaths","paths","getPBXProjectPath","getAllInfoPlistPaths","a","b","getInfoPlistPath","getAllEntitlementsPaths","getEntitlementsPath","getSupportingPath","resolve","basename","getExpoPlistPath","supportingPath","usingPath","relative","extraPaths","v","JSON","stringify"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AA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GAAmD3D,KAAjF;AACA,iCACG,SAAQO,GAAI,EADf,EAEG,kBAAiBC,QAAS,uBAAsBgD,SAAU,qBAAoBI,IAAI,CAACC,SAAL,CAC7EH,UAD6E,CAE7E,EAJJ;AAMD","sourcesContent":["import { pathExistsSync, readFileSync } from 'fs-extra';\nimport { sync as globSync } from 'glob';\nimport * as path from 'path';\n\nimport { UnexpectedError } from '../utils/errors';\nimport { addWarningIOS } from '../utils/warnings';\n\nconst ignoredPaths = ['**/@(Carthage|Pods|vendor|node_modules)/**'];\n\ninterface ProjectFile<L extends string = string> {\n path: string;\n language: L;\n contents: string;\n}\n\nexport type AppDelegateProjectFile = ProjectFile<'objc' | 'swift'>;\n\nexport function getAppDelegateHeaderFilePath(projectRoot: string): string {\n const [using, ...extra] = globSync('ios/*/AppDelegate.h', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n\n if (!using) {\n throw new UnexpectedError(\n `Could not locate a valid AppDelegate header at root: \"${projectRoot}\"`\n );\n }\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'app-delegate-header',\n fileName: 'AppDelegate',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nexport function getAppDelegateFilePath(projectRoot: string): string {\n const [using, ...extra] = globSync('ios/*/AppDelegate.@(m|swift)', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n\n if (!using) {\n throw new UnexpectedError(`Could not locate a valid AppDelegate at root: \"${projectRoot}\"`);\n }\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'app-delegate',\n fileName: 'AppDelegate',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nexport function getAppDelegateObjcHeaderFilePath(projectRoot: string): string {\n const [using, ...extra] = globSync('ios/*/AppDelegate.h', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n\n if (!using) {\n throw new UnexpectedError(`Could not locate a valid AppDelegate.h at root: \"${projectRoot}\"`);\n }\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'app-delegate-objc-header',\n fileName: 'AppDelegate.h',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nfunction getLanguage(filePath: string): 'objc' | 'swift' {\n const extension = path.extname(filePath);\n switch (extension) {\n case '.m':\n case '.h':\n return 'objc';\n case '.swift':\n return 'swift';\n default:\n throw new UnexpectedError(`Unexpected iOS file extension: ${extension}`);\n }\n}\n\nexport function getFileInfo(filePath: string) {\n return {\n path: path.normalize(filePath),\n contents: readFileSync(filePath, 'utf8'),\n language: getLanguage(filePath),\n };\n}\n\nexport function getAppDelegate(projectRoot: string): AppDelegateProjectFile {\n const filePath = getAppDelegateFilePath(projectRoot);\n return getFileInfo(filePath);\n}\n\nexport function getSourceRoot(projectRoot: string): string {\n const appDelegate = getAppDelegate(projectRoot);\n return path.dirname(appDelegate.path);\n}\n\nexport function findSchemePaths(projectRoot: string): string[] {\n return globSync('ios/*.xcodeproj/xcshareddata/xcschemes/*.xcscheme', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n}\n\nexport function findSchemeNames(projectRoot: string): string[] {\n const schemePaths = findSchemePaths(projectRoot);\n return schemePaths.map(schemePath => path.parse(schemePath).name);\n}\n\nexport function getAllXcodeProjectPaths(projectRoot: string): string[] {\n const iosFolder = 'ios';\n const pbxprojPaths = globSync('**/*.xcodeproj', { cwd: projectRoot, ignore: ignoredPaths })\n .filter(project => !/test|example|sample/i.test(project) || path.dirname(project) === iosFolder)\n .sort(project => (path.dirname(project) === iosFolder ? -1 : 1))\n // sort alphabetically to ensure this works the same across different devices (Fail in CI (linux) without this)\n .sort();\n\n if (!pbxprojPaths.length) {\n throw new UnexpectedError(\n `Failed to locate the ios/*.xcodeproj files relative to path \"${projectRoot}\".`\n );\n }\n return pbxprojPaths.map(value => path.join(projectRoot, value));\n}\n\n/**\n * Get the pbxproj for the given path\n */\nexport function getXcodeProjectPath(projectRoot: string): string {\n const [using, ...extra] = getAllXcodeProjectPaths(projectRoot);\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'xcodeproj',\n fileName: '*.xcodeproj',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nexport function getAllPBXProjectPaths(projectRoot: string): string[] {\n const projectPaths = getAllXcodeProjectPaths(projectRoot);\n const paths = projectPaths\n .map(value => path.join(value, 'project.pbxproj'))\n .filter(value => pathExistsSync(value));\n\n if (!paths.length) {\n throw new UnexpectedError(\n `Failed to locate the ios/*.xcodeproj/project.pbxproj files relative to path \"${projectRoot}\".`\n );\n }\n return paths;\n}\n\nexport function getPBXProjectPath(projectRoot: string): string {\n const [using, ...extra] = getAllPBXProjectPaths(projectRoot);\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'project-pbxproj',\n fileName: 'project.pbxproj',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nexport function getAllInfoPlistPaths(projectRoot: string): string[] {\n const paths = globSync('ios/*/Info.plist', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n }).sort(\n // longer name means more suffixes, we want the shortest possible one to be first.\n (a, b) => a.length - b.length\n );\n\n if (!paths.length) {\n throw new UnexpectedError(\n `Failed to locate Info.plist files relative to path \"${projectRoot}\".`\n );\n }\n return paths;\n}\n\nexport function getInfoPlistPath(projectRoot: string): string {\n const [using, ...extra] = getAllInfoPlistPaths(projectRoot);\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'info-plist',\n fileName: 'Info.plist',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using;\n}\n\nexport function getAllEntitlementsPaths(projectRoot: string): string[] {\n const paths = globSync('ios/*/*.entitlements', {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n return paths;\n}\n\n/**\n * Get the entitlements file path if it exists.\n *\n * @param projectRoot\n */\nexport function getEntitlementsPath(projectRoot: string): string | null {\n const [using, ...extra] = getAllEntitlementsPaths(projectRoot);\n\n if (extra.length) {\n warnMultipleFiles({\n tag: 'entitlements',\n fileName: '*.entitlements',\n projectRoot,\n using,\n extra,\n });\n }\n\n return using ?? null;\n}\n\nexport function getSupportingPath(projectRoot: string): string {\n return path.resolve(projectRoot, 'ios', path.basename(getSourceRoot(projectRoot)), 'Supporting');\n}\n\nexport function getExpoPlistPath(projectRoot: string): string {\n const supportingPath = getSupportingPath(projectRoot);\n return path.join(supportingPath, 'Expo.plist');\n}\n\nfunction warnMultipleFiles({\n tag,\n fileName,\n projectRoot,\n using,\n extra,\n}: {\n tag: string;\n fileName: string;\n projectRoot?: string;\n using: string;\n extra: string[];\n}) {\n const usingPath = projectRoot ? path.relative(projectRoot, using) : using;\n const extraPaths = projectRoot ? extra.map(v => path.relative(projectRoot, v)) : extra;\n addWarningIOS(\n `paths-${tag}`,\n `Found multiple ${fileName} file paths, using \"${usingPath}\". Ignored paths: ${JSON.stringify(\n extraPaths\n )}`\n );\n}\n"],"file":"Paths.js"}
|
package/build/ios/Permissions.js
CHANGED
|
@@ -28,7 +28,7 @@ function _iosPlugins() {
|
|
|
28
28
|
|
|
29
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
30
|
|
|
31
|
-
const debug = (0, _debug().default)('config-plugins:ios:permissions');
|
|
31
|
+
const debug = (0, _debug().default)('expo:config-plugins:ios:permissions');
|
|
32
32
|
|
|
33
33
|
function applyPermissions(defaults, permissions, infoPlist) {
|
|
34
34
|
const entries = Object.entries(defaults);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ios/Permissions.ts"],"names":["debug","applyPermissions","defaults","permissions","infoPlist","entries","Object","length","JSON","stringify","permission","description","createPermissionsPlugin","name","withIosPermissions","config","modResults","defineProperty","value"],"mappings":";;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAGA,MAAMA,KAAK,GAAG,sBAAM,
|
|
1
|
+
{"version":3,"sources":["../../src/ios/Permissions.ts"],"names":["debug","applyPermissions","defaults","permissions","infoPlist","entries","Object","length","JSON","stringify","permission","description","createPermissionsPlugin","name","withIosPermissions","config","modResults","defineProperty","value"],"mappings":";;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAGA,MAAMA,KAAK,GAAG,sBAAM,qCAAN,CAAd;;AAEO,SAASC,gBAAT,CACLC,QADK,EAELC,WAFK,EAGLC,SAHK,EAIM;AACX,QAAMC,OAAO,GAAGC,MAAM,CAACD,OAAP,CAAeH,QAAf,CAAhB;;AACA,MAAIG,OAAO,CAACE,MAAR,KAAmB,CAAvB,EAA0B;AACxBP,IAAAA,KAAK,CAAE,yBAAwBQ,IAAI,CAACC,SAAL,CAAeN,WAAf,CAA4B,EAAtD,CAAL;AACD;;AACD,OAAK,MAAM,CAACO,UAAD,EAAaC,WAAb,CAAX,IAAwCN,OAAxC,EAAiD;AAC/C,QAAIF,WAAW,CAACO,UAAD,CAAX,KAA4B,KAAhC,EAAuC;AACrCV,MAAAA,KAAK,CAAE,aAAYU,UAAW,GAAzB,CAAL;AACA,aAAON,SAAS,CAACM,UAAD,CAAhB;AACD,KAHD,MAGO;AACLN,MAAAA,SAAS,CAACM,UAAD,CAAT,GAAwBP,WAAW,CAACO,UAAD,CAAX,IAA2BN,SAAS,CAACM,UAAD,CAApC,IAAoDC,WAA5E;AACAX,MAAAA,KAAK,CAAE,YAAWU,UAAW,SAAQN,SAAS,CAACM,UAAD,CAAa,GAAtD,CAAL;AACD;AACF;;AACD,SAAON,SAAP;AACD;AAED;AACA;AACA;AACA;AACA;;;AACO,SAASQ,uBAAT,CAELV,QAFK,EAEeW,IAFf,EAE8B;AACnC,QAAMC,kBAAoF,GAAG,CAC3FC,MAD2F,EAE3FZ,WAF2F,KAI3F,iCAAcY,MAAd,EAAsB,MAAMA,MAAN,IAAgB;AACpCA,IAAAA,MAAM,CAACC,UAAP,GAAoBf,gBAAgB,CAACC,QAAD,EAAWC,WAAX,EAAwBY,MAAM,CAACC,UAA/B,CAApC;AACA,WAAOD,MAAP;AACD,GAHD,CAJF;;AAQA,MAAIF,IAAJ,EAAU;AACRP,IAAAA,MAAM,CAACW,cAAP,CAAsBH,kBAAtB,EAA0C,MAA1C,EAAkD;AAChDI,MAAAA,KAAK,EAAEL;AADyC,KAAlD;AAGD;;AACD,SAAOC,kBAAP;AACD","sourcesContent":["import Debug from 'debug';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withInfoPlist } from '../plugins/ios-plugins';\nimport { InfoPlist } from './IosConfig.types';\n\nconst debug = Debug('expo:config-plugins:ios:permissions');\n\nexport function applyPermissions<Defaults extends Record<string, string> = Record<string, string>>(\n defaults: Defaults,\n permissions: Partial<Record<keyof Defaults, string | false>>,\n infoPlist: InfoPlist\n): InfoPlist {\n const entries = Object.entries(defaults);\n if (entries.length === 0) {\n debug(`No defaults provided: ${JSON.stringify(permissions)}`);\n }\n for (const [permission, description] of entries) {\n if (permissions[permission] === false) {\n debug(`Deleting \"${permission}\"`);\n delete infoPlist[permission];\n } else {\n infoPlist[permission] = permissions[permission] || infoPlist[permission] || description;\n debug(`Setting \"${permission}\" to \"${infoPlist[permission]}\"`);\n }\n }\n return infoPlist;\n}\n\n/**\n * Helper method for creating mods to apply default permissions.\n *\n * @param action\n */\nexport function createPermissionsPlugin<\n Defaults extends Record<string, string> = Record<string, string>\n>(defaults: Defaults, name?: string) {\n const withIosPermissions: ConfigPlugin<Record<keyof Defaults, string | undefined | false>> = (\n config,\n permissions\n ) =>\n withInfoPlist(config, async config => {\n config.modResults = applyPermissions(defaults, permissions, config.modResults);\n return config;\n });\n if (name) {\n Object.defineProperty(withIosPermissions, 'name', {\n value: name,\n });\n }\n return withIosPermissions;\n}\n"],"file":"Permissions.js"}
|
package/build/ios/Scheme.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getScheme = getScheme;
|
|
7
|
-
exports.setScheme = setScheme;
|
|
8
6
|
exports.appendScheme = appendScheme;
|
|
9
|
-
exports.
|
|
10
|
-
exports.hasScheme = hasScheme;
|
|
7
|
+
exports.getScheme = getScheme;
|
|
11
8
|
exports.getSchemesFromPlist = getSchemesFromPlist;
|
|
9
|
+
exports.hasScheme = hasScheme;
|
|
10
|
+
exports.removeScheme = removeScheme;
|
|
11
|
+
exports.setScheme = setScheme;
|
|
12
12
|
exports.withScheme = void 0;
|
|
13
13
|
|
|
14
14
|
function _iosPlugins() {
|
package/build/ios/Swift.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.createBridgingHeaderFile = createBridgingHeaderFile;
|
|
6
7
|
exports.ensureSwiftBridgingHeaderSetup = ensureSwiftBridgingHeaderSetup;
|
|
7
8
|
exports.getDesignatedSwiftBridgingHeaderFileReference = getDesignatedSwiftBridgingHeaderFileReference;
|
|
8
9
|
exports.linkBridgingHeaderFile = linkBridgingHeaderFile;
|
|
9
|
-
exports.
|
|
10
|
-
exports.withNoopSwiftFile = exports.withSwiftBridgingHeader = void 0;
|
|
10
|
+
exports.withSwiftBridgingHeader = exports.withNoopSwiftFile = void 0;
|
|
11
11
|
|
|
12
12
|
function _fsExtra() {
|
|
13
13
|
const data = _interopRequireDefault(require("fs-extra"));
|
package/build/ios/Target.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.TargetType = void 0;
|
|
7
7
|
exports.findApplicationTargetWithDependenciesAsync = findApplicationTargetWithDependenciesAsync;
|
|
8
|
-
exports.isTargetOfType = isTargetOfType;
|
|
9
|
-
exports.getNativeTargets = getNativeTargets;
|
|
10
|
-
exports.findSignableTargets = findSignableTargets;
|
|
11
8
|
exports.findFirstNativeTarget = findFirstNativeTarget;
|
|
12
9
|
exports.findNativeTargetByName = findNativeTargetByName;
|
|
13
|
-
exports.
|
|
10
|
+
exports.findSignableTargets = findSignableTargets;
|
|
11
|
+
exports.getNativeTargets = getNativeTargets;
|
|
12
|
+
exports.getXCBuildConfigurationFromPbxproj = getXCBuildConfigurationFromPbxproj;
|
|
13
|
+
exports.isTargetOfType = isTargetOfType;
|
|
14
14
|
|
|
15
15
|
function _BuildScheme() {
|
|
16
16
|
const data = require("./BuildScheme");
|
package/build/ios/Updates.d.ts
CHANGED
|
@@ -12,11 +12,6 @@ export declare enum Config {
|
|
|
12
12
|
RELEASE_CHANNEL = "EXUpdatesReleaseChannel",
|
|
13
13
|
UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY = "EXUpdatesRequestHeaders"
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* runtime version maybe null in projects using classic updates. In that
|
|
17
|
-
* case we use SDK version
|
|
18
|
-
*/
|
|
19
|
-
export declare function getRuntimeVersionNullable(config: Pick<ExpoConfigUpdates, 'runtimeVersion'>): string | null;
|
|
20
15
|
export declare function getSDKVersion(config: Pick<ExpoConfigUpdates, 'sdkVersion'>): string | null;
|
|
21
16
|
export declare function getUpdatesEnabled(config: Pick<ExpoConfigUpdates, 'updates'>): boolean;
|
|
22
17
|
export declare function getUpdatesTimeout(config: Pick<ExpoConfigUpdates, 'updates'>): number;
|
package/build/ios/Updates.js
CHANGED
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.Config = void 0;
|
|
7
|
+
exports.ensureBundleReactNativePhaseContainsConfigurationScript = ensureBundleReactNativePhaseContainsConfigurationScript;
|
|
8
|
+
exports.getBundleReactNativePhase = getBundleReactNativePhase;
|
|
7
9
|
exports.getSDKVersion = getSDKVersion;
|
|
10
|
+
exports.getUpdatesCheckOnLaunch = getUpdatesCheckOnLaunch;
|
|
8
11
|
exports.getUpdatesEnabled = getUpdatesEnabled;
|
|
9
12
|
exports.getUpdatesTimeout = getUpdatesTimeout;
|
|
10
|
-
exports.getUpdatesCheckOnLaunch = getUpdatesCheckOnLaunch;
|
|
11
|
-
exports.setUpdatesConfig = setUpdatesConfig;
|
|
12
|
-
exports.setVersionsConfig = setVersionsConfig;
|
|
13
|
-
exports.getBundleReactNativePhase = getBundleReactNativePhase;
|
|
14
|
-
exports.ensureBundleReactNativePhaseContainsConfigurationScript = ensureBundleReactNativePhaseContainsConfigurationScript;
|
|
15
|
-
exports.isShellScriptBuildPhaseConfigured = isShellScriptBuildPhaseConfigured;
|
|
16
13
|
exports.isPlistConfigurationSet = isPlistConfigurationSet;
|
|
17
14
|
exports.isPlistConfigurationSynced = isPlistConfigurationSynced;
|
|
18
15
|
exports.isPlistVersionConfigurationSynced = isPlistVersionConfigurationSynced;
|
|
19
|
-
exports.
|
|
16
|
+
exports.isShellScriptBuildPhaseConfigured = isShellScriptBuildPhaseConfigured;
|
|
17
|
+
exports.setUpdatesConfig = setUpdatesConfig;
|
|
18
|
+
exports.setVersionsConfig = setVersionsConfig;
|
|
19
|
+
exports.withUpdates = void 0;
|
|
20
20
|
|
|
21
21
|
function path() {
|
|
22
22
|
const data = _interopRequireWildcard(require("path"));
|
|
@@ -66,11 +66,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
66
66
|
|
|
67
67
|
const CREATE_MANIFEST_IOS_PATH = 'expo-updates/scripts/create-manifest-ios.sh';
|
|
68
68
|
let Config;
|
|
69
|
-
/**
|
|
70
|
-
* runtime version maybe null in projects using classic updates. In that
|
|
71
|
-
* case we use SDK version
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
69
|
exports.Config = Config;
|
|
75
70
|
|
|
76
71
|
(function (Config) {
|
|
@@ -84,14 +79,6 @@ exports.Config = Config;
|
|
|
84
79
|
Config["UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY"] = "EXUpdatesRequestHeaders";
|
|
85
80
|
})(Config || (exports.Config = Config = {}));
|
|
86
81
|
|
|
87
|
-
function getRuntimeVersionNullable(config) {
|
|
88
|
-
try {
|
|
89
|
-
return (0, _Updates().getRuntimeVersion)(config, 'ios');
|
|
90
|
-
} catch (e) {
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
82
|
function getSDKVersion(config) {
|
|
96
83
|
return typeof config.sdkVersion === 'string' ? config.sdkVersion : null;
|
|
97
84
|
}
|
|
@@ -151,13 +138,17 @@ function setUpdatesConfig(config, expoPlist, username) {
|
|
|
151
138
|
function setVersionsConfig(config, expoPlist) {
|
|
152
139
|
const newExpoPlist = { ...expoPlist
|
|
153
140
|
};
|
|
154
|
-
const runtimeVersion = getRuntimeVersionNullable(config);
|
|
141
|
+
const runtimeVersion = (0, _Updates().getRuntimeVersionNullable)(config, 'ios');
|
|
155
142
|
const sdkVersion = getSDKVersion(config);
|
|
156
143
|
|
|
157
144
|
if (runtimeVersion) {
|
|
158
145
|
delete newExpoPlist[Config.SDK_VERSION];
|
|
159
146
|
newExpoPlist[Config.RUNTIME_VERSION] = runtimeVersion;
|
|
160
147
|
} else if (sdkVersion) {
|
|
148
|
+
/**
|
|
149
|
+
* runtime version maybe null in projects using classic updates. In that
|
|
150
|
+
* case we use SDK version
|
|
151
|
+
*/
|
|
161
152
|
delete newExpoPlist[Config.RUNTIME_VERSION];
|
|
162
153
|
newExpoPlist[Config.SDK_VERSION] = sdkVersion;
|
|
163
154
|
} else {
|
|
@@ -224,7 +215,7 @@ function isPlistConfigurationSynced(config, expoPlist, username) {
|
|
|
224
215
|
function isPlistVersionConfigurationSynced(config, expoPlist) {
|
|
225
216
|
var _expoPlist$EXUpdatesR, _expoPlist$EXUpdatesS;
|
|
226
217
|
|
|
227
|
-
const expectedRuntimeVersion = getRuntimeVersionNullable(config);
|
|
218
|
+
const expectedRuntimeVersion = (0, _Updates().getRuntimeVersionNullable)(config, 'ios');
|
|
228
219
|
const expectedSdkVersion = getSDKVersion(config);
|
|
229
220
|
const currentRuntimeVersion = (_expoPlist$EXUpdatesR = expoPlist.EXUpdatesRuntimeVersion) !== null && _expoPlist$EXUpdatesR !== void 0 ? _expoPlist$EXUpdatesR : null;
|
|
230
221
|
const currentSdkVersion = (_expoPlist$EXUpdatesS = expoPlist.EXUpdatesSDKVersion) !== null && _expoPlist$EXUpdatesS !== void 0 ? _expoPlist$EXUpdatesS : null;
|