@expo/config-plugins 4.1.1 → 4.1.4

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.
Files changed (56) hide show
  1. package/build/android/BuildProperties.d.ts +28 -0
  2. package/build/android/BuildProperties.js +96 -0
  3. package/build/android/BuildProperties.js.map +1 -0
  4. package/build/android/Manifest.d.ts +7 -0
  5. package/build/android/Manifest.js +36 -0
  6. package/build/android/Manifest.js.map +1 -1
  7. package/build/android/Package.js +1 -1
  8. package/build/android/Package.js.map +1 -1
  9. package/build/android/Permissions.d.ts +3 -1
  10. package/build/android/Permissions.js +42 -28
  11. package/build/android/Permissions.js.map +1 -1
  12. package/build/android/codeMod.js +1 -1
  13. package/build/android/codeMod.js.map +1 -1
  14. package/build/android/index.d.ts +2 -2
  15. package/build/android/index.js +18 -18
  16. package/build/android/index.js.map +1 -1
  17. package/build/ios/BuildProperties.d.ts +27 -0
  18. package/build/ios/BuildProperties.js +83 -0
  19. package/build/ios/BuildProperties.js.map +1 -0
  20. package/build/ios/BuildScheme.js +6 -3
  21. package/build/ios/BuildScheme.js.map +1 -1
  22. package/build/ios/Entitlements.d.ts +5 -1
  23. package/build/ios/Entitlements.js +57 -58
  24. package/build/ios/Entitlements.js.map +1 -1
  25. package/build/ios/Locales.js +1 -1
  26. package/build/ios/Locales.js.map +1 -1
  27. package/build/ios/Paths.d.ts +1 -3
  28. package/build/ios/Paths.js +12 -16
  29. package/build/ios/Paths.js.map +1 -1
  30. package/build/ios/Target.d.ts +1 -0
  31. package/build/ios/Target.js +11 -1
  32. package/build/ios/Target.js.map +1 -1
  33. package/build/ios/index.d.ts +2 -2
  34. package/build/ios/index.js +19 -19
  35. package/build/ios/index.js.map +1 -1
  36. package/build/ios/utils/Xcodeproj.d.ts +2 -1
  37. package/build/ios/utils/Xcodeproj.js +4 -1
  38. package/build/ios/utils/Xcodeproj.js.map +1 -1
  39. package/build/plugins/ios-plugins.d.ts +2 -2
  40. package/build/plugins/ios-plugins.js.map +1 -1
  41. package/build/plugins/withIosBaseMods.js +27 -7
  42. package/build/plugins/withIosBaseMods.js.map +1 -1
  43. package/build/utils/BuildProperties.types.d.ts +25 -0
  44. package/build/utils/BuildProperties.types.js +2 -0
  45. package/build/utils/BuildProperties.types.js.map +1 -0
  46. package/build/utils/modules.js +1 -1
  47. package/build/utils/modules.js.map +1 -1
  48. package/build/utils/versions.js +2 -2
  49. package/build/utils/versions.js.map +1 -1
  50. package/package.json +3 -3
  51. package/build/android/JsEngine.d.ts +0 -8
  52. package/build/android/JsEngine.js +0 -59
  53. package/build/android/JsEngine.js.map +0 -1
  54. package/build/ios/JsEngine.d.ts +0 -8
  55. package/build/ios/JsEngine.js +0 -47
  56. package/build/ios/JsEngine.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/android/codeMod.ts"],"names":["findNewInstanceCodeBlock","contents","classDeclaration","language","isJava","start","indexOf","search","RegExp","end","nextBrace","isAnonymousClass","substring","match","code","appendContentsInsideDeclarationBlock","srcContents","declaration","insertion","Error","addImports","source","imports","lines","split","lineIndexWithPackageDeclaration","findIndex","line","javaImport","includes","importStatement","splice","join"],"mappings":";;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,wBAAT,CACLC,QADK,EAELC,gBAFK,EAGLC,QAHK,EAIa;AAClB,QAAMC,MAAM,GAAGD,QAAQ,KAAK,MAA5B;AACA,MAAIE,KAAK,GAAGD,MAAM,GACdH,QAAQ,CAACK,OAAT,CAAkB,QAAOJ,gBAAiB,GAA1C,CADc,GAEdD,QAAQ,CAACM,MAAT,CAAgB,IAAIC,MAAJ,CAAY,sBAAqBN,gBAAiB,KAAlD,CAAhB,CAFJ;;AAGA,MAAIG,KAAK,GAAG,CAAZ,EAAe;AACb,WAAO,IAAP;AACD,GAPiB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AuDlB,MAAvD,EAAgF;AACrF,QAAMmB,KAAK,GAAGF,MAAM,CAACG,KAAP,CAAa,IAAb,CAAd;AACA,QAAMC,+BAA+B,GAAGF,KAAK,CAACG,SAAN,CAAgBC,IAAI,IAAIA,IAAI,CAACd,KAAL,CAAW,gBAAX,CAAxB,CAAxC;;AACA,OAAK,MAAMe,UAAX,IAAyBN,OAAzB,EAAkC;AAChC,QAAI,CAACD,MAAM,CAACQ,QAAP,CAAgBD,UAAhB,CAAL,EAAkC;AAChC,YAAME,eAAe,GAAI,UAASF,UAAW,GAAExB,MAAM,GAAG,GAAH,GAAS,EAAG,EAAjE;AACAmB,MAAAA,KAAK,CAACQ,MAAN,CAAaN,+BAA+B,GAAG,CAA/C,EAAkD,CAAlD,EAAqDK,eAArD;AACD;AACF;;AACD,SAAOP,KAAK,CAACS,IAAN,CAAW,IAAX,CAAP;AACD","sourcesContent":["import { CodeBlock, insertContentsAtOffset } from '../utils/commonCodeMod';\nimport { findMatchingBracketPosition } from '../utils/matchBrackets';\n\n/**\n * Find java or kotlin new class instance code block\n *\n * @param contents source contents\n * @param classDeclaration class declaration or just a class name\n * @param language 'java' | 'kt'\n * @returns `CodeBlock` for start/end offset and code block contents\n */\nexport function findNewInstanceCodeBlock(\n contents: string,\n classDeclaration: string,\n language: 'java' | 'kt'\n): CodeBlock | null {\n const isJava = language === 'java';\n let start = isJava\n ? contents.indexOf(` new ${classDeclaration}(`)\n : contents.search(new RegExp(` (object\\\\s*:\\\\s*)?${classDeclaration}\\\\(`));\n if (start < 0) {\n return null;\n }\n // `+ 1` for the prefix space\n start += 1;\n let end = findMatchingBracketPosition(contents, '(', start);\n\n // For anonymous class, should search further to the {} block.\n // ```java\n // new Foo() {\n // @Override\n // protected void interfaceMethod {}\n // };\n // ```\n //\n // ```kotlin\n // object : Foo() {\n // override fun interfaceMethod {}\n // }\n // ```\n const nextBrace = contents.indexOf('{', end + 1);\n const isAnonymousClass =\n nextBrace >= end && !!contents.substring(end + 1, nextBrace).match(/^\\s*$/m);\n if (isAnonymousClass) {\n end = findMatchingBracketPosition(contents, '{', end);\n }\n\n return {\n start,\n end,\n code: contents.substring(start, end + 1),\n };\n}\n\n/**\n * Append contents to the end of code declaration block, support class or method declarations.\n *\n * @param srcContents source contents\n * @param declaration class declaration or method declaration\n * @param insertion code to append\n * @returns updated contents\n */\nexport function appendContentsInsideDeclarationBlock(\n srcContents: string,\n declaration: string,\n insertion: string\n): string {\n const start = srcContents.search(new RegExp(`\\\\s*${declaration}.*?[\\\\(\\\\{]`));\n if (start < 0) {\n throw new Error(`Unable to find code block - declaration[${declaration}]`);\n }\n const end = findMatchingBracketPosition(srcContents, '{', start);\n return insertContentsAtOffset(srcContents, insertion, end);\n}\n\nexport function addImports(source: string, imports: string[], isJava: boolean): string {\n const lines = source.split('\\n');\n const lineIndexWithPackageDeclaration = lines.findIndex(line => line.match(/^package .*;?$/));\n for (const javaImport of imports) {\n if (!source.includes(javaImport)) {\n const importStatement = `import ${javaImport}${isJava ? ';' : ''}`;\n lines.splice(lineIndexWithPackageDeclaration + 1, 0, importStatement);\n }\n }\n return lines.join('\\n');\n}\n"],"file":"codeMod.js"}
1
+ {"version":3,"sources":["../../src/android/codeMod.ts"],"names":["findNewInstanceCodeBlock","contents","classDeclaration","language","isJava","start","indexOf","search","RegExp","end","nextBrace","isAnonymousClass","substring","match","code","appendContentsInsideDeclarationBlock","srcContents","declaration","insertion","Error","addImports","source","imports","lines","split","lineIndexWithPackageDeclaration","findIndex","line","javaImport","includes","importStatement","splice","join"],"mappings":";;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,wBAAT,CACLC,QADK,EAELC,gBAFK,EAGLC,QAHK,EAIa;AAClB,QAAMC,MAAM,GAAGD,QAAQ,KAAK,MAA5B;AACA,MAAIE,KAAK,GAAGD,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A0CF,WAAY,GAAjE,CAAN;AACD;;AACD,QAAMR,GAAG,GAAG,kDAA4BO,WAA5B,EAAyC,GAAzC,EAA8CX,KAA9C,CAAZ;AACA,SAAO,6CAAuBW,WAAvB,EAAoCE,SAApC,EAA+CT,GAA/C,CAAP;AACD;;AAEM,SAASW,UAAT,CAAoBC,MAApB,EAAoCC,OAApC,EAAuDlB,MAAvD,EAAgF;AACrF,QAAMmB,KAAK,GAAGF,MAAM,CAACG,KAAP,CAAa,IAAb,CAAd;AACA,QAAMC,+BAA+B,GAAGF,KAAK,CAACG,SAAN,CAAgBC,IAAI,IAAIA,IAAI,CAACd,KAAL,CAAW,gBAAX,CAAxB,CAAxC;;AACA,OAAK,MAAMe,UAAX,IAAyBN,OAAzB,EAAkC;AAChC,QAAI,CAACD,MAAM,CAACQ,QAAP,CAAgBD,UAAhB,CAAL,EAAkC;AAChC,YAAME,eAAe,GAAI,UAASF,UAAW,GAAExB,MAAM,GAAG,GAAH,GAAS,EAAG,EAAjE;AACAmB,MAAAA,KAAK,CAACQ,MAAN,CAAaN,+BAA+B,GAAG,CAA/C,EAAkD,CAAlD,EAAqDK,eAArD;AACD;AACF;;AACD,SAAOP,KAAK,CAACS,IAAN,CAAW,IAAX,CAAP;AACD","sourcesContent":["import { CodeBlock, insertContentsAtOffset } from '../utils/commonCodeMod';\nimport { findMatchingBracketPosition } from '../utils/matchBrackets';\n\n/**\n * Find java or kotlin new class instance code block\n *\n * @param contents source contents\n * @param classDeclaration class declaration or just a class name\n * @param language 'java' | 'kt'\n * @returns `CodeBlock` for start/end offset and code block contents\n */\nexport function findNewInstanceCodeBlock(\n contents: string,\n classDeclaration: string,\n language: 'java' | 'kt'\n): CodeBlock | null {\n const isJava = language === 'java';\n let start = isJava\n ? contents.indexOf(` new ${classDeclaration}(`)\n : contents.search(new RegExp(` (object\\\\s*:\\\\s*)?${classDeclaration}\\\\(`));\n if (start < 0) {\n return null;\n }\n // `+ 1` for the prefix space\n start += 1;\n let end = findMatchingBracketPosition(contents, '(', start);\n\n // For anonymous class, should search further to the {} block.\n // ```java\n // new Foo() {\n // @Override\n // protected void interfaceMethod {}\n // };\n // ```\n //\n // ```kotlin\n // object : Foo() {\n // override fun interfaceMethod {}\n // }\n // ```\n const nextBrace = contents.indexOf('{', end + 1);\n const isAnonymousClass =\n nextBrace >= end && !!contents.substring(end + 1, nextBrace).match(/^\\s*$/);\n if (isAnonymousClass) {\n end = findMatchingBracketPosition(contents, '{', end);\n }\n\n return {\n start,\n end,\n code: contents.substring(start, end + 1),\n };\n}\n\n/**\n * Append contents to the end of code declaration block, support class or method declarations.\n *\n * @param srcContents source contents\n * @param declaration class declaration or method declaration\n * @param insertion code to append\n * @returns updated contents\n */\nexport function appendContentsInsideDeclarationBlock(\n srcContents: string,\n declaration: string,\n insertion: string\n): string {\n const start = srcContents.search(new RegExp(`\\\\s*${declaration}.*?[\\\\(\\\\{]`));\n if (start < 0) {\n throw new Error(`Unable to find code block - declaration[${declaration}]`);\n }\n const end = findMatchingBracketPosition(srcContents, '{', start);\n return insertContentsAtOffset(srcContents, insertion, end);\n}\n\nexport function addImports(source: string, imports: string[], isJava: boolean): string {\n const lines = source.split('\\n');\n const lineIndexWithPackageDeclaration = lines.findIndex(line => line.match(/^package .*;?$/));\n for (const javaImport of imports) {\n if (!source.includes(javaImport)) {\n const importStatement = `import ${javaImport}${isJava ? ';' : ''}`;\n lines.splice(lineIndexWithPackageDeclaration + 1, 0, importStatement);\n }\n }\n return lines.join('\\n');\n}\n"],"file":"codeMod.js"}
@@ -1,10 +1,10 @@
1
1
  import * as AllowBackup from './AllowBackup';
2
+ import * as BuildProperties from './BuildProperties';
2
3
  import * as Colors from './Colors';
3
4
  import * as EasBuild from './EasBuild';
4
5
  import * as GoogleMapsApiKey from './GoogleMapsApiKey';
5
6
  import * as GoogleServices from './GoogleServices';
6
7
  import * as IntentFilters from './IntentFilters';
7
- import * as JsEngine from './JsEngine';
8
8
  import * as Manifest from './Manifest';
9
9
  import * as Name from './Name';
10
10
  import * as Orientation from './Orientation';
@@ -22,4 +22,4 @@ import * as Updates from './Updates';
22
22
  import * as Version from './Version';
23
23
  import * as WindowSoftInputMode from './WindowSoftInputMode';
24
24
  export { Manifest, Colors, Paths, Permissions, Properties, Resources, Scheme, Strings, Styles };
25
- export { AllowBackup, EasBuild, GoogleMapsApiKey, GoogleServices, IntentFilters, Name, Orientation, Package, PrimaryColor, StatusBar, Updates, Version, JsEngine, WindowSoftInputMode, };
25
+ export { AllowBackup, BuildProperties, EasBuild, GoogleMapsApiKey, GoogleServices, IntentFilters, Name, Orientation, Package, PrimaryColor, StatusBar, Updates, Version, WindowSoftInputMode, };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WindowSoftInputMode = exports.Version = exports.Updates = exports.Styles = exports.Strings = exports.StatusBar = exports.Scheme = exports.Resources = exports.Properties = exports.PrimaryColor = exports.Permissions = exports.Paths = exports.Package = exports.Orientation = exports.Name = exports.Manifest = exports.JsEngine = exports.IntentFilters = exports.GoogleServices = exports.GoogleMapsApiKey = exports.EasBuild = exports.Colors = exports.AllowBackup = void 0;
6
+ exports.WindowSoftInputMode = exports.Version = exports.Updates = exports.Styles = exports.Strings = exports.StatusBar = exports.Scheme = exports.Resources = exports.Properties = exports.PrimaryColor = exports.Permissions = exports.Paths = exports.Package = exports.Orientation = exports.Name = exports.Manifest = exports.IntentFilters = exports.GoogleServices = exports.GoogleMapsApiKey = exports.EasBuild = exports.Colors = exports.BuildProperties = exports.AllowBackup = void 0;
7
7
 
8
8
  function AllowBackup() {
9
9
  const data = _interopRequireWildcard(require("./AllowBackup"));
@@ -22,6 +22,23 @@ Object.defineProperty(exports, "AllowBackup", {
22
22
  }
23
23
  });
24
24
 
25
+ function BuildProperties() {
26
+ const data = _interopRequireWildcard(require("./BuildProperties"));
27
+
28
+ BuildProperties = function () {
29
+ return data;
30
+ };
31
+
32
+ return data;
33
+ }
34
+
35
+ Object.defineProperty(exports, "BuildProperties", {
36
+ enumerable: true,
37
+ get: function () {
38
+ return BuildProperties();
39
+ }
40
+ });
41
+
25
42
  function Colors() {
26
43
  const data = _interopRequireWildcard(require("./Colors"));
27
44
 
@@ -107,23 +124,6 @@ Object.defineProperty(exports, "IntentFilters", {
107
124
  }
108
125
  });
109
126
 
110
- function JsEngine() {
111
- const data = _interopRequireWildcard(require("./JsEngine"));
112
-
113
- JsEngine = function () {
114
- return data;
115
- };
116
-
117
- return data;
118
- }
119
-
120
- Object.defineProperty(exports, "JsEngine", {
121
- enumerable: true,
122
- get: function () {
123
- return JsEngine();
124
- }
125
- });
126
-
127
127
  function Manifest() {
128
128
  const data = _interopRequireWildcard(require("./Manifest"));
129
129
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/android/index.ts"],"names":[],"mappings":";;;;;;;AAAA;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;;;;;;;;;AACA;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;;;;;;;;;AACA;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;;;;;;;;;AACA;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;;;;;;;;;AACA;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;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA","sourcesContent":["import * as AllowBackup from './AllowBackup';\nimport * as Colors from './Colors';\nimport * as EasBuild from './EasBuild';\nimport * as GoogleMapsApiKey from './GoogleMapsApiKey';\nimport * as GoogleServices from './GoogleServices';\nimport * as IntentFilters from './IntentFilters';\nimport * as JsEngine from './JsEngine';\nimport * as Manifest from './Manifest';\nimport * as Name from './Name';\nimport * as Orientation from './Orientation';\nimport * as Package from './Package';\nimport * as Paths from './Paths';\nimport * as Permissions from './Permissions';\nimport * as PrimaryColor from './PrimaryColor';\nimport * as Properties from './Properties';\nimport * as Resources from './Resources';\nimport * as Scheme from './Scheme';\nimport * as StatusBar from './StatusBar';\nimport * as Strings from './Strings';\nimport * as Styles from './Styles';\nimport * as Updates from './Updates';\nimport * as Version from './Version';\nimport * as WindowSoftInputMode from './WindowSoftInputMode';\n\nexport { Manifest, Colors, Paths, Permissions, Properties, Resources, Scheme, Strings, Styles };\n\nexport {\n AllowBackup,\n EasBuild,\n GoogleMapsApiKey,\n GoogleServices,\n IntentFilters,\n Name,\n Orientation,\n Package,\n PrimaryColor,\n StatusBar,\n Updates,\n Version,\n JsEngine,\n WindowSoftInputMode,\n};\n"],"file":"index.js"}
1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AA;AAAA;AAAA;;AAAA;AAAA","sourcesContent":["import * as AllowBackup from './AllowBackup';\nimport * as BuildProperties from './BuildProperties';\nimport * as Colors from './Colors';\nimport * as EasBuild from './EasBuild';\nimport * as GoogleMapsApiKey from './GoogleMapsApiKey';\nimport * as GoogleServices from './GoogleServices';\nimport * as IntentFilters from './IntentFilters';\nimport * as Manifest from './Manifest';\nimport * as Name from './Name';\nimport * as Orientation from './Orientation';\nimport * as Package from './Package';\nimport * as Paths from './Paths';\nimport * as Permissions from './Permissions';\nimport * as PrimaryColor from './PrimaryColor';\nimport * as Properties from './Properties';\nimport * as Resources from './Resources';\nimport * as Scheme from './Scheme';\nimport * as StatusBar from './StatusBar';\nimport * as Strings from './Strings';\nimport * as Styles from './Styles';\nimport * as Updates from './Updates';\nimport * as Version from './Version';\nimport * as WindowSoftInputMode from './WindowSoftInputMode';\n\nexport { Manifest, Colors, Paths, Permissions, Properties, Resources, Scheme, Strings, Styles };\n\nexport {\n AllowBackup,\n BuildProperties,\n EasBuild,\n GoogleMapsApiKey,\n GoogleServices,\n IntentFilters,\n Name,\n Orientation,\n Package,\n PrimaryColor,\n StatusBar,\n Updates,\n Version,\n WindowSoftInputMode,\n};\n"],"file":"index.js"}
@@ -0,0 +1,27 @@
1
+ import type { ExpoConfig } from '@expo/config-types';
2
+ import type { ConfigPlugin } from '../Plugin.types';
3
+ import { BuildPropertiesConfig, ConfigToPropertyRuleType } from '../utils/BuildProperties.types';
4
+ /**
5
+ * Creates a `withPodfileProperties` config-plugin based on given config to property mapping rules.
6
+ *
7
+ * The factory supports two modes from generic type inference
8
+ * ```ts
9
+ * // config-plugin without `props`, it will implicitly use the expo config as source config.
10
+ * createBuildPodfilePropsConfigPlugin<ExpoConfig>(): ConfigPlugin<void>;
11
+ *
12
+ * // config-plugin with a parameter `props: CustomType`, it will use the `props` as source config.
13
+ * createBuildPodfilePropsConfigPlugin<CustomType>(): ConfigPlugin<CustomType>;
14
+ * ```
15
+ *
16
+ * @param configToPropertyRules config to property mapping rules
17
+ * @param name the config plugin name
18
+ */
19
+ export declare function createBuildPodfilePropsConfigPlugin<SourceConfigType extends BuildPropertiesConfig>(configToPropertyRules: ConfigToPropertyRuleType<SourceConfigType>[], name?: string): ConfigPlugin<SourceConfigType extends ExpoConfig ? void : SourceConfigType>;
20
+ /**
21
+ * A config-plugin to update `ios/Podfile.properties.json` from the `jsEngine` in expo config
22
+ */
23
+ export declare const withJsEnginePodfileProps: ConfigPlugin<void>;
24
+ export declare function updateIosBuildPropertiesFromConfig<SourceConfigType extends BuildPropertiesConfig>(config: SourceConfigType, podfileProperties: Record<string, string>, configToPropertyRules: ConfigToPropertyRuleType<SourceConfigType>[]): Record<string, string>;
25
+ export declare function updateIosBuildProperty(podfileProperties: Record<string, string>, name: string, value: string | null | undefined, options?: {
26
+ removePropWhenValueIsNull?: boolean;
27
+ }): Record<string, string>;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createBuildPodfilePropsConfigPlugin = createBuildPodfilePropsConfigPlugin;
7
+ exports.updateIosBuildPropertiesFromConfig = updateIosBuildPropertiesFromConfig;
8
+ exports.updateIosBuildProperty = updateIosBuildProperty;
9
+ exports.withJsEnginePodfileProps = void 0;
10
+
11
+ function _iosPlugins() {
12
+ const data = require("../plugins/ios-plugins");
13
+
14
+ _iosPlugins = function () {
15
+ return data;
16
+ };
17
+
18
+ return data;
19
+ }
20
+
21
+ /**
22
+ * Creates a `withPodfileProperties` config-plugin based on given config to property mapping rules.
23
+ *
24
+ * The factory supports two modes from generic type inference
25
+ * ```ts
26
+ * // config-plugin without `props`, it will implicitly use the expo config as source config.
27
+ * createBuildPodfilePropsConfigPlugin<ExpoConfig>(): ConfigPlugin<void>;
28
+ *
29
+ * // config-plugin with a parameter `props: CustomType`, it will use the `props` as source config.
30
+ * createBuildPodfilePropsConfigPlugin<CustomType>(): ConfigPlugin<CustomType>;
31
+ * ```
32
+ *
33
+ * @param configToPropertyRules config to property mapping rules
34
+ * @param name the config plugin name
35
+ */
36
+ function createBuildPodfilePropsConfigPlugin(configToPropertyRules, name) {
37
+ const withUnknown = (config, sourceConfig) => (0, _iosPlugins().withPodfileProperties)(config, config => {
38
+ config.modResults = updateIosBuildPropertiesFromConfig(sourceConfig !== null && sourceConfig !== void 0 ? sourceConfig : config, config.modResults, configToPropertyRules);
39
+ return config;
40
+ });
41
+
42
+ if (name) {
43
+ Object.defineProperty(withUnknown, 'name', {
44
+ value: name
45
+ });
46
+ }
47
+
48
+ return withUnknown;
49
+ }
50
+ /**
51
+ * A config-plugin to update `ios/Podfile.properties.json` from the `jsEngine` in expo config
52
+ */
53
+
54
+
55
+ const withJsEnginePodfileProps = createBuildPodfilePropsConfigPlugin([{
56
+ propName: 'expo.jsEngine',
57
+ propValueGetter: config => {
58
+ var _ref, _config$ios$jsEngine, _config$ios;
59
+
60
+ return (_ref = (_config$ios$jsEngine = (_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : _config$ios.jsEngine) !== null && _config$ios$jsEngine !== void 0 ? _config$ios$jsEngine : config.jsEngine) !== null && _ref !== void 0 ? _ref : 'jsc';
61
+ }
62
+ }], 'withJsEnginePodfileProps');
63
+ exports.withJsEnginePodfileProps = withJsEnginePodfileProps;
64
+
65
+ function updateIosBuildPropertiesFromConfig(config, podfileProperties, configToPropertyRules) {
66
+ for (const configToProperty of configToPropertyRules) {
67
+ const value = configToProperty.propValueGetter(config);
68
+ updateIosBuildProperty(podfileProperties, configToProperty.propName, value);
69
+ }
70
+
71
+ return podfileProperties;
72
+ }
73
+
74
+ function updateIosBuildProperty(podfileProperties, name, value, options) {
75
+ if (value) {
76
+ podfileProperties[name] = value;
77
+ } else if (options !== null && options !== void 0 && options.removePropWhenValueIsNull) {
78
+ delete podfileProperties[name];
79
+ }
80
+
81
+ return podfileProperties;
82
+ }
83
+ //# sourceMappingURL=BuildProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/ios/BuildProperties.ts"],"names":["createBuildPodfilePropsConfigPlugin","configToPropertyRules","name","withUnknown","config","sourceConfig","modResults","updateIosBuildPropertiesFromConfig","Object","defineProperty","value","withJsEnginePodfileProps","propName","propValueGetter","ios","jsEngine","podfileProperties","configToProperty","updateIosBuildProperty","options","removePropWhenValueIsNull"],"mappings":";;;;;;;;;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,mCAAT,CACLC,qBADK,EAELC,IAFK,EAGL;AACA,QAAMC,WAAwF,GAAG,CAC/FC,MAD+F,EAE/FC,YAF+F,KAI/F,yCAAsBD,MAAtB,EAA8BA,MAAM,IAAI;AACtCA,IAAAA,MAAM,CAACE,UAAP,GAAoBC,kCAAkC,CACnDF,YADmD,aACnDA,YADmD,cACnDA,YADmD,GACnCD,MADmC,EAEpDA,MAAM,CAACE,UAF6C,EAGpDL,qBAHoD,CAAtD;AAKA,WAAOG,MAAP;AACD,GAPD,CAJF;;AAYA,MAAIF,IAAJ,EAAU;AACRM,IAAAA,MAAM,CAACC,cAAP,CAAsBN,WAAtB,EAAmC,MAAnC,EAA2C;AACzCO,MAAAA,KAAK,EAAER;AADkC,KAA3C;AAGD;;AACD,SAAOC,WAAP;AACD;AAED;AACA;AACA;;;AACO,MAAMQ,wBAAwB,GAAGX,mCAAmC,CACzE,CACE;AACEY,EAAAA,QAAQ,EAAE,eADZ;AAEEC,EAAAA,eAAe,EAAET,MAAM;AAAA;;AAAA,0DAAIA,MAAM,CAACU,GAAX,gDAAI,YAAYC,QAAhB,uEAA4BX,MAAM,CAACW,QAAnC,uCAA+C,KAA/C;AAAA;AAFzB,CADF,CADyE,EAOzE,0BAPyE,CAApE;;;AAUA,SAASR,kCAAT,CACLH,MADK,EAELY,iBAFK,EAGLf,qBAHK,EAIL;AACA,OAAK,MAAMgB,gBAAX,IAA+BhB,qBAA/B,EAAsD;AACpD,UAAMS,KAAK,GAAGO,gBAAgB,CAACJ,eAAjB,CAAiCT,MAAjC,CAAd;AACAc,IAAAA,sBAAsB,CAACF,iBAAD,EAAoBC,gBAAgB,CAACL,QAArC,EAA+CF,KAA/C,CAAtB;AACD;;AACD,SAAOM,iBAAP;AACD;;AAEM,SAASE,sBAAT,CACLF,iBADK,EAELd,IAFK,EAGLQ,KAHK,EAILS,OAJK,EAKL;AACA,MAAIT,KAAJ,EAAW;AACTM,IAAAA,iBAAiB,CAACd,IAAD,CAAjB,GAA0BQ,KAA1B;AACD,GAFD,MAEO,IAAIS,OAAJ,aAAIA,OAAJ,eAAIA,OAAO,CAAEC,yBAAb,EAAwC;AAC7C,WAAOJ,iBAAiB,CAACd,IAAD,CAAxB;AACD;;AACD,SAAOc,iBAAP;AACD","sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\n\nimport type { ConfigPlugin } from '../Plugin.types';\nimport { withPodfileProperties } from '../plugins/ios-plugins';\nimport { BuildPropertiesConfig, ConfigToPropertyRuleType } from '../utils/BuildProperties.types';\n\n/**\n * Creates a `withPodfileProperties` config-plugin based on given config to property mapping rules.\n *\n * The factory supports two modes from generic type inference\n * ```ts\n * // config-plugin without `props`, it will implicitly use the expo config as source config.\n * createBuildPodfilePropsConfigPlugin<ExpoConfig>(): ConfigPlugin<void>;\n *\n * // config-plugin with a parameter `props: CustomType`, it will use the `props` as source config.\n * createBuildPodfilePropsConfigPlugin<CustomType>(): ConfigPlugin<CustomType>;\n * ```\n *\n * @param configToPropertyRules config to property mapping rules\n * @param name the config plugin name\n */\nexport function createBuildPodfilePropsConfigPlugin<SourceConfigType extends BuildPropertiesConfig>(\n configToPropertyRules: ConfigToPropertyRuleType<SourceConfigType>[],\n name?: string\n) {\n const withUnknown: ConfigPlugin<SourceConfigType extends ExpoConfig ? void : SourceConfigType> = (\n config,\n sourceConfig\n ) =>\n withPodfileProperties(config, config => {\n config.modResults = updateIosBuildPropertiesFromConfig(\n (sourceConfig ?? config) as SourceConfigType,\n config.modResults,\n configToPropertyRules\n );\n return config;\n });\n if (name) {\n Object.defineProperty(withUnknown, 'name', {\n value: name,\n });\n }\n return withUnknown;\n}\n\n/**\n * A config-plugin to update `ios/Podfile.properties.json` from the `jsEngine` in expo config\n */\nexport const withJsEnginePodfileProps = createBuildPodfilePropsConfigPlugin<ExpoConfig>(\n [\n {\n propName: 'expo.jsEngine',\n propValueGetter: config => config.ios?.jsEngine ?? config.jsEngine ?? 'jsc',\n },\n ],\n 'withJsEnginePodfileProps'\n);\n\nexport function updateIosBuildPropertiesFromConfig<SourceConfigType extends BuildPropertiesConfig>(\n config: SourceConfigType,\n podfileProperties: Record<string, string>,\n configToPropertyRules: ConfigToPropertyRuleType<SourceConfigType>[]\n) {\n for (const configToProperty of configToPropertyRules) {\n const value = configToProperty.propValueGetter(config);\n updateIosBuildProperty(podfileProperties, configToProperty.propName, value);\n }\n return podfileProperties;\n}\n\nexport function updateIosBuildProperty(\n podfileProperties: Record<string, string>,\n name: string,\n value: string | null | undefined,\n options?: { removePropWhenValueIsNull?: boolean }\n) {\n if (value) {\n podfileProperties[name] = value;\n } else if (options?.removePropWhenValueIsNull) {\n delete podfileProperties[name];\n }\n return podfileProperties;\n}\n"],"file":"BuildProperties.js"}
@@ -60,7 +60,12 @@ function getRunnableSchemesFromXcodeproj(projectRoot, {
60
60
  let osType = 'iOS';
61
61
  const type = (0, _Xcodeproj().unquote)(target.productType);
62
62
 
63
- if (type === _Target().TargetType.APPLICATION) {
63
+ if (type === _Target().TargetType.WATCH) {
64
+ osType = 'watchOS';
65
+ } else if ( // (apps) com.apple.product-type.application
66
+ // (app clips) com.apple.product-type.application.on-demand-install-capable
67
+ // NOTE(EvanBacon): This matches against `watchOS` as well so we check for watch first.
68
+ type.startsWith(_Target().TargetType.APPLICATION)) {
64
69
  // Attempt to resolve the platform SDK for each target so we can filter devices.
65
70
  const xcConfigurationList = project.hash.project.objects.XCConfigurationList[target.buildConfigurationList];
66
71
 
@@ -81,8 +86,6 @@ function getRunnableSchemesFromXcodeproj(projectRoot, {
81
86
  }
82
87
  }
83
88
  }
84
- } else if (type === _Target().TargetType.WATCH) {
85
- osType = 'watchOS';
86
89
  }
87
90
 
88
91
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ios/BuildScheme.ts"],"names":["getSchemesFromXcodeproj","projectRoot","getRunnableSchemesFromXcodeproj","configuration","project","map","target","osType","type","productType","TargetType","APPLICATION","xcConfigurationList","hash","objects","XCConfigurationList","buildConfigurationList","buildConfiguration","buildConfigurations","find","value","comment","xcBuildConfiguration","XCBuildConfiguration","buildSdkRoot","buildSettings","SDKROOT","WATCH","name","readSchemeAsync","scheme","allSchemePaths","re","RegExp","schemePath","i","exec","path","Error","getApplicationTargetNameForSchemeAsync","schemeXML","buildActionEntry","Scheme","BuildAction","BuildActionEntries","BuildActionEntry","targetName","length","getBlueprintName","entry","BuildableReference","BuildableName","endsWith","getArchiveBuildConfigurationForSchemeAsync","ArchiveAction","BlueprintName"],"mappings":";;;;;;;;;;AAAA;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;;AA0BO,SAASA,uBAAT,CAAiCC,WAAjC,EAAgE;AACrE,SAAO,8BAAgBA,WAAhB,CAAP;AACD;;AAEM,SAASC,+BAAT,CACLD,WADK,EAEL;AAAEE,EAAAA,aAAa,GAAG;AAAlB,IAAuE,EAFlE,EAG6C;AAClD,QAAMC,OAAO,GAAG,6BAAWH,WAAX,CAAhB;AAEA,SAAO,mCAAoBG,OAApB,EAA6BC,GAA7B,CAAiC,CAAC,GAAGC,MAAH,CAAD,KAAgB;AACtD,QAAIC,MAAM,GAAG,KAAb;AACA,UAAMC,IAAI,GAAG,0BAAQF,MAAM,CAACG,WAAf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AiB;AACf,UAAM,IAAIR,KAAJ,CAAW,GAAER,MAAO,iCAApB,CAAN;AACD;;AACD,SAAOgB,UAAP;AACD;;AAEM,eAAeO,0CAAf,CACLpD,WADK,EAEL6B,MAFK,EAGY;AAAA;;AACjB,QAAMU,SAAS,GAAG,MAAMX,eAAe,CAAC5B,WAAD,EAAc6B,MAAd,CAAvC;AACA,QAAMb,kBAAkB,GAAGuB,SAAH,aAAGA,SAAH,6CAAGA,SAAS,CAAEE,MAAd,gFAAG,mBAAmBY,aAAtB,oFAAG,sBAAmC,CAAnC,CAAH,qFAAG,uBAAwC,GAAxC,CAAH,2DAAG,uBAA8CrC,kBAAzE;;AACA,MAAI,CAACA,kBAAL,EAAyB;AACvB,UAAM,IAAIqB,KAAJ,CAAW,GAAER,MAAO,iCAApB,CAAN;AACD;;AACD,SAAOb,kBAAP;AACD;;AAED,SAAS+B,gBAAT,CAA0BC,KAA1B,EAA4E;AAAA;;AAC1E,SAAOA,KAAP,aAAOA,KAAP,iDAAOA,KAAK,CAAEC,kBAAd,qFAAO,uBAA4B,CAA5B,CAAP,qFAAO,uBAAiC,GAAjC,CAAP,2DAAO,uBAAuCK,aAA9C;AACD","sourcesContent":["import { readXMLAsync } from '../utils/XML';\nimport { findSchemeNames, findSchemePaths } from './Paths';\nimport { findSignableTargets, TargetType } from './Target';\nimport { getPbxproj, unquote } from './utils/Xcodeproj';\n\ninterface SchemeXML {\n Scheme?: {\n BuildAction?: {\n BuildActionEntries?: {\n BuildActionEntry?: BuildActionEntryType[];\n }[];\n }[];\n ArchiveAction?: {\n $?: {\n buildConfiguration?: string;\n };\n }[];\n };\n}\n\ninterface BuildActionEntryType {\n BuildableReference?: {\n $?: {\n BlueprintName?: string;\n BuildableName?: string;\n };\n }[];\n}\n\nexport function getSchemesFromXcodeproj(projectRoot: string): string[] {\n return findSchemeNames(projectRoot);\n}\n\nexport function getRunnableSchemesFromXcodeproj(\n projectRoot: string,\n { configuration = 'Debug' }: { configuration?: 'Debug' | 'Release' } = {}\n): { name: string; osType: string; type: string }[] {\n const project = getPbxproj(projectRoot);\n\n return findSignableTargets(project).map(([, target]) => {\n let osType = 'iOS';\n const type = unquote(target.productType);\n\n if (type === TargetType.APPLICATION) {\n // Attempt to resolve the platform SDK for each target so we can filter devices.\n const xcConfigurationList =\n project.hash.project.objects.XCConfigurationList[target.buildConfigurationList];\n\n if (xcConfigurationList) {\n const buildConfiguration =\n xcConfigurationList.buildConfigurations.find(\n (value: { comment: string; value: string }) => value.comment === configuration\n ) || xcConfigurationList.buildConfigurations[0];\n if (buildConfiguration?.value) {\n const xcBuildConfiguration =\n project.hash.project.objects.XCBuildConfiguration?.[buildConfiguration.value];\n\n const buildSdkRoot = xcBuildConfiguration.buildSettings.SDKROOT;\n if (\n buildSdkRoot === 'appletvos' ||\n 'TVOS_DEPLOYMENT_TARGET' in xcBuildConfiguration.buildSettings\n ) {\n // Is a TV app...\n osType = 'tvOS';\n } else if (buildSdkRoot === 'iphoneos') {\n osType = 'iOS';\n }\n }\n }\n } else if (type === TargetType.WATCH) {\n osType = 'watchOS';\n }\n\n return {\n name: unquote(target.name),\n osType,\n type: unquote(target.productType),\n };\n });\n}\n\nasync function readSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<SchemeXML | undefined> {\n const allSchemePaths = findSchemePaths(projectRoot);\n const re = new RegExp(`/${scheme}.xcscheme`, 'i');\n const schemePath = allSchemePaths.find(i => re.exec(i));\n if (schemePath) {\n return ((await readXMLAsync({ path: schemePath })) as unknown) as SchemeXML | undefined;\n } else {\n throw new Error(`scheme '${scheme}' does not exist, make sure it's marked as shared`);\n }\n}\n\nexport async function getApplicationTargetNameForSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<string> {\n const schemeXML = await readSchemeAsync(projectRoot, scheme);\n const buildActionEntry =\n schemeXML?.Scheme?.BuildAction?.[0]?.BuildActionEntries?.[0]?.BuildActionEntry;\n const targetName =\n buildActionEntry?.length === 1\n ? getBlueprintName(buildActionEntry[0])\n : getBlueprintName(\n buildActionEntry?.find(entry => {\n return entry.BuildableReference?.[0]?.['$']?.BuildableName?.endsWith('.app');\n })\n );\n if (!targetName) {\n throw new Error(`${scheme}.xcscheme seems to be corrupted`);\n }\n return targetName;\n}\n\nexport async function getArchiveBuildConfigurationForSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<string> {\n const schemeXML = await readSchemeAsync(projectRoot, scheme);\n const buildConfiguration = schemeXML?.Scheme?.ArchiveAction?.[0]?.['$']?.buildConfiguration;\n if (!buildConfiguration) {\n throw new Error(`${scheme}.xcscheme seems to be corrupted`);\n }\n return buildConfiguration;\n}\n\nfunction getBlueprintName(entry?: BuildActionEntryType): string | undefined {\n return entry?.BuildableReference?.[0]?.['$']?.BlueprintName;\n}\n"],"file":"BuildScheme.js"}
1
+ {"version":3,"sources":["../../src/ios/BuildScheme.ts"],"names":["getSchemesFromXcodeproj","projectRoot","getRunnableSchemesFromXcodeproj","configuration","project","map","target","osType","type","productType","TargetType","WATCH","startsWith","APPLICATION","xcConfigurationList","hash","objects","XCConfigurationList","buildConfigurationList","buildConfiguration","buildConfigurations","find","value","comment","xcBuildConfiguration","XCBuildConfiguration","buildSdkRoot","buildSettings","SDKROOT","name","readSchemeAsync","scheme","allSchemePaths","re","RegExp","schemePath","i","exec","path","Error","getApplicationTargetNameForSchemeAsync","schemeXML","buildActionEntry","Scheme","BuildAction","BuildActionEntries","BuildActionEntry","targetName","length","getBlueprintName","entry","BuildableReference","BuildableName","endsWith","getArchiveBuildConfigurationForSchemeAsync","ArchiveAction","BlueprintName"],"mappings":";;;;;;;;;;AAAA;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;;AA0BO,SAASA,uBAAT,CAAiCC,WAAjC,EAAgE;AACrE,SAAO,8BAAg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AgB,CAACP,gBAAgB,CAAC,CAAD,CAAjB,CADpB,GAEIO,gBAAgB,CACdP,gBADc,aACdA,gBADc,uBACdA,gBAAgB,CAAErB,IAAlB,CAAuB6B,KAAK,IAAI;AAAA;;AAC9B,oCAAOA,KAAK,CAACC,kBAAb,oFAAO,sBAA2B,CAA3B,CAAP,qFAAO,uBAAgC,GAAhC,CAAP,qFAAO,uBAAsCC,aAA7C,2DAAO,uBAAqDC,QAArD,CAA8D,MAA9D,CAAP;AACD,GAFD,CADc,CAHtB;;AAQA,MAAI,CAACN,UAAL,EAAiB;AACf,UAAM,IAAIR,KAAJ,CAAW,GAAER,MAAO,iCAApB,CAAN;AACD;;AACD,SAAOgB,UAAP;AACD;;AAEM,eAAeO,0CAAf,CACLrD,WADK,EAEL8B,MAFK,EAGY;AAAA;;AACjB,QAAMU,SAAS,GAAG,MAAMX,eAAe,CAAC7B,WAAD,EAAc8B,MAAd,CAAvC;AACA,QAAMZ,kBAAkB,GAAGsB,SAAH,aAAGA,SAAH,6CAAGA,SAAS,CAAEE,MAAd,gFAAG,mBAAmBY,aAAtB,oFAAG,sBAAmC,CAAnC,CAAH,qFAAG,uBAAwC,GAAxC,CAAH,2DAAG,uBAA8CpC,kBAAzE;;AACA,MAAI,CAACA,kBAAL,EAAyB;AACvB,UAAM,IAAIoB,KAAJ,CAAW,GAAER,MAAO,iCAApB,CAAN;AACD;;AACD,SAAOZ,kBAAP;AACD;;AAED,SAAS8B,gBAAT,CAA0BC,KAA1B,EAA4E;AAAA;;AAC1E,SAAOA,KAAP,aAAOA,KAAP,iDAAOA,KAAK,CAAEC,kBAAd,qFAAO,uBAA4B,CAA5B,CAAP,qFAAO,uBAAiC,GAAjC,CAAP,2DAAO,uBAAuCK,aAA9C;AACD","sourcesContent":["import { readXMLAsync } from '../utils/XML';\nimport { findSchemeNames, findSchemePaths } from './Paths';\nimport { findSignableTargets, TargetType } from './Target';\nimport { getPbxproj, unquote } from './utils/Xcodeproj';\n\ninterface SchemeXML {\n Scheme?: {\n BuildAction?: {\n BuildActionEntries?: {\n BuildActionEntry?: BuildActionEntryType[];\n }[];\n }[];\n ArchiveAction?: {\n $?: {\n buildConfiguration?: string;\n };\n }[];\n };\n}\n\ninterface BuildActionEntryType {\n BuildableReference?: {\n $?: {\n BlueprintName?: string;\n BuildableName?: string;\n };\n }[];\n}\n\nexport function getSchemesFromXcodeproj(projectRoot: string): string[] {\n return findSchemeNames(projectRoot);\n}\n\nexport function getRunnableSchemesFromXcodeproj(\n projectRoot: string,\n { configuration = 'Debug' }: { configuration?: 'Debug' | 'Release' } = {}\n): { name: string; osType: string; type: string }[] {\n const project = getPbxproj(projectRoot);\n\n return findSignableTargets(project).map(([, target]) => {\n let osType = 'iOS';\n const type = unquote(target.productType);\n\n if (type === TargetType.WATCH) {\n osType = 'watchOS';\n } else if (\n // (apps) com.apple.product-type.application\n // (app clips) com.apple.product-type.application.on-demand-install-capable\n // NOTE(EvanBacon): This matches against `watchOS` as well so we check for watch first.\n type.startsWith(TargetType.APPLICATION)\n ) {\n // Attempt to resolve the platform SDK for each target so we can filter devices.\n const xcConfigurationList =\n project.hash.project.objects.XCConfigurationList[target.buildConfigurationList];\n\n if (xcConfigurationList) {\n const buildConfiguration =\n xcConfigurationList.buildConfigurations.find(\n (value: { comment: string; value: string }) => value.comment === configuration\n ) || xcConfigurationList.buildConfigurations[0];\n if (buildConfiguration?.value) {\n const xcBuildConfiguration =\n project.hash.project.objects.XCBuildConfiguration?.[buildConfiguration.value];\n\n const buildSdkRoot = xcBuildConfiguration.buildSettings.SDKROOT;\n if (\n buildSdkRoot === 'appletvos' ||\n 'TVOS_DEPLOYMENT_TARGET' in xcBuildConfiguration.buildSettings\n ) {\n // Is a TV app...\n osType = 'tvOS';\n } else if (buildSdkRoot === 'iphoneos') {\n osType = 'iOS';\n }\n }\n }\n }\n\n return {\n name: unquote(target.name),\n osType,\n type: unquote(target.productType),\n };\n });\n}\n\nasync function readSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<SchemeXML | undefined> {\n const allSchemePaths = findSchemePaths(projectRoot);\n const re = new RegExp(`/${scheme}.xcscheme`, 'i');\n const schemePath = allSchemePaths.find(i => re.exec(i));\n if (schemePath) {\n return ((await readXMLAsync({ path: schemePath })) as unknown) as SchemeXML | undefined;\n } else {\n throw new Error(`scheme '${scheme}' does not exist, make sure it's marked as shared`);\n }\n}\n\nexport async function getApplicationTargetNameForSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<string> {\n const schemeXML = await readSchemeAsync(projectRoot, scheme);\n const buildActionEntry =\n schemeXML?.Scheme?.BuildAction?.[0]?.BuildActionEntries?.[0]?.BuildActionEntry;\n const targetName =\n buildActionEntry?.length === 1\n ? getBlueprintName(buildActionEntry[0])\n : getBlueprintName(\n buildActionEntry?.find(entry => {\n return entry.BuildableReference?.[0]?.['$']?.BuildableName?.endsWith('.app');\n })\n );\n if (!targetName) {\n throw new Error(`${scheme}.xcscheme seems to be corrupted`);\n }\n return targetName;\n}\n\nexport async function getArchiveBuildConfigurationForSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<string> {\n const schemeXML = await readSchemeAsync(projectRoot, scheme);\n const buildConfiguration = schemeXML?.Scheme?.ArchiveAction?.[0]?.['$']?.buildConfiguration;\n if (!buildConfiguration) {\n throw new Error(`${scheme}.xcscheme seems to be corrupted`);\n }\n return buildConfiguration;\n}\n\nfunction getBlueprintName(entry?: BuildActionEntryType): string | undefined {\n return entry?.BuildableReference?.[0]?.['$']?.BlueprintName;\n}\n"],"file":"BuildScheme.js"}
@@ -2,4 +2,8 @@ import { ExpoConfig } from '@expo/config-types';
2
2
  import { JSONObject } from '@expo/json-file';
3
3
  export declare const withAssociatedDomains: import("..").ConfigPlugin<void>;
4
4
  export declare function setAssociatedDomains(config: ExpoConfig, { 'com.apple.developer.associated-domains': _, ...entitlementsPlist }: JSONObject): JSONObject;
5
- export declare function getEntitlementsPath(projectRoot: string): string;
5
+ export declare function getEntitlementsPath(projectRoot: string, { targetName, buildConfiguration, }?: {
6
+ targetName?: string;
7
+ buildConfiguration?: string;
8
+ }): string | null;
9
+ export declare function ensureApplicationTargetEntitlementsFileConfigured(projectRoot: string): void;
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.ensureApplicationTargetEntitlementsFileConfigured = ensureApplicationTargetEntitlementsFileConfigured;
6
7
  exports.getEntitlementsPath = getEntitlementsPath;
7
8
  exports.setAssociatedDomains = setAssociatedDomains;
8
9
  exports.withAssociatedDomains = void 0;
@@ -47,40 +48,36 @@ function _iosPlugins() {
47
48
  return data;
48
49
  }
49
50
 
50
- function _fs2() {
51
- const data = require("../utils/fs");
51
+ function _Target() {
52
+ const data = require("./Target");
52
53
 
53
- _fs2 = function () {
54
+ _Target = function () {
54
55
  return data;
55
56
  };
56
57
 
57
58
  return data;
58
59
  }
59
60
 
60
- function Paths() {
61
- const data = _interopRequireWildcard(require("./Paths"));
61
+ function _Xcodeproj() {
62
+ const data = require("./utils/Xcodeproj");
62
63
 
63
- Paths = function () {
64
+ _Xcodeproj = function () {
64
65
  return data;
65
66
  };
66
67
 
67
68
  return data;
68
69
  }
69
70
 
70
- function _Xcodeproj() {
71
- const data = require("./utils/Xcodeproj");
71
+ function _string() {
72
+ const data = require("./utils/string");
72
73
 
73
- _Xcodeproj = function () {
74
+ _string = function () {
74
75
  return data;
75
76
  };
76
77
 
77
78
  return data;
78
79
  }
79
80
 
80
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
81
-
82
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
83
-
84
81
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
85
82
 
86
83
  const withAssociatedDomains = (0, _iosPlugins().createEntitlementsPlugin)(setAssociatedDomains, 'withAssociatedDomains');
@@ -101,68 +98,70 @@ function setAssociatedDomains(config, {
101
98
  return entitlementsPlist;
102
99
  }
103
100
 
104
- function getEntitlementsPath(projectRoot) {
105
- const paths = Paths().getAllEntitlementsPaths(projectRoot);
106
- let targetPath = null;
107
- /**
108
- * Add file to pbxproj under CODE_SIGN_ENTITLEMENTS
109
- */
110
-
101
+ function getEntitlementsPath(projectRoot, {
102
+ targetName,
103
+ buildConfiguration = 'Release'
104
+ } = {}) {
111
105
  const project = (0, _Xcodeproj().getPbxproj)(projectRoot);
112
- const projectName = (0, _Xcodeproj().getProjectName)(projectRoot);
113
- const productName = (0, _Xcodeproj().getProductName)(project); // Use posix formatted path, even on Windows
106
+ const xcBuildConfiguration = (0, _Target().getXCBuildConfigurationFromPbxproj)(project, {
107
+ targetName,
108
+ buildConfiguration
109
+ });
114
110
 
115
- const entitlementsRelativePath = (0, _slash().default)(_path().default.join(projectName, `${productName}.entitlements`));
116
- const entitlementsPath = (0, _slash().default)(_path().default.normalize(_path().default.join(projectRoot, 'ios', entitlementsRelativePath)));
117
- const pathsToDelete = [];
111
+ if (!xcBuildConfiguration) {
112
+ return null;
113
+ }
118
114
 
119
- while (paths.length) {
120
- const last = (0, _slash().default)(_path().default.normalize(paths.pop()));
115
+ const entitlementsPath = getEntitlementsPathFromBuildConfiguration(projectRoot, xcBuildConfiguration);
116
+ return entitlementsPath && _fs().default.existsSync(entitlementsPath) ? entitlementsPath : null;
117
+ }
121
118
 
122
- if (last !== entitlementsPath) {
123
- pathsToDelete.push(last);
124
- } else {
125
- targetPath = last;
126
- }
127
- } // Create a new entitlements file
119
+ function getEntitlementsPathFromBuildConfiguration(projectRoot, xcBuildConfiguration) {
120
+ var _xcBuildConfiguration;
121
+
122
+ const entitlementsPathRaw = xcBuildConfiguration === null || xcBuildConfiguration === void 0 ? void 0 : (_xcBuildConfiguration = xcBuildConfiguration.buildSettings) === null || _xcBuildConfiguration === void 0 ? void 0 : _xcBuildConfiguration.CODE_SIGN_ENTITLEMENTS;
128
123
 
124
+ if (entitlementsPathRaw) {
125
+ return _path().default.normalize(_path().default.join(projectRoot, 'ios', (0, _string().trimQuotes)(entitlementsPathRaw)));
126
+ } else {
127
+ return null;
128
+ }
129
+ }
129
130
 
130
- if (!targetPath) {
131
- targetPath = entitlementsPath; // Use the default template
131
+ function ensureApplicationTargetEntitlementsFileConfigured(projectRoot) {
132
+ const project = (0, _Xcodeproj().getPbxproj)(projectRoot);
133
+ const projectName = (0, _Xcodeproj().getProjectName)(projectRoot);
134
+ const productName = (0, _Xcodeproj().getProductName)(project);
135
+ const [, applicationTarget] = (0, _Target().findFirstNativeTarget)(project);
136
+ const buildConfigurations = (0, _Xcodeproj().getBuildConfigurationsForListId)(project, applicationTarget.buildConfigurationList);
137
+ let hasChangesToWrite = false;
132
138
 
133
- let template = ENTITLEMENTS_TEMPLATE; // If an old entitlements file exists, copy it's contents into the new file.
139
+ for (const [, xcBuildConfiguration] of buildConfigurations) {
140
+ const oldEntitlementPath = getEntitlementsPathFromBuildConfiguration(projectRoot, xcBuildConfiguration);
134
141
 
135
- if (pathsToDelete.length) {
136
- // Get the last entitlements file and use it as the template
137
- const last = pathsToDelete[pathsToDelete.length - 1];
138
- template = _fs().default.readFileSync(last, 'utf8');
142
+ if (oldEntitlementPath && _fs().default.existsSync(oldEntitlementPath)) {
143
+ return;
139
144
  }
140
145
 
146
+ hasChangesToWrite = true; // Use posix formatted path, even on Windows
147
+
148
+ const entitlementsRelativePath = (0, _slash().default)(_path().default.join(projectName, `${productName}.entitlements`));
149
+
150
+ const entitlementsPath = _path().default.normalize(_path().default.join(projectRoot, 'ios', entitlementsRelativePath));
151
+
141
152
  _fs().default.mkdirSync(_path().default.dirname(entitlementsPath), {
142
153
  recursive: true
143
154
  });
144
155
 
145
- _fs().default.writeFileSync(entitlementsPath, template);
156
+ if (!_fs().default.existsSync(entitlementsPath)) {
157
+ _fs().default.writeFileSync(entitlementsPath, ENTITLEMENTS_TEMPLATE);
158
+ }
146
159
 
147
- Object.entries(project.pbxXCBuildConfigurationSection()).filter(_Xcodeproj().isNotComment).filter(_Xcodeproj().isBuildConfig).filter(_Xcodeproj().isNotTestHost).forEach(({
148
- 1: {
149
- buildSettings
150
- }
151
- }) => {
152
- buildSettings.CODE_SIGN_ENTITLEMENTS = `"${entitlementsRelativePath}"`;
153
- });
160
+ xcBuildConfiguration.buildSettings.CODE_SIGN_ENTITLEMENTS = entitlementsRelativePath;
161
+ }
154
162
 
163
+ if (hasChangesToWrite) {
155
164
  _fs().default.writeFileSync(project.filepath, project.writeSync());
156
- } // Clean up others
157
-
158
-
159
- deleteEntitlementsFiles(pathsToDelete);
160
- return entitlementsPath;
161
- }
162
-
163
- function deleteEntitlementsFiles(entitlementsPaths) {
164
- for (const path of entitlementsPaths) {
165
- (0, _fs2().removeFile)(path);
166
165
  }
167
166
  }
168
167
 
@@ -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","mkdirSync","dirname","recursive","writeFileSync","Object","entries","pbxXCBuildConfigurationSection","filter","isNotComment","isBuildConfig","isNotTestHost","forEach","buildSettings","CODE_SIGN_ENTITLEMENTS","filepath","writeSync","deleteEntitlementsFiles","entitlementsPaths"],"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;;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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AAwC,IAAG3B,wBAAyB,GAApE;AACD,KANH;;AAOAY,kBAAGK,aAAH,CAAiBpB,OAAO,CAAC+B,QAAzB,EAAmC/B,OAAO,CAACgC,SAAR,EAAnC;AACD,GArD8D,CAuD/D;;;AACAC,EAAAA,uBAAuB,CAACzB,aAAD,CAAvB;AAEA,SAAOF,gBAAP;AACD;;AAED,SAAS2B,uBAAT,CAAiCC,iBAAjC,EAA8D;AAC5D,OAAK,MAAM9B,IAAX,IAAmB8B,iBAAnB,EAAsC;AACpC,2BAAW9B,IAAX;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';\nimport path from 'path';\nimport slash from 'slash';\n\nimport { createEntitlementsPlugin } from '../plugins/ios-plugins';\nimport { removeFile } from '../utils/fs';\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.mkdirSync(path.dirname(entitlementsPath), { recursive: true });\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 removeFile(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"}
1
+ {"version":3,"sources":["../../src/ios/Entitlements.ts"],"names":["withAssociatedDomains","setAssociatedDomains","config","_","entitlementsPlist","ios","associatedDomains","getEntitlementsPath","projectRoot","targetName","buildConfiguration","project","xcBuildConfiguration","entitlementsPath","getEntitlementsPathFromBuildConfiguration","fs","existsSync","entitlementsPathRaw","buildSettings","CODE_SIGN_ENTITLEMENTS","path","normalize","join","ensureApplicationTargetEntitlementsFileConfigured","projectName","productName","applicationTarget","buildConfigurations","buildConfigurationList","hasChangesToWrite","oldEntitlementPath","entitlementsRelativePath","mkdirSync","dirname","recursive","writeFileSync","ENTITLEMENTS_TEMPLATE","filepath","writeSync"],"mappings":";;;;;;;;;;AAEA;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;;AAMA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAEO,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,CACLC,WADK,EAEL;AACEC,EAAAA,UADF;AAEEC,EAAAA,kBAAkB,GAAG;AAFvB,IAG0D,EALrD,EAMU;AACf,QAAMC,OAAO,GAAG,6BAAWH,WAAX,CAAhB;AACA,QAAMI,oBAAoB,GAAG,kDAAmCD,OAAnC,EAA4C;AACvEF,IAAAA,UADuE;AAEvEC,IAAAA;AAFuE,GAA5C,CAA7B;;AAIA,MAAI,CAACE,oBAAL,EAA2B;AACzB,WAAO,IAAP;AACD;;AACD,QAAMC,gBAAgB,GAAGC,y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jC;;AACA,UAAMZ,gBAAgB,GAAGO,gBAAKC,SAAL,CACvBD,gBAAKE,IAAL,CAAUd,WAAV,EAAuB,KAAvB,EAA8BuB,wBAA9B,CADuB,CAAzB;;AAGAhB,kBAAGiB,SAAH,CAAaZ,gBAAKa,OAAL,CAAapB,gBAAb,CAAb,EAA6C;AAAEqB,MAAAA,SAAS,EAAE;AAAb,KAA7C;;AACA,QAAI,CAACnB,cAAGC,UAAH,CAAcH,gBAAd,CAAL,EAAsC;AACpCE,oBAAGoB,aAAH,CAAiBtB,gBAAjB,EAAmCuB,qBAAnC;AACD;;AACDxB,IAAAA,oBAAoB,CAACM,aAArB,CAAmCC,sBAAnC,GAA4DY,wBAA5D;AACD;;AACD,MAAIF,iBAAJ,EAAuB;AACrBd,kBAAGoB,aAAH,CAAiBxB,OAAO,CAAC0B,QAAzB,EAAmC1B,OAAO,CAAC2B,SAAR,EAAnC;AACD;AACF;;AAED,MAAMF,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';\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"],"file":"Entitlements.js"}
@@ -148,7 +148,7 @@ async function getResolvedLocalesAsync(projectRoot, input) {
148
148
  if (typeof localeJsonPath === 'string') {
149
149
  try {
150
150
  locales[lang] = await _jsonFile().default.readAsync((0, _path().join)(projectRoot, localeJsonPath));
151
- } catch (e) {
151
+ } catch {
152
152
  // Add a warning when a json file cannot be parsed.
153
153
  (0, _warnings().addWarningIOS)(`locales.${lang}`, `Failed to parse JSON of locale file for language: ${lang}`, 'https://docs.expo.dev/distribution/app-stores/#localizing-your-ios-app');
154
154
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ios/Locales.ts"],"names":["withLocales","config","modResults","setLocalesAsync","projectRoot","modRequest","project","getLocales","locales","localesMap","getResolvedLocalesAsync","projectName","supportingDirectory","stringName","lang","localizationObj","Object","entries","dir","fs","promises","mkdir","recursive","strings","buffer","plistKey","localVersion","push","writeFile","join","groupName","group","children","some","comment","filepath","isBuildFile","verbose","input","localeJsonPath","JsonFile","readAsync","e"],"mappings":";;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAIA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAMO,MAAMA,WAAyB,GAAGC,MAAM,IAAI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AAM0B,oBAASC,SAAT,CAAmB,kBAAKrC,WAAL,EAAkBmC,cAAlB,CAAnB,CAAtB;AACD,OAFD,CAEE,OAAOG,CAAP,EAAU;AACV;AACA,uCACG,WAAU5B,IAAK,EADlB,EAEG,qDAAoDA,IAAK,EAF5D,EAGE,wEAHF;AAKD;AACF,KAXD,MAWO;AACL;AACA;AACAN,MAAAA,OAAO,CAACM,IAAD,CAAP,GAAgByB,cAAhB;AACD;AACF;;AAED,SAAO/B,OAAP;AACD","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport JsonFile from '@expo/json-file';\nimport fs from 'fs';\nimport { join, relative } from 'path';\nimport { XcodeProject } from 'xcode';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withXcodeProject } from '../plugins/ios-plugins';\nimport { addWarningIOS } from '../utils/warnings';\nimport { addResourceFileToGroup, ensureGroupRecursively, getProjectName } from './utils/Xcodeproj';\n\ntype LocaleJson = Record<string, string>;\ntype ResolvedLocalesJson = Record<string, LocaleJson>;\ntype ExpoConfigLocales = NonNullable<ExpoConfig['locales']>;\n\nexport const withLocales: ConfigPlugin = config => {\n return withXcodeProject(config, async config => {\n config.modResults = await setLocalesAsync(config, {\n projectRoot: config.modRequest.projectRoot,\n project: config.modResults,\n });\n return config;\n });\n};\n\nexport function getLocales(\n config: Pick<ExpoConfig, 'locales'>\n): Record<string, string | LocaleJson> | null {\n return config.locales ?? null;\n}\n\nexport async function setLocalesAsync(\n config: Pick<ExpoConfig, 'locales'>,\n { projectRoot, project }: { projectRoot: string; project: XcodeProject }\n): Promise<XcodeProject> {\n const locales = getLocales(config);\n if (!locales) {\n return project;\n }\n // possibly validate CFBundleAllowMixedLocalizations is enabled\n const localesMap = await getResolvedLocalesAsync(projectRoot, locales);\n\n const projectName = getProjectName(projectRoot);\n const supportingDirectory = join(projectRoot, 'ios', projectName, 'Supporting');\n\n // TODO: Should we delete all before running? Revisit after we land on a lock file.\n const stringName = 'InfoPlist.strings';\n\n for (const [lang, localizationObj] of Object.entries(localesMap)) {\n const dir = join(supportingDirectory, `${lang}.lproj`);\n // await fs.ensureDir(dir);\n await fs.promises.mkdir(dir, { recursive: true });\n\n const strings = join(dir, stringName);\n const buffer = [];\n for (const [plistKey, localVersion] of Object.entries(localizationObj)) {\n buffer.push(`${plistKey} = \"${localVersion}\";`);\n }\n // Write the file to the file system.\n await fs.promises.writeFile(strings, buffer.join('\\n'));\n\n const groupName = `${projectName}/Supporting/${lang}.lproj`;\n // deep find the correct folder\n const group = ensureGroupRecursively(project, groupName);\n\n // Ensure the file doesn't already exist\n if (!group?.children.some(({ comment }) => comment === stringName)) {\n // Only write the file if it doesn't already exist.\n project = addResourceFileToGroup({\n filepath: relative(supportingDirectory, strings),\n groupName,\n project,\n isBuildFile: true,\n verbose: true,\n });\n }\n }\n\n return project;\n}\n\nexport async function getResolvedLocalesAsync(\n projectRoot: string,\n input: ExpoConfigLocales\n): Promise<ResolvedLocalesJson> {\n const locales: ResolvedLocalesJson = {};\n for (const [lang, localeJsonPath] of Object.entries(input)) {\n if (typeof localeJsonPath === 'string') {\n try {\n locales[lang] = await JsonFile.readAsync(join(projectRoot, localeJsonPath));\n } catch (e) {\n // Add a warning when a json file cannot be parsed.\n addWarningIOS(\n `locales.${lang}`,\n `Failed to parse JSON of locale file for language: ${lang}`,\n 'https://docs.expo.dev/distribution/app-stores/#localizing-your-ios-app'\n );\n }\n } else {\n // In the off chance that someone defined the locales json in the config, pass it directly to the object.\n // We do this to make the types more elegant.\n locales[lang] = localeJsonPath;\n }\n }\n\n return locales;\n}\n"],"file":"Locales.js"}
1
+ {"version":3,"sources":["../../src/ios/Locales.ts"],"names":["withLocales","config","modResults","setLocalesAsync","projectRoot","modRequest","project","getLocales","locales","localesMap","getResolvedLocalesAsync","projectName","supportingDirectory","stringName","lang","localizationObj","Object","entries","dir","fs","promises","mkdir","recursive","strings","buffer","plistKey","localVersion","push","writeFile","join","groupName","group","children","some","comment","filepath","isBuildFile","verbose","input","localeJsonPath","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AAV;AAOD;AACF;;AAED,SAAO/B,OAAP;AACD;;AAEM,eAAeI,uBAAf,CACLN,WADK,EAELkC,KAFK,EAGyB;AAC9B,QAAM9B,OAA4B,GAAG,EAArC;;AACA,OAAK,MAAM,CAACM,IAAD,EAAOyB,cAAP,CAAX,IAAqCvB,MAAM,CAACC,OAAP,CAAeqB,KAAf,CAArC,EAA4D;AAC1D,QAAI,OAAOC,cAAP,KAA0B,QAA9B,EAAwC;AACtC,UAAI;AACF/B,QAAAA,OAAO,CAACM,IAAD,CAAP,GAAgB,MAAM0B,oBAASC,SAAT,CAAmB,kBAAKrC,WAAL,EAAkBmC,cAAlB,CAAnB,CAAtB;AACD,OAFD,CAEE,MAAM;AACN;AACA,uCACG,WAAUzB,IAAK,EADlB,EAEG,qDAAoDA,IAAK,EAF5D,EAGE,wEAHF;AAKD;AACF,KAXD,MAWO;AACL;AACA;AACAN,MAAAA,OAAO,CAACM,IAAD,CAAP,GAAgByB,cAAhB;AACD;AACF;;AAED,SAAO/B,OAAP;AACD","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport JsonFile from '@expo/json-file';\nimport fs from 'fs';\nimport { join, relative } from 'path';\nimport { XcodeProject } from 'xcode';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withXcodeProject } from '../plugins/ios-plugins';\nimport { addWarningIOS } from '../utils/warnings';\nimport { addResourceFileToGroup, ensureGroupRecursively, getProjectName } from './utils/Xcodeproj';\n\ntype LocaleJson = Record<string, string>;\ntype ResolvedLocalesJson = Record<string, LocaleJson>;\ntype ExpoConfigLocales = NonNullable<ExpoConfig['locales']>;\n\nexport const withLocales: ConfigPlugin = config => {\n return withXcodeProject(config, async config => {\n config.modResults = await setLocalesAsync(config, {\n projectRoot: config.modRequest.projectRoot,\n project: config.modResults,\n });\n return config;\n });\n};\n\nexport function getLocales(\n config: Pick<ExpoConfig, 'locales'>\n): Record<string, string | LocaleJson> | null {\n return config.locales ?? null;\n}\n\nexport async function setLocalesAsync(\n config: Pick<ExpoConfig, 'locales'>,\n { projectRoot, project }: { projectRoot: string; project: XcodeProject }\n): Promise<XcodeProject> {\n const locales = getLocales(config);\n if (!locales) {\n return project;\n }\n // possibly validate CFBundleAllowMixedLocalizations is enabled\n const localesMap = await getResolvedLocalesAsync(projectRoot, locales);\n\n const projectName = getProjectName(projectRoot);\n const supportingDirectory = join(projectRoot, 'ios', projectName, 'Supporting');\n\n // TODO: Should we delete all before running? Revisit after we land on a lock file.\n const stringName = 'InfoPlist.strings';\n\n for (const [lang, localizationObj] of Object.entries(localesMap)) {\n const dir = join(supportingDirectory, `${lang}.lproj`);\n // await fs.ensureDir(dir);\n await fs.promises.mkdir(dir, { recursive: true });\n\n const strings = join(dir, stringName);\n const buffer = [];\n for (const [plistKey, localVersion] of Object.entries(localizationObj)) {\n buffer.push(`${plistKey} = \"${localVersion}\";`);\n }\n // Write the file to the file system.\n await fs.promises.writeFile(strings, buffer.join('\\n'));\n\n const groupName = `${projectName}/Supporting/${lang}.lproj`;\n // deep find the correct folder\n const group = ensureGroupRecursively(project, groupName);\n\n // Ensure the file doesn't already exist\n if (!group?.children.some(({ comment }) => comment === stringName)) {\n // Only write the file if it doesn't already exist.\n project = addResourceFileToGroup({\n filepath: relative(supportingDirectory, strings),\n groupName,\n project,\n isBuildFile: true,\n verbose: true,\n });\n }\n }\n\n return project;\n}\n\nexport async function getResolvedLocalesAsync(\n projectRoot: string,\n input: ExpoConfigLocales\n): Promise<ResolvedLocalesJson> {\n const locales: ResolvedLocalesJson = {};\n for (const [lang, localeJsonPath] of Object.entries(input)) {\n if (typeof localeJsonPath === 'string') {\n try {\n locales[lang] = await JsonFile.readAsync(join(projectRoot, localeJsonPath));\n } catch {\n // Add a warning when a json file cannot be parsed.\n addWarningIOS(\n `locales.${lang}`,\n `Failed to parse JSON of locale file for language: ${lang}`,\n 'https://docs.expo.dev/distribution/app-stores/#localizing-your-ios-app'\n );\n }\n } else {\n // In the off chance that someone defined the locales json in the config, pass it directly to the object.\n // We do this to make the types more elegant.\n locales[lang] = localeJsonPath;\n }\n }\n\n return locales;\n}\n"],"file":"Locales.js"}
@@ -28,9 +28,7 @@ export declare function getAllInfoPlistPaths(projectRoot: string): string[];
28
28
  export declare function getInfoPlistPath(projectRoot: string): string;
29
29
  export declare function getAllEntitlementsPaths(projectRoot: string): string[];
30
30
  /**
31
- * Get the entitlements file path if it exists.
32
- *
33
- * @param projectRoot
31
+ * @deprecated: use Entitlements.getEntitlementsPath instead
34
32
  */
35
33
  export declare function getEntitlementsPath(projectRoot: string): string | null;
36
34
  export declare function getSupportingPath(projectRoot: string): string;