@expo/config-plugins 5.0.4 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/build/Plugin.types.d.ts +7 -7
  2. package/build/Plugin.types.js +0 -9
  3. package/build/Plugin.types.js.map +1 -1
  4. package/build/android/AllowBackup.js +0 -15
  5. package/build/android/AllowBackup.js.map +1 -1
  6. package/build/android/BuildProperties.js +2 -16
  7. package/build/android/BuildProperties.js.map +1 -1
  8. package/build/android/Colors.js +3 -25
  9. package/build/android/Colors.js.map +1 -1
  10. package/build/android/EasBuild.js +2 -22
  11. package/build/android/EasBuild.js.map +1 -1
  12. package/build/android/EasBuildGradleScript.js.map +1 -1
  13. package/build/android/GoogleMapsApiKey.js +0 -12
  14. package/build/android/GoogleMapsApiKey.js.map +1 -1
  15. package/build/android/GoogleServices.js +10 -48
  16. package/build/android/GoogleServices.js.map +1 -1
  17. package/build/android/IntentFilters.d.ts +1 -1
  18. package/build/android/IntentFilters.js +8 -24
  19. package/build/android/IntentFilters.js.map +1 -1
  20. package/build/android/Manifest.d.ts +19 -19
  21. package/build/android/Manifest.js +7 -66
  22. package/build/android/Manifest.js.map +1 -1
  23. package/build/android/Name.js +6 -27
  24. package/build/android/Name.js.map +1 -1
  25. package/build/android/Orientation.js +2 -12
  26. package/build/android/Orientation.js.map +1 -1
  27. package/build/android/Package.js +26 -111
  28. package/build/android/Package.js.map +1 -1
  29. package/build/android/Paths.d.ts +2 -2
  30. package/build/android/Paths.js +0 -47
  31. package/build/android/Paths.js.map +1 -1
  32. package/build/android/Permissions.js +8 -52
  33. package/build/android/Permissions.js.map +1 -1
  34. package/build/android/PrimaryColor.js +0 -18
  35. package/build/android/PrimaryColor.js.map +1 -1
  36. package/build/android/Properties.d.ts +1 -1
  37. package/build/android/Properties.js +0 -9
  38. package/build/android/Properties.js.map +1 -1
  39. package/build/android/Resources.d.ts +4 -4
  40. package/build/android/Resources.js +9 -29
  41. package/build/android/Resources.js.map +1 -1
  42. package/build/android/Scheme.d.ts +1 -1
  43. package/build/android/Scheme.js +13 -66
  44. package/build/android/Scheme.js.map +1 -1
  45. package/build/android/StatusBar.js +5 -33
  46. package/build/android/StatusBar.js.map +1 -1
  47. package/build/android/Strings.js +0 -14
  48. package/build/android/Strings.js.map +1 -1
  49. package/build/android/Styles.js +7 -34
  50. package/build/android/Styles.js.map +1 -1
  51. package/build/android/Updates.d.ts +2 -0
  52. package/build/android/Updates.js +50 -47
  53. package/build/android/Updates.js.map +1 -1
  54. package/build/android/Version.js +3 -29
  55. package/build/android/Version.js.map +1 -1
  56. package/build/android/WindowSoftInputMode.js +0 -14
  57. package/build/android/WindowSoftInputMode.js.map +1 -1
  58. package/build/android/codeMod.js +6 -22
  59. package/build/android/codeMod.js.map +1 -1
  60. package/build/android/index.js +0 -94
  61. package/build/android/index.js.map +1 -1
  62. package/build/index.js +2 -65
  63. package/build/index.js.map +1 -1
  64. package/build/ios/Bitcode.d.ts +1 -1
  65. package/build/ios/Bitcode.js +8 -28
  66. package/build/ios/Bitcode.js.map +1 -1
  67. package/build/ios/BuildProperties.js +2 -14
  68. package/build/ios/BuildProperties.js.map +1 -1
  69. package/build/ios/BuildScheme.js +2 -34
  70. package/build/ios/BuildScheme.js.map +1 -1
  71. package/build/ios/BundleIdentifier.js +13 -72
  72. package/build/ios/BundleIdentifier.js.map +1 -1
  73. package/build/ios/DeviceFamily.js +6 -24
  74. package/build/ios/DeviceFamily.js.map +1 -1
  75. package/build/ios/Entitlements.js +4 -45
  76. package/build/ios/Entitlements.js.map +1 -1
  77. package/build/ios/Google.d.ts +2 -2
  78. package/build/ios/Google.js +11 -66
  79. package/build/ios/Google.js.map +1 -1
  80. package/build/ios/IosConfig.types.d.ts +6 -11
  81. package/build/ios/IosConfig.types.js.map +1 -1
  82. package/build/ios/Locales.d.ts +3 -3
  83. package/build/ios/Locales.js +12 -43
  84. package/build/ios/Locales.js.map +1 -1
  85. package/build/ios/Maps.js +15 -53
  86. package/build/ios/Maps.js.map +1 -1
  87. package/build/ios/Name.js +7 -31
  88. package/build/ios/Name.js.map +1 -1
  89. package/build/ios/Orientation.js +2 -10
  90. package/build/ios/Orientation.js.map +1 -1
  91. package/build/ios/Paths.d.ts +2 -2
  92. package/build/ios/Paths.js +8 -73
  93. package/build/ios/Paths.js.map +1 -1
  94. package/build/ios/Permissions.js +1 -16
  95. package/build/ios/Permissions.js.map +1 -1
  96. package/build/ios/ProvisioningProfile.d.ts +1 -1
  97. package/build/ios/ProvisioningProfile.js +0 -18
  98. package/build/ios/ProvisioningProfile.js.map +1 -1
  99. package/build/ios/RequiresFullScreen.js +19 -31
  100. package/build/ios/RequiresFullScreen.js.map +1 -1
  101. package/build/ios/Scheme.js +10 -32
  102. package/build/ios/Scheme.js.map +1 -1
  103. package/build/ios/Swift.js +16 -50
  104. package/build/ios/Swift.js.map +1 -1
  105. package/build/ios/Target.js +0 -30
  106. package/build/ios/Target.js.map +1 -1
  107. package/build/ios/Updates.js +10 -49
  108. package/build/ios/Updates.js.map +1 -1
  109. package/build/ios/UsesNonExemptEncryption.js +4 -10
  110. package/build/ios/UsesNonExemptEncryption.js.map +1 -1
  111. package/build/ios/Version.js +4 -11
  112. package/build/ios/Version.js.map +1 -1
  113. package/build/ios/XcodeProjectFile.js +5 -23
  114. package/build/ios/XcodeProjectFile.js.map +1 -1
  115. package/build/ios/codeMod.js +19 -60
  116. package/build/ios/codeMod.js.map +1 -1
  117. package/build/ios/index.js +0 -97
  118. package/build/ios/index.js.map +1 -1
  119. package/build/ios/utils/Xcodeproj.d.ts +6 -6
  120. package/build/ios/utils/Xcodeproj.js +15 -101
  121. package/build/ios/utils/Xcodeproj.js.map +1 -1
  122. package/build/ios/utils/getInfoPlistPath.js +2 -15
  123. package/build/ios/utils/getInfoPlistPath.js.map +1 -1
  124. package/build/ios/utils/string.js +0 -1
  125. package/build/ios/utils/string.js.map +1 -1
  126. package/build/plugins/android-plugins.d.ts +2 -2
  127. package/build/plugins/android-plugins.js +11 -42
  128. package/build/plugins/android-plugins.js.map +1 -1
  129. package/build/plugins/createBaseMod.d.ts +3 -3
  130. package/build/plugins/createBaseMod.js +8 -25
  131. package/build/plugins/createBaseMod.js.map +1 -1
  132. package/build/plugins/ios-plugins.d.ts +2 -2
  133. package/build/plugins/ios-plugins.js +8 -48
  134. package/build/plugins/ios-plugins.js.map +1 -1
  135. package/build/plugins/mod-compiler.js +21 -72
  136. package/build/plugins/mod-compiler.js.map +1 -1
  137. package/build/plugins/withAndroidBaseMods.d.ts +1 -1
  138. package/build/plugins/withAndroidBaseMods.js +4 -89
  139. package/build/plugins/withAndroidBaseMods.js.map +1 -1
  140. package/build/plugins/withDangerousMod.js +0 -5
  141. package/build/plugins/withDangerousMod.js.map +1 -1
  142. package/build/plugins/withIosBaseMods.d.ts +1 -1
  143. package/build/plugins/withIosBaseMods.js +26 -118
  144. package/build/plugins/withIosBaseMods.js.map +1 -1
  145. package/build/plugins/withMod.d.ts +1 -1
  146. package/build/plugins/withMod.js +24 -59
  147. package/build/plugins/withMod.js.map +1 -1
  148. package/build/plugins/withPlugins.js +0 -9
  149. package/build/plugins/withPlugins.js.map +1 -1
  150. package/build/plugins/withRunOnce.js +3 -9
  151. package/build/plugins/withRunOnce.js.map +1 -1
  152. package/build/plugins/withStaticPlugin.js +21 -43
  153. package/build/plugins/withStaticPlugin.js.map +1 -1
  154. package/build/utils/BuildProperties.types.d.ts +2 -2
  155. package/build/utils/BuildProperties.types.js.map +1 -1
  156. package/build/utils/Updates.d.ts +3 -1
  157. package/build/utils/Updates.js +18 -77
  158. package/build/utils/Updates.js.map +1 -1
  159. package/build/utils/XML.d.ts +1 -1
  160. package/build/utils/XML.js +7 -44
  161. package/build/utils/XML.js.map +1 -1
  162. package/build/utils/commonCodeMod.js +2 -10
  163. package/build/utils/commonCodeMod.js.map +1 -1
  164. package/build/utils/errors.d.ts +1 -1
  165. package/build/utils/errors.js +3 -11
  166. package/build/utils/errors.js.map +1 -1
  167. package/build/utils/fs.js +1 -12
  168. package/build/utils/fs.js.map +1 -1
  169. package/build/utils/generateCode.d.ts +1 -1
  170. package/build/utils/generateCode.js +8 -25
  171. package/build/utils/generateCode.js.map +1 -1
  172. package/build/utils/history.d.ts +1 -1
  173. package/build/utils/history.js +0 -6
  174. package/build/utils/history.js.map +1 -1
  175. package/build/utils/matchBrackets.d.ts +3 -3
  176. package/build/utils/matchBrackets.js +2 -17
  177. package/build/utils/matchBrackets.js.map +1 -1
  178. package/build/utils/modules.js +0 -10
  179. package/build/utils/modules.js.map +1 -1
  180. package/build/utils/obj.js +0 -4
  181. package/build/utils/obj.js.map +1 -1
  182. package/build/utils/plugin-resolver.js +25 -69
  183. package/build/utils/plugin-resolver.js.map +1 -1
  184. package/build/utils/sortObject.js +4 -10
  185. package/build/utils/sortObject.js.map +1 -1
  186. package/build/utils/versions.js +0 -10
  187. package/build/utils/versions.js.map +1 -1
  188. package/build/utils/warnings.js +1 -9
  189. package/build/utils/warnings.js.map +1 -1
  190. package/package.json +5 -5
@@ -4,49 +4,35 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.setProvisioningProfileForPbxproj = setProvisioningProfileForPbxproj;
7
-
8
7
  function _fs() {
9
8
  const data = _interopRequireDefault(require("fs"));
10
-
11
9
  _fs = function () {
12
10
  return data;
13
11
  };
14
-
15
12
  return data;
16
13
  }
17
-
18
14
  function _Target() {
19
15
  const data = require("./Target");
20
-
21
16
  _Target = function () {
22
17
  return data;
23
18
  };
24
-
25
19
  return data;
26
20
  }
27
-
28
21
  function _Xcodeproj() {
29
22
  const data = require("./utils/Xcodeproj");
30
-
31
23
  _Xcodeproj = function () {
32
24
  return data;
33
25
  };
34
-
35
26
  return data;
36
27
  }
37
-
38
28
  function _string() {
39
29
  const data = require("./utils/string");
40
-
41
30
  _string = function () {
42
31
  return data;
43
32
  };
44
-
45
33
  return data;
46
34
  }
47
-
48
35
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
49
-
50
36
  function setProvisioningProfileForPbxproj(projectRoot, {
51
37
  targetName,
52
38
  profileName,
@@ -67,19 +53,15 @@ function setProvisioningProfileForPbxproj(projectRoot, {
67
53
  if (!item.attributes.TargetAttributes[nativeTargetId]) {
68
54
  item.attributes.TargetAttributes[nativeTargetId] = {};
69
55
  }
70
-
71
56
  item.attributes.TargetAttributes[nativeTargetId].DevelopmentTeam = quotedAppleTeamId;
72
57
  item.attributes.TargetAttributes[nativeTargetId].ProvisioningStyle = 'Manual';
73
58
  });
74
-
75
59
  _fs().default.writeFileSync(project.filepath, project.writeSync());
76
60
  }
77
-
78
61
  const ensureQuotes = value => {
79
62
  if (!value.match(/^['"]/)) {
80
63
  return `"${value}"`;
81
64
  }
82
-
83
65
  return value;
84
66
  };
85
67
  //# sourceMappingURL=ProvisioningProfile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProvisioningProfile.js","names":["setProvisioningProfileForPbxproj","projectRoot","targetName","profileName","appleTeamId","buildConfiguration","project","getPbxproj","nativeTargetEntry","findNativeTargetByName","findFirstNativeTarget","nativeTargetId","nativeTarget","quotedAppleTeamId","ensureQuotes","getBuildConfigurationsForListId","buildConfigurationList","filter","item","trimQuotes","name","forEach","buildSettings","PROVISIONING_PROFILE_SPECIFIER","DEVELOPMENT_TEAM","CODE_SIGN_IDENTITY","CODE_SIGN_STYLE","Object","entries","getProjectSection","isNotComment","attributes","TargetAttributes","DevelopmentTeam","ProvisioningStyle","fs","writeFileSync","filepath","writeSync","value","match"],"sources":["../../src/ios/ProvisioningProfile.ts"],"sourcesContent":["import fs from 'fs';\n\nimport { findFirstNativeTarget, findNativeTargetByName } from './Target';\nimport {\n ConfigurationSectionEntry,\n getBuildConfigurationsForListId,\n getPbxproj,\n getProjectSection,\n isNotComment,\n ProjectSectionEntry,\n} from './utils/Xcodeproj';\nimport { trimQuotes } from './utils/string';\n\ntype ProvisioningProfileSettings = {\n targetName?: string;\n appleTeamId: string;\n profileName: string;\n buildConfiguration?: string;\n};\n\nexport function setProvisioningProfileForPbxproj(\n projectRoot: string,\n {\n targetName,\n profileName,\n appleTeamId,\n buildConfiguration = 'Release',\n }: ProvisioningProfileSettings\n): void {\n const project = getPbxproj(projectRoot);\n\n const nativeTargetEntry = targetName\n ? findNativeTargetByName(project, targetName)\n : findFirstNativeTarget(project);\n const [nativeTargetId, nativeTarget] = nativeTargetEntry;\n\n const quotedAppleTeamId = ensureQuotes(appleTeamId);\n\n getBuildConfigurationsForListId(project, nativeTarget.buildConfigurationList)\n .filter(([, item]: ConfigurationSectionEntry) => trimQuotes(item.name) === buildConfiguration)\n .forEach(([, item]: ConfigurationSectionEntry) => {\n item.buildSettings.PROVISIONING_PROFILE_SPECIFIER = `\"${profileName}\"`;\n item.buildSettings.DEVELOPMENT_TEAM = quotedAppleTeamId;\n item.buildSettings.CODE_SIGN_IDENTITY = '\"iPhone Distribution\"';\n item.buildSettings.CODE_SIGN_STYLE = 'Manual';\n });\n\n Object.entries(getProjectSection(project))\n .filter(isNotComment)\n .forEach(([, item]: ProjectSectionEntry) => {\n if (!item.attributes.TargetAttributes[nativeTargetId]) {\n item.attributes.TargetAttributes[nativeTargetId] = {};\n }\n item.attributes.TargetAttributes[nativeTargetId].DevelopmentTeam = quotedAppleTeamId;\n item.attributes.TargetAttributes[nativeTargetId].ProvisioningStyle = 'Manual';\n });\n\n fs.writeFileSync(project.filepath, project.writeSync());\n}\n\nconst ensureQuotes = (value: string) => {\n if (!value.match(/^['\"]/)) {\n return `\"${value}\"`;\n }\n return value;\n};\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAQA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AASO,SAASA,gCAAT,CACLC,WADK,EAEL;EACEC,UADF;EAEEC,WA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iBAAnE;IACAK,IAAI,CAACa,UAAL,CAAgBC,gBAAhB,CAAiCrB,cAAjC,EAAiDuB,iBAAjD,GAAqE,QAArE;EACD,CARH;;EAUAC,aAAA,CAAGC,aAAH,CAAiB9B,OAAO,CAAC+B,QAAzB,EAAmC/B,OAAO,CAACgC,SAAR,EAAnC;AACD;;AAED,MAAMxB,YAAY,GAAIyB,KAAD,IAAmB;EACtC,IAAI,CAACA,KAAK,CAACC,KAAN,CAAY,OAAZ,CAAL,EAA2B;IACzB,OAAQ,IAAGD,KAAM,GAAjB;EACD;;EACD,OAAOA,KAAP;AACD,CALD"}
1
+ {"version":3,"file":"ProvisioningProfile.js","names":["setProvisioningProfileForPbxproj","projectRoot","targetName","profileName","appleTeamId","buildConfiguration","project","getPbxproj","nativeTargetEntry","findNativeTargetByName","findFirstNativeTarget","nativeTargetId","nativeTarget","quotedAppleTeamId","ensureQuotes","getBuildConfigurationsForListId","buildConfigurationList","filter","item","trimQuotes","name","forEach","buildSettings","PROVISIONING_PROFILE_SPECIFIER","DEVELOPMENT_TEAM","CODE_SIGN_IDENTITY","CODE_SIGN_STYLE","Object","entries","getProjectSection","isNotComment","attributes","TargetAttributes","DevelopmentTeam","ProvisioningStyle","fs","writeFileSync","filepath","writeSync","value","match"],"sources":["../../src/ios/ProvisioningProfile.ts"],"sourcesContent":["import fs from 'fs';\n\nimport { findFirstNativeTarget, findNativeTargetByName } from './Target';\nimport {\n ConfigurationSectionEntry,\n getBuildConfigurationsForListId,\n getPbxproj,\n getProjectSection,\n isNotComment,\n ProjectSectionEntry,\n} from './utils/Xcodeproj';\nimport { trimQuotes } from './utils/string';\n\ntype ProvisioningProfileSettings = {\n targetName?: string;\n appleTeamId: string;\n profileName: string;\n buildConfiguration?: string;\n};\n\nexport function setProvisioningProfileForPbxproj(\n projectRoot: string,\n {\n targetName,\n profileName,\n appleTeamId,\n buildConfiguration = 'Release',\n }: ProvisioningProfileSettings\n): void {\n const project = getPbxproj(projectRoot);\n\n const nativeTargetEntry = targetName\n ? findNativeTargetByName(project, targetName)\n : findFirstNativeTarget(project);\n const [nativeTargetId, nativeTarget] = nativeTargetEntry;\n\n const quotedAppleTeamId = ensureQuotes(appleTeamId);\n\n getBuildConfigurationsForListId(project, nativeTarget.buildConfigurationList)\n .filter(([, item]: ConfigurationSectionEntry) => trimQuotes(item.name) === buildConfiguration)\n .forEach(([, item]: ConfigurationSectionEntry) => {\n item.buildSettings.PROVISIONING_PROFILE_SPECIFIER = `\"${profileName}\"`;\n item.buildSettings.DEVELOPMENT_TEAM = quotedAppleTeamId;\n item.buildSettings.CODE_SIGN_IDENTITY = '\"iPhone Distribution\"';\n item.buildSettings.CODE_SIGN_STYLE = 'Manual';\n });\n\n Object.entries(getProjectSection(project))\n .filter(isNotComment)\n .forEach(([, item]: ProjectSectionEntry) => {\n if (!item.attributes.TargetAttributes[nativeTargetId]) {\n item.attributes.TargetAttributes[nativeTargetId] = {};\n }\n item.attributes.TargetAttributes[nativeTargetId].DevelopmentTeam = quotedAppleTeamId;\n item.attributes.TargetAttributes[nativeTargetId].ProvisioningStyle = 'Manual';\n });\n\n fs.writeFileSync(project.filepath, project.writeSync());\n}\n\nconst ensureQuotes = (value: string) => {\n if (!value.match(/^['\"]/)) {\n return `\"${value}\"`;\n }\n return value;\n};\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA4C;AASrC,SAASA,gCAAgC,CAC9CC,WAAmB,EACnB;EACEC,UAAU;EACVC,WAAW;EACXC,WAAW;EACXC,kBAAkB,GAAG;AACM,CAAC,EACxB;EACN,MAAMC,OAAO,GAAG,IAAAC,uBAAU,EAACN,WAAW,CAAC;EAEvC,MAAMO,iBAAiB,GAAGN,UAAU,GAChC,IAAAO,gCAAsB,EAACH,OAA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,EAAE/B,OAAO,CAACgC,SAAS,EAAE,CAAC;AACzD;AAEA,MAAMxB,YAAY,GAAIyB,KAAa,IAAK;EACtC,IAAI,CAACA,KAAK,CAACC,KAAK,CAAC,OAAO,CAAC,EAAE;IACzB,OAAQ,IAAGD,KAAM,GAAE;EACrB;EACA,OAAOA,KAAK;AACd,CAAC"}
@@ -6,71 +6,58 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getRequiresFullScreen = getRequiresFullScreen;
7
7
  exports.setRequiresFullScreen = setRequiresFullScreen;
8
8
  exports.withRequiresFullScreen = void 0;
9
-
10
9
  function _iosPlugins() {
11
10
  const data = require("../plugins/ios-plugins");
12
-
13
11
  _iosPlugins = function () {
14
12
  return data;
15
13
  };
16
-
17
14
  return data;
18
15
  }
19
-
20
16
  function _versions() {
21
17
  const data = require("../utils/versions");
22
-
23
18
  _versions = function () {
24
19
  return data;
25
20
  };
26
-
27
21
  return data;
28
22
  }
29
-
30
23
  function _warnings() {
31
24
  const data = require("../utils/warnings");
32
-
33
25
  _warnings = function () {
34
26
  return data;
35
27
  };
36
-
37
28
  return data;
38
29
  }
30
+ const withRequiresFullScreen = (0, _iosPlugins().createInfoPlistPlugin)(setRequiresFullScreen, 'withRequiresFullScreen');
39
31
 
40
- const withRequiresFullScreen = (0, _iosPlugins().createInfoPlistPlugin)(setRequiresFullScreen, 'withRequiresFullScreen'); // NOTES: This is defaulted to `true` for now to match the behavior prior to SDK
32
+ // NOTES: This is defaulted to `true` for now to match the behavior prior to SDK
41
33
  // 34, but will change to `false` in SDK +43.
42
-
43
34
  exports.withRequiresFullScreen = withRequiresFullScreen;
44
-
45
35
  function getRequiresFullScreen(config) {
46
36
  var _config$ios;
47
-
48
37
  // Yes, the property is called ios.requireFullScreen, without the s - not "requires"
49
38
  // This is confusing indeed because the actual property name does have the s
50
39
  if ((_config$ios = config.ios) !== null && _config$ios !== void 0 && _config$ios.hasOwnProperty('requireFullScreen')) {
51
40
  return !!config.ios.requireFullScreen;
52
41
  } else {
53
42
  // In SDK 43, the `requireFullScreen` default has been changed to false.
54
- if ((0, _versions().gteSdkVersion)(config, '43.0.0') // TODO: Uncomment after SDK 43 is released.
43
+ if ((0, _versions().gteSdkVersion)(config, '43.0.0')
44
+ // TODO: Uncomment after SDK 43 is released.
55
45
  // || !config.sdkVersion
56
46
  ) {
57
47
  return false;
58
48
  }
59
-
60
49
  return true;
61
50
  }
62
51
  }
63
-
64
52
  const iPadInterfaceKey = 'UISupportedInterfaceOrientations~ipad';
65
53
  const requiredIPadInterface = ['UIInterfaceOrientationPortrait', 'UIInterfaceOrientationPortraitUpsideDown', 'UIInterfaceOrientationLandscapeLeft', 'UIInterfaceOrientationLandscapeRight'];
66
-
67
54
  function isStringArray(value) {
68
55
  return Array.isArray(value) && value.every(value => typeof value === 'string');
69
56
  }
70
-
71
57
  function hasMinimumOrientations(masks) {
72
58
  return requiredIPadInterface.every(mask => masks.includes(mask));
73
59
  }
60
+
74
61
  /**
75
62
  * Require full screen being disabled requires all ipad interfaces to to be added,
76
63
  * otherwise submissions to the iOS App Store will fail.
@@ -80,35 +67,36 @@ function hasMinimumOrientations(masks) {
80
67
  * @param interfaceOrientations
81
68
  * @returns
82
69
  */
83
-
84
-
85
70
  function resolveExistingIpadInterfaceOrientations(interfaceOrientations) {
86
- if ( // Ensure type.
87
- isStringArray(interfaceOrientations) && // Don't warn if it's an empty array, this is invalid regardless.
88
- interfaceOrientations.length && // Check if the minimum requirements are met.
71
+ if (
72
+ // Ensure type.
73
+ isStringArray(interfaceOrientations) &&
74
+ // Don't warn if it's an empty array, this is invalid regardless.
75
+ interfaceOrientations.length &&
76
+ // Check if the minimum requirements are met.
89
77
  !hasMinimumOrientations(interfaceOrientations)) {
90
78
  const existingList = interfaceOrientations.join(', ');
91
79
  (0, _warnings().addWarningIOS)('ios.requireFullScreen', `iPad multitasking requires all \`${iPadInterfaceKey}\` orientations to be defined in the Info.plist. The Info.plist currently defines values that are incompatible with multitasking, these will be overwritten to prevent submission failure. Existing: ${existingList}`);
92
80
  return interfaceOrientations;
93
81
  }
94
-
95
82
  return [];
96
- } // Whether requires full screen on iPad
97
-
83
+ }
98
84
 
85
+ // Whether requires full screen on iPad
99
86
  function setRequiresFullScreen(config, infoPlist) {
100
87
  const requiresFullScreen = getRequiresFullScreen(config);
101
-
102
88
  if (!requiresFullScreen) {
103
- const existing = resolveExistingIpadInterfaceOrientations(infoPlist[iPadInterfaceKey]); // There currently exists no mechanism to safely undo this feature besides `expo prebuild --clear`,
89
+ const existing = resolveExistingIpadInterfaceOrientations(infoPlist[iPadInterfaceKey]);
90
+
91
+ // There currently exists no mechanism to safely undo this feature besides `expo prebuild --clear`,
104
92
  // this seems ok though because anyone using `UISupportedInterfaceOrientations~ipad` probably
105
93
  // wants them to be defined to this value anyways. This is also the default value used in the Xcode iOS template.
106
- // Merge any previous interfaces with the required interfaces.
107
94
 
95
+ // Merge any previous interfaces with the required interfaces.
108
96
  infoPlist[iPadInterfaceKey] = [...new Set(existing.concat(requiredIPadInterface))];
109
97
  }
110
-
111
- return { ...infoPlist,
98
+ return {
99
+ ...infoPlist,
112
100
  UIRequiresFullScreen: requiresFullScreen
113
101
  };
114
102
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RequiresFullScreen.js","names":["withRequiresFullScreen","createInfoPlistPlugin","setRequiresFullScreen","getRequiresFullScreen","config","ios","hasOwnProperty","requireFullScreen","gteSdkVersion","iPadInterfaceKey","requiredIPadInterface","isStringArray","value","Array","isArray","every","hasMinimumOrientations","masks","mask","includes","resolveExistingIpadInterfaceOrientations","interfaceOrientations","length","existingList","join","addWarningIOS","infoPlist","requiresFullScreen","existing","Set","concat","UIRequiresFullScreen"],"sources":["../../src/ios/RequiresFullScreen.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { createInfoPlistPlugin } from '../plugins/ios-plugins';\nimport { gteSdkVersion } from '../utils/versions';\nimport { addWarningIOS } from '../utils/warnings';\nimport { InfoPlist } from './IosConfig.types';\n\nexport const withRequiresFullScreen = createInfoPlistPlugin(\n setRequiresFullScreen,\n 'withRequiresFullScreen'\n);\n\n// NOTES: This is defaulted to `true` for now to match the behavior prior to SDK\n// 34, but will change to `false` in SDK +43.\nexport function getRequiresFullScreen(config: Pick<ExpoConfig, 'ios' | 'sdkVersion'>) {\n // Yes, the property is called ios.requireFullScreen, without the s - not \"requires\"\n // This is confusing indeed because the actual property name does have the s\n if (config.ios?.hasOwnProperty('requireFullScreen')) {\n return !!config.ios.requireFullScreen;\n } else {\n // In SDK 43, the `requireFullScreen` default has been changed to false.\n if (\n gteSdkVersion(config, '43.0.0')\n // TODO: Uncomment after SDK 43 is released.\n // || !config.sdkVersion\n ) {\n return false;\n }\n return true;\n }\n}\n\nconst iPadInterfaceKey = 'UISupportedInterfaceOrientations~ipad';\n\nconst requiredIPadInterface = [\n 'UIInterfaceOrientationPortrait',\n 'UIInterfaceOrientationPortraitUpsideDown',\n 'UIInterfaceOrientationLandscapeLeft',\n 'UIInterfaceOrientationLandscapeRight',\n];\n\nfunction isStringArray(value: any): value is string[] {\n return Array.isArray(value) && value.every((value) => typeof value === 'string');\n}\n\nfunction hasMinimumOrientations(masks: string[]): boolean {\n return requiredIPadInterface.every((mask) => masks.includes(mask));\n}\n\n/**\n * Require full screen being disabled requires all ipad interfaces to to be added,\n * otherwise submissions to the iOS App Store will fail.\n *\n * ERROR ITMS-90474: \"Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown' in bundle 'com.bacon.app'.\"\n *\n * @param interfaceOrientations\n * @returns\n */\nfunction resolveExistingIpadInterfaceOrientations(interfaceOrientations: any): string[] {\n if (\n // Ensure type.\n isStringArray(interfaceOrientations) &&\n // Don't warn if it's an empty array, this is invalid regardless.\n interfaceOrientations.length &&\n // Check if the minimum requirements are met.\n !hasMinimumOrientations(interfaceOrientations)\n ) {\n const existingList = interfaceOrientations!.join(', ');\n addWarningIOS(\n 'ios.requireFullScreen',\n `iPad multitasking requires all \\`${iPadInterfaceKey}\\` orientations to be defined in the Info.plist. The Info.plist currently defines values that are incompatible with multitasking, these will be overwritten to prevent submission failure. Existing: ${existingList}`\n );\n return interfaceOrientations;\n }\n return [];\n}\n\n// Whether requires full screen on iPad\nexport function setRequiresFullScreen(\n config: Pick<ExpoConfig, 'ios'>,\n infoPlist: InfoPlist\n): InfoPlist {\n const requiresFullScreen = getRequiresFullScreen(config);\n if (!requiresFullScreen) {\n const existing = resolveExistingIpadInterfaceOrientations(infoPlist[iPadInterfaceKey]);\n\n // There currently exists no mechanism to safely undo this feature besides `expo prebuild --clear`,\n // this seems ok though because anyone using `UISupportedInterfaceOrientations~ipad` probably\n // wants them to be defined to this value anyways. This is also the default value used in the Xcode iOS template.\n\n // Merge any previous interfaces with the required interfaces.\n infoPlist[iPadInterfaceKey] = [...new Set(existing.concat(requiredIPadInterface))];\n }\n\n return {\n ...infoPlist,\n UIRequiresFullScreen: requiresFullScreen,\n };\n}\n"],"mappings":";;;;;;;;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,sBAAsB,GAAG,IAAAC,mCAAA,EACpCC,qBADoC,EAEpC,wBAFoC,CAA/B,C,CAKP;AACA;;;;AACO,SAASC,qBAAT,CAA+BC,MAA/B,EAA+E;EAAA;;EACpF;EACA;EACA,mBAAIA,MAAM,CAACC,GAAX,wCAAI,YAAYC,cAAZ,CAA2B,mBAA3B,CAAJ,EAAqD;IACnD,OAAO,CAAC,CAACF,MAAM,CAACC,GAAP,CAAWE,iBAApB;EACD,CAFD,MAEO;IACL;IACA,IACE,IAAAC,yBAAA,EAAcJ,MAAd,EA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,CAAT,GAA8B,CAAC,GAAG,IAAIoB,GAAJ,CAAQD,QAAQ,CAACE,MAAT,CAAgBpB,qBAAhB,CAAR,CAAJ,CAA9B;EACD;;EAED,OAAO,EACL,GAAGgB,SADE;IAELK,oBAAoB,EAAEJ;EAFjB,CAAP;AAID"}
1
+ {"version":3,"file":"RequiresFullScreen.js","names":["withRequiresFullScreen","createInfoPlistPlugin","setRequiresFullScreen","getRequiresFullScreen","config","ios","hasOwnProperty","requireFullScreen","gteSdkVersion","iPadInterfaceKey","requiredIPadInterface","isStringArray","value","Array","isArray","every","hasMinimumOrientations","masks","mask","includes","resolveExistingIpadInterfaceOrientations","interfaceOrientations","length","existingList","join","addWarningIOS","infoPlist","requiresFullScreen","existing","Set","concat","UIRequiresFullScreen"],"sources":["../../src/ios/RequiresFullScreen.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { createInfoPlistPlugin } from '../plugins/ios-plugins';\nimport { gteSdkVersion } from '../utils/versions';\nimport { addWarningIOS } from '../utils/warnings';\nimport { InfoPlist } from './IosConfig.types';\n\nexport const withRequiresFullScreen = createInfoPlistPlugin(\n setRequiresFullScreen,\n 'withRequiresFullScreen'\n);\n\n// NOTES: This is defaulted to `true` for now to match the behavior prior to SDK\n// 34, but will change to `false` in SDK +43.\nexport function getRequiresFullScreen(config: Pick<ExpoConfig, 'ios' | 'sdkVersion'>) {\n // Yes, the property is called ios.requireFullScreen, without the s - not \"requires\"\n // This is confusing indeed because the actual property name does have the s\n if (config.ios?.hasOwnProperty('requireFullScreen')) {\n return !!config.ios.requireFullScreen;\n } else {\n // In SDK 43, the `requireFullScreen` default has been changed to false.\n if (\n gteSdkVersion(config, '43.0.0')\n // TODO: Uncomment after SDK 43 is released.\n // || !config.sdkVersion\n ) {\n return false;\n }\n return true;\n }\n}\n\nconst iPadInterfaceKey = 'UISupportedInterfaceOrientations~ipad';\n\nconst requiredIPadInterface = [\n 'UIInterfaceOrientationPortrait',\n 'UIInterfaceOrientationPortraitUpsideDown',\n 'UIInterfaceOrientationLandscapeLeft',\n 'UIInterfaceOrientationLandscapeRight',\n];\n\nfunction isStringArray(value: any): value is string[] {\n return Array.isArray(value) && value.every((value) => typeof value === 'string');\n}\n\nfunction hasMinimumOrientations(masks: string[]): boolean {\n return requiredIPadInterface.every((mask) => masks.includes(mask));\n}\n\n/**\n * Require full screen being disabled requires all ipad interfaces to to be added,\n * otherwise submissions to the iOS App Store will fail.\n *\n * ERROR ITMS-90474: \"Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown' in bundle 'com.bacon.app'.\"\n *\n * @param interfaceOrientations\n * @returns\n */\nfunction resolveExistingIpadInterfaceOrientations(interfaceOrientations: any): string[] {\n if (\n // Ensure type.\n isStringArray(interfaceOrientations) &&\n // Don't warn if it's an empty array, this is invalid regardless.\n interfaceOrientations.length &&\n // Check if the minimum requirements are met.\n !hasMinimumOrientations(interfaceOrientations)\n ) {\n const existingList = interfaceOrientations!.join(', ');\n addWarningIOS(\n 'ios.requireFullScreen',\n `iPad multitasking requires all \\`${iPadInterfaceKey}\\` orientations to be defined in the Info.plist. The Info.plist currently defines values that are incompatible with multitasking, these will be overwritten to prevent submission failure. Existing: ${existingList}`\n );\n return interfaceOrientations;\n }\n return [];\n}\n\n// Whether requires full screen on iPad\nexport function setRequiresFullScreen(\n config: Pick<ExpoConfig, 'ios'>,\n infoPlist: InfoPlist\n): InfoPlist {\n const requiresFullScreen = getRequiresFullScreen(config);\n if (!requiresFullScreen) {\n const existing = resolveExistingIpadInterfaceOrientations(infoPlist[iPadInterfaceKey]);\n\n // There currently exists no mechanism to safely undo this feature besides `expo prebuild --clear`,\n // this seems ok though because anyone using `UISupportedInterfaceOrientations~ipad` probably\n // wants them to be defined to this value anyways. This is also the default value used in the Xcode iOS template.\n\n // Merge any previous interfaces with the required interfaces.\n infoPlist[iPadInterfaceKey] = [...new Set(existing.concat(requiredIPadInterface))];\n }\n\n return {\n ...infoPlist,\n UIRequiresFullScreen: requiresFullScreen,\n };\n}\n"],"mappings":";;;;;;;;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,sBAAsB,GAAG,IAAAC,mCAAqB,EACzDC,qBAAqB,EACrB,wBAAwB,CACzB;;AAED;AACA;AAAA;AACO,SAASC,qBAAqB,CAACC,MAA8C,EAAE;EAAA;EACpF;EACA;EACA,mBAAIA,MAAM,CAACC,GAAG,wCAAV,YAAYC,cAAc,CAAC,mBAAmB,CAAC,EAAE;IACnD,OAAO,CAAC,CAACF,MAAM,CAACC,GAAG,CAACE,iBAAiB;EACvC,CAAC,MAAM;IACL;IACA,IACE,IAAAC,yBAAa,EAACJ,MAAM,EAAE,QAAQ;IAC9B;IACA;IAAA,EACA;MACA,OAAO,KAAK;IACd;IACA,OAAO,IAAI;EACb;AACF;AAEA,MAAMK,gBAAgB,GAAG,uCAAuC;AAEhE,MAAMC,qBAAqB,GAAG,CAC5B,gCAAgC,EAChC,0CAA0C,EAC1C,qCAAqC,EACrC,sCAAsC,CACvC;AAED,SAASC,aAAa,CAACC,KAAU,EAAqB;EACpD,OAAOC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IAAIA,KAAK,CAACG,KAAK,CAAEH,KAAK,IAAK,OAAOA,KAAK,KAAK,QAAQ,CAAC;AAClF;AAEA,SAASI,sBAAsB,CAACC,KAAe,EAAW;EACxD,OAAOP,qBAAqB,CAACK,KAAK,CAAEG,IAAI,IAAKD,KAAK,CAACE,QAAQ,CAACD,IAAI,CAAC,CAAC;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASE,wCAAwC,CAACC,qBAA0B,EAAY;EACtF;EACE;EACAV,aAAa,CAACU,qBAAqB,CAAC;EACpC;EACAA,qBAAqB,CAACC,MAAM;EAC5B;EACA,CAACN,sBAAsB,CAACK,qBAAqB,CAAC,EAC9C;IACA,MAAME,YAAY,GAAGF,qBAAqB,CAAEG,IAAI,CAAC,IAAI,CAAC;IACtD,IAAAC,yBAAa,EACX,uBAAuB,EACtB,oCAAmChB,gBAAiB,wMAAuMc,YAAa,EAAC,CAC3Q;IACD,OAAOF,qBAAqB;EAC9B;EACA,OAAO,EAAE;AACX;;AAEA;AACO,SAASnB,qBAAqB,CACnCE,MAA+B,EAC/BsB,SAAoB,EACT;EACX,MAAMC,kBAAkB,GAAGxB,qBAAqB,CAACC,MAAM,CAAC;EACxD,IAAI,CAACuB,kBAAkB,EAAE;IACvB,MAAMC,QAAQ,GAAGR,wCAAwC,CAACM,SAAS,CAACjB,gBAAgB,CAAC,CAAC;;IAEtF;IACA;IACA;;IAEA;IACAiB,SAAS,CAACjB,gBAAgB,CAAC,GAAG,CAAC,GAAG,IAAIoB,GAAG,CAACD,QAAQ,CAACE,MAAM,CAACpB,qBAAqB,CAAC,CAAC,CAAC;EACpF;EAEA,OAAO;IACL,GAAGgB,SAAS;IACZK,oBAAoB,EAAEJ;EACxB,CAAC;AACH"}
@@ -10,106 +10,87 @@ exports.hasScheme = hasScheme;
10
10
  exports.removeScheme = removeScheme;
11
11
  exports.setScheme = setScheme;
12
12
  exports.withScheme = void 0;
13
-
14
13
  function _iosPlugins() {
15
14
  const data = require("../plugins/ios-plugins");
16
-
17
15
  _iosPlugins = function () {
18
16
  return data;
19
17
  };
20
-
21
18
  return data;
22
19
  }
23
-
24
20
  const withScheme = (0, _iosPlugins().createInfoPlistPluginWithPropertyGuard)(setScheme, {
25
21
  infoPlistProperty: 'CFBundleURLTypes',
26
22
  expoConfigProperty: 'scheme'
27
23
  }, 'withScheme');
28
24
  exports.withScheme = withScheme;
29
-
30
25
  function getScheme(config) {
31
26
  if (Array.isArray(config.scheme)) {
32
27
  const validate = value => {
33
28
  return typeof value === 'string';
34
29
  };
35
-
36
30
  return config.scheme.filter(validate);
37
31
  } else if (typeof config.scheme === 'string') {
38
32
  return [config.scheme];
39
33
  }
40
-
41
34
  return [];
42
35
  }
43
-
44
36
  function setScheme(config, infoPlist) {
45
37
  var _config$ios, _config$ios2;
46
-
47
- const scheme = [...getScheme(config), // @ts-ignore: TODO: ios.scheme is an unreleased -- harder to add to turtle v1.
48
- ...getScheme((_config$ios = config.ios) !== null && _config$ios !== void 0 ? _config$ios : {})]; // Add the bundle identifier to the list of schemes for easier Google auth and parity with Turtle v1.
49
-
38
+ const scheme = [...getScheme(config),
39
+ // @ts-ignore: TODO: ios.scheme is an unreleased -- harder to add to turtle v1.
40
+ ...getScheme((_config$ios = config.ios) !== null && _config$ios !== void 0 ? _config$ios : {})];
41
+ // Add the bundle identifier to the list of schemes for easier Google auth and parity with Turtle v1.
50
42
  if ((_config$ios2 = config.ios) !== null && _config$ios2 !== void 0 && _config$ios2.bundleIdentifier) {
51
43
  scheme.push(config.ios.bundleIdentifier);
52
44
  }
53
-
54
45
  if (scheme.length === 0) {
55
46
  return infoPlist;
56
47
  }
57
-
58
- return { ...infoPlist,
48
+ return {
49
+ ...infoPlist,
59
50
  CFBundleURLTypes: [{
60
51
  CFBundleURLSchemes: scheme
61
52
  }]
62
53
  };
63
54
  }
64
-
65
55
  function appendScheme(scheme, infoPlist) {
66
56
  var _infoPlist$CFBundleUR;
67
-
68
57
  if (!scheme) {
69
58
  return infoPlist;
70
59
  }
71
-
72
60
  const existingSchemes = (_infoPlist$CFBundleUR = infoPlist.CFBundleURLTypes) !== null && _infoPlist$CFBundleUR !== void 0 ? _infoPlist$CFBundleUR : [];
73
-
74
61
  if (existingSchemes !== null && existingSchemes !== void 0 && existingSchemes.some(({
75
62
  CFBundleURLSchemes
76
63
  }) => CFBundleURLSchemes.includes(scheme))) {
77
64
  return infoPlist;
78
65
  }
79
-
80
- return { ...infoPlist,
66
+ return {
67
+ ...infoPlist,
81
68
  CFBundleURLTypes: [...existingSchemes, {
82
69
  CFBundleURLSchemes: [scheme]
83
70
  }]
84
71
  };
85
72
  }
86
-
87
73
  function removeScheme(scheme, infoPlist) {
88
74
  if (!scheme) {
89
75
  return infoPlist;
90
- } // No need to remove if we don't have any
91
-
76
+ }
92
77
 
78
+ // No need to remove if we don't have any
93
79
  if (!infoPlist.CFBundleURLTypes) {
94
80
  return infoPlist;
95
81
  }
96
-
97
82
  infoPlist.CFBundleURLTypes = infoPlist.CFBundleURLTypes.map(bundleUrlType => {
98
83
  const index = bundleUrlType.CFBundleURLSchemes.indexOf(scheme);
99
-
100
84
  if (index > -1) {
101
85
  bundleUrlType.CFBundleURLSchemes.splice(index, 1);
102
-
103
86
  if (bundleUrlType.CFBundleURLSchemes.length === 0) {
104
87
  return undefined;
105
88
  }
106
89
  }
107
-
108
90
  return bundleUrlType;
109
91
  }).filter(Boolean);
110
92
  return infoPlist;
111
93
  }
112
-
113
94
  function hasScheme(scheme, infoPlist) {
114
95
  const existingSchemes = infoPlist.CFBundleURLTypes;
115
96
  if (!Array.isArray(existingSchemes)) return false;
@@ -117,7 +98,6 @@ function hasScheme(scheme, infoPlist) {
117
98
  CFBundleURLSchemes: schemes
118
99
  }) => Array.isArray(schemes) ? schemes.includes(scheme) : false);
119
100
  }
120
-
121
101
  function getSchemesFromPlist(infoPlist) {
122
102
  if (Array.isArray(infoPlist.CFBundleURLTypes)) {
123
103
  return infoPlist.CFBundleURLTypes.reduce((schemes, {
@@ -126,11 +106,9 @@ function getSchemesFromPlist(infoPlist) {
126
106
  if (Array.isArray(CFBundleURLSchemes)) {
127
107
  return [...schemes, ...CFBundleURLSchemes];
128
108
  }
129
-
130
109
  return schemes;
131
110
  }, []);
132
111
  }
133
-
134
112
  return [];
135
113
  }
136
114
  //# sourceMappingURL=Scheme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Scheme.js","names":["withScheme","createInfoPlistPluginWithPropertyGuard","setScheme","infoPlistProperty","expoConfigProperty","getScheme","config","Array","isArray","scheme","validate","value","filter","infoPlist","ios","bundleIdentifier","push","length","CFBundleURLTypes","CFBundleURLSchemes","appendScheme","existingSchemes","some","includes","removeScheme","map","bundleUrlType","index","indexOf","splice","undefined","Boolean","hasScheme","schemes","getSchemesFromPlist","reduce"],"sources":["../../src/ios/Scheme.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { createInfoPlistPluginWithPropertyGuard } from '../plugins/ios-plugins';\nimport { InfoPlist, URLScheme } from './IosConfig.types';\n\nexport const withScheme = createInfoPlistPluginWithPropertyGuard(\n setScheme,\n {\n infoPlistProperty: 'CFBundleURLTypes',\n expoConfigProperty: 'scheme',\n },\n 'withScheme'\n);\n\nexport function getScheme(config: { scheme?: string | string[] }): string[] {\n if (Array.isArray(config.scheme)) {\n const validate = (value: any): value is string => {\n return typeof value === 'string';\n };\n return config.scheme.filter<string>(validate);\n } else if (typeof config.scheme === 'string') {\n return [config.scheme];\n }\n return [];\n}\n\nexport function setScheme(\n config: Partial<Pick<ExpoConfig, 'scheme' | 'ios'>>,\n infoPlist: InfoPlist\n): InfoPlist {\n const scheme = [\n ...getScheme(config),\n // @ts-ignore: TODO: ios.scheme is an unreleased -- harder to add to turtle v1.\n ...getScheme(config.ios ?? {}),\n ];\n // Add the bundle identifier to the list of schemes for easier Google auth and parity with Turtle v1.\n if (config.ios?.bundleIdentifier) {\n scheme.push(config.ios.bundleIdentifier);\n }\n if (scheme.length === 0) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n CFBundleURLTypes: [{ CFBundleURLSchemes: scheme }],\n };\n}\n\nexport function appendScheme(scheme: string | null, infoPlist: InfoPlist): InfoPlist {\n if (!scheme) {\n return infoPlist;\n }\n\n const existingSchemes = infoPlist.CFBundleURLTypes ?? [];\n if (existingSchemes?.some(({ CFBundleURLSchemes }) => CFBundleURLSchemes.includes(scheme))) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n CFBundleURLTypes: [\n ...existingSchemes,\n {\n CFBundleURLSchemes: [scheme],\n },\n ],\n };\n}\n\nexport function removeScheme(scheme: string | null, infoPlist: InfoPlist): InfoPlist {\n if (!scheme) {\n return infoPlist;\n }\n\n // No need to remove if we don't have any\n if (!infoPlist.CFBundleURLTypes) {\n return infoPlist;\n }\n\n infoPlist.CFBundleURLTypes = infoPlist.CFBundleURLTypes.map((bundleUrlType) => {\n const index = bundleUrlType.CFBundleURLSchemes.indexOf(scheme);\n if (index > -1) {\n bundleUrlType.CFBundleURLSchemes.splice(index, 1);\n if (bundleUrlType.CFBundleURLSchemes.length === 0) {\n return undefined;\n }\n }\n return bundleUrlType;\n }).filter(Boolean) as URLScheme[];\n\n return infoPlist;\n}\n\nexport function hasScheme(scheme: string, infoPlist: InfoPlist): boolean {\n const existingSchemes = infoPlist.CFBundleURLTypes;\n\n if (!Array.isArray(existingSchemes)) return false;\n\n return existingSchemes?.some(({ CFBundleURLSchemes: schemes }: any) =>\n Array.isArray(schemes) ? schemes.includes(scheme) : false\n );\n}\n\nexport function getSchemesFromPlist(infoPlist: InfoPlist): string[] {\n if (Array.isArray(infoPlist.CFBundleURLTypes)) {\n return infoPlist.CFBundleURLTypes.reduce<string[]>((schemes, { CFBundleURLSchemes }) => {\n if (Array.isArray(CFBundleURLSchemes)) {\n return [...schemes, ...CFBundleURLSchemes];\n }\n return schemes;\n }, []);\n }\n return [];\n}\n"],"mappings":";;;;;;;;;;;;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,UAAU,GAAG,IAAAC,oDAAA,EACxBC,SADwB,EAExB;EACEC,iBAAiB,EAAE,kBADrB;EAEEC,kBAAkB,EAAE;AAFtB,CAFwB,EAMxB,YANwB,CAAnB;;;AASA,SAASC,SAAT,CAAmBC,MAAnB,EAAqE;EAC1E,IAAIC,KAAK,CAACC,OAAN,CAAcF,MAAM,CAACG,MAArB,CAAJ,EAAkC;IAChC,MAAMC,Q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AClE,IAAIN,KAAK,CAACC,OAAN,CAAcK,SAAS,CAACK,gBAAxB,CAAJ,EAA+C;IAC7C,OAAOL,SAAS,CAACK,gBAAV,CAA2BiB,MAA3B,CAA4C,CAACF,OAAD,EAAU;MAAEd;IAAF,CAAV,KAAqC;MACtF,IAAIZ,KAAK,CAACC,OAAN,CAAcW,kBAAd,CAAJ,EAAuC;QACrC,OAAO,CAAC,GAAGc,OAAJ,EAAa,GAAGd,kBAAhB,CAAP;MACD;;MACD,OAAOc,OAAP;IACD,CALM,EAKJ,EALI,CAAP;EAMD;;EACD,OAAO,EAAP;AACD"}
1
+ {"version":3,"file":"Scheme.js","names":["withScheme","createInfoPlistPluginWithPropertyGuard","setScheme","infoPlistProperty","expoConfigProperty","getScheme","config","Array","isArray","scheme","validate","value","filter","infoPlist","ios","bundleIdentifier","push","length","CFBundleURLTypes","CFBundleURLSchemes","appendScheme","existingSchemes","some","includes","removeScheme","map","bundleUrlType","index","indexOf","splice","undefined","Boolean","hasScheme","schemes","getSchemesFromPlist","reduce"],"sources":["../../src/ios/Scheme.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { createInfoPlistPluginWithPropertyGuard } from '../plugins/ios-plugins';\nimport { InfoPlist, URLScheme } from './IosConfig.types';\n\nexport const withScheme = createInfoPlistPluginWithPropertyGuard(\n setScheme,\n {\n infoPlistProperty: 'CFBundleURLTypes',\n expoConfigProperty: 'scheme',\n },\n 'withScheme'\n);\n\nexport function getScheme(config: { scheme?: string | string[] }): string[] {\n if (Array.isArray(config.scheme)) {\n const validate = (value: any): value is string => {\n return typeof value === 'string';\n };\n return config.scheme.filter<string>(validate);\n } else if (typeof config.scheme === 'string') {\n return [config.scheme];\n }\n return [];\n}\n\nexport function setScheme(\n config: Partial<Pick<ExpoConfig, 'scheme' | 'ios'>>,\n infoPlist: InfoPlist\n): InfoPlist {\n const scheme = [\n ...getScheme(config),\n // @ts-ignore: TODO: ios.scheme is an unreleased -- harder to add to turtle v1.\n ...getScheme(config.ios ?? {}),\n ];\n // Add the bundle identifier to the list of schemes for easier Google auth and parity with Turtle v1.\n if (config.ios?.bundleIdentifier) {\n scheme.push(config.ios.bundleIdentifier);\n }\n if (scheme.length === 0) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n CFBundleURLTypes: [{ CFBundleURLSchemes: scheme }],\n };\n}\n\nexport function appendScheme(scheme: string | null, infoPlist: InfoPlist): InfoPlist {\n if (!scheme) {\n return infoPlist;\n }\n\n const existingSchemes = infoPlist.CFBundleURLTypes ?? [];\n if (existingSchemes?.some(({ CFBundleURLSchemes }) => CFBundleURLSchemes.includes(scheme))) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n CFBundleURLTypes: [\n ...existingSchemes,\n {\n CFBundleURLSchemes: [scheme],\n },\n ],\n };\n}\n\nexport function removeScheme(scheme: string | null, infoPlist: InfoPlist): InfoPlist {\n if (!scheme) {\n return infoPlist;\n }\n\n // No need to remove if we don't have any\n if (!infoPlist.CFBundleURLTypes) {\n return infoPlist;\n }\n\n infoPlist.CFBundleURLTypes = infoPlist.CFBundleURLTypes.map((bundleUrlType) => {\n const index = bundleUrlType.CFBundleURLSchemes.indexOf(scheme);\n if (index > -1) {\n bundleUrlType.CFBundleURLSchemes.splice(index, 1);\n if (bundleUrlType.CFBundleURLSchemes.length === 0) {\n return undefined;\n }\n }\n return bundleUrlType;\n }).filter(Boolean) as URLScheme[];\n\n return infoPlist;\n}\n\nexport function hasScheme(scheme: string, infoPlist: InfoPlist): boolean {\n const existingSchemes = infoPlist.CFBundleURLTypes;\n\n if (!Array.isArray(existingSchemes)) return false;\n\n return existingSchemes?.some(({ CFBundleURLSchemes: schemes }: any) =>\n Array.isArray(schemes) ? schemes.includes(scheme) : false\n );\n}\n\nexport function getSchemesFromPlist(infoPlist: InfoPlist): string[] {\n if (Array.isArray(infoPlist.CFBundleURLTypes)) {\n return infoPlist.CFBundleURLTypes.reduce<string[]>((schemes, { CFBundleURLSchemes }) => {\n if (Array.isArray(CFBundleURLSchemes)) {\n return [...schemes, ...CFBundleURLSchemes];\n }\n return schemes;\n }, []);\n }\n return [];\n}\n"],"mappings":";;;;;;;;;;;;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,UAAU,GAAG,IAAAC,oDAAsC,EAC9DC,SAAS,EACT;EACEC,iBAAiB,EAAE,kBAAkB;EACrCC,kBAAkB,EAAE;AACtB,CAAC,EACD,YAAY,CACb;AAAC;AAEK,SAASC,SAAS,CAACC,MAAsC,EAAY;EAC1E,IAAIC,KAAK,CAACC,OAAO,CAACF,MAAM,CAACG,MAAM,CAAC,EAAE;IAChC,MAAMC,QAAQ,GAAIC,KAAU,IAAsB;MAChD,OAAO,OAAOA,KAAK,KAAK,QAAQ;IAClC,CAAC;IACD,OAAOL,MAAM,CAACG,MAAM,CAACG,MAAM,CAASF,QAAQ,CAAC;EAC/C,CAAC,MAAM,IAAI,OAAOJ,MAAM,CAACG,MAAM,KAAK,QAAQ,EAAE;IAC5C,OAAO,CAACH,MAAM,CAACG,MAAM,CAAC;EACxB;EACA,OAAO,EAAE;AACX;AAEO,SAASP,SAAS,CACvBI,MAAmD,EACnDO,SAAoB,EACT;EAAA;EACX,MAAMJ,MAAM,GAAG,CACb,GAAGJ,SAAS,CAACC,MAAM,CAAC;EACpB;EACA,GAAGD,SAAS,gBAACC,MAAM,CAACQ,GAAG,qDAAI,CAAC,CAAC,CAAC,CAC/B;EACD;EACA,oBAAIR,MAAM,CAACQ,GAAG,yCAAV,aAAYC,gBAAgB,EAAE;IAChCN,MAAM,CAACO,IAAI,CAACV,MAAM,CAACQ,GAAG,CAACC,gBAAgB,CAAC;EAC1C;EACA,IAAIN,MAAM,CAACQ,MAAM,KAAK,CAAC,EAAE;IACvB,OAAOJ,SAAS;EAClB;EAEA,OAAO;IACL,GAAGA,SAAS;IACZK,gBAAgB,EAAE,CAAC;MAAEC,kBAAkB,EAAEV;IAAO,CAAC;EACnD,CAAC;AACH;A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