expo-targets 0.2.1 → 0.2.2

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/src/config.d.ts +23 -1
  2. package/build/plugin/src/config.d.ts.map +1 -1
  3. package/build/plugin/src/config.js +3 -1
  4. package/build/plugin/src/config.js.map +1 -1
  5. package/build/plugin/src/ios/config-plugins/withIOSTarget.d.ts.map +1 -1
  6. package/build/plugin/src/ios/config-plugins/withIOSTarget.js +17 -5
  7. package/build/plugin/src/ios/config-plugins/withIOSTarget.js.map +1 -1
  8. package/build/plugin/src/ios/config-plugins/withPodfile.d.ts.map +1 -1
  9. package/build/plugin/src/ios/config-plugins/withPodfile.js +3 -5
  10. package/build/plugin/src/ios/config-plugins/withPodfile.js.map +1 -1
  11. package/build/plugin/src/ios/config-plugins/withXcodeChanges.d.ts.map +1 -1
  12. package/build/plugin/src/ios/config-plugins/withXcodeChanges.js +63 -2
  13. package/build/plugin/src/ios/config-plugins/withXcodeChanges.js.map +1 -1
  14. package/build/plugin/src/ios/target.d.ts.map +1 -1
  15. package/build/plugin/src/ios/target.js +71 -11
  16. package/build/plugin/src/ios/target.js.map +1 -1
  17. package/build/plugin/src/ios/utils/index.d.ts +1 -0
  18. package/build/plugin/src/ios/utils/index.d.ts.map +1 -1
  19. package/build/plugin/src/ios/utils/index.js +2 -1
  20. package/build/plugin/src/ios/utils/index.js.map +1 -1
  21. package/build/plugin/src/ios/utils/plist.d.ts.map +1 -1
  22. package/build/plugin/src/ios/utils/plist.js +1 -0
  23. package/build/plugin/src/ios/utils/plist.js.map +1 -1
  24. package/build/plugin/src/ios/utils/podfile.d.ts.map +1 -1
  25. package/build/plugin/src/ios/utils/podfile.js +55 -22
  26. package/build/plugin/src/ios/utils/podfile.js.map +1 -1
  27. package/build/plugin/src/ios/utils/safari.d.ts +69 -0
  28. package/build/plugin/src/ios/utils/safari.d.ts.map +1 -0
  29. package/build/plugin/src/ios/utils/safari.js +359 -0
  30. package/build/plugin/src/ios/utils/safari.js.map +1 -0
  31. package/build/plugin/src/withTargetsDir.d.ts.map +1 -1
  32. package/build/plugin/src/withTargetsDir.js +34 -0
  33. package/build/plugin/src/withTargetsDir.js.map +1 -1
  34. package/build/src/Target.d.ts +8 -1
  35. package/build/src/Target.d.ts.map +1 -1
  36. package/build/src/Target.js +136 -26
  37. package/build/src/Target.js.map +1 -1
  38. package/build/src/index.d.ts +3 -1
  39. package/build/src/index.d.ts.map +1 -1
  40. package/build/src/index.js +14 -1
  41. package/build/src/index.js.map +1 -1
  42. package/build/src/modules/safari/index.d.ts +109 -0
  43. package/build/src/modules/safari/index.d.ts.map +1 -0
  44. package/build/src/modules/safari/index.js +288 -0
  45. package/build/src/modules/safari/index.js.map +1 -0
  46. package/metro/{src/index.ts → build/index.d.ts} +1 -0
  47. package/metro/build/index.d.ts.map +1 -0
  48. package/metro/build/index.js +6 -0
  49. package/metro/build/index.js.map +1 -0
  50. package/metro/build/withTargetsMetro.d.ts +5 -0
  51. package/metro/build/withTargetsMetro.d.ts.map +1 -0
  52. package/metro/build/withTargetsMetro.js +78 -0
  53. package/metro/build/withTargetsMetro.js.map +1 -0
  54. package/package.json +11 -1
  55. package/plugin/build/android/withAndroidAppBuildGradle.d.ts +7 -0
  56. package/plugin/build/android/withAndroidAppBuildGradle.d.ts.map +1 -0
  57. package/plugin/build/android/withAndroidAppBuildGradle.js +31 -0
  58. package/plugin/build/android/withAndroidAppBuildGradle.js.map +1 -0
  59. package/plugin/build/android/withAndroidTarget.d.ts +10 -0
  60. package/plugin/build/android/withAndroidTarget.d.ts.map +1 -0
  61. package/plugin/build/android/withAndroidTarget.js +22 -0
  62. package/plugin/build/android/withAndroidTarget.js.map +1 -0
  63. package/plugin/build/android/withAndroidWidget.d.ts +13 -0
  64. package/plugin/build/android/withAndroidWidget.d.ts.map +1 -0
  65. package/plugin/build/android/withAndroidWidget.js +564 -0
  66. package/plugin/build/android/withAndroidWidget.js.map +1 -0
  67. package/plugin/build/config.d.ts +163 -0
  68. package/plugin/build/config.d.ts.map +1 -0
  69. package/plugin/build/config.js +56 -0
  70. package/plugin/build/config.js.map +1 -0
  71. package/plugin/build/index.d.ts +9 -0
  72. package/plugin/build/index.d.ts.map +1 -0
  73. package/plugin/build/index.js +11 -0
  74. package/plugin/build/index.js.map +1 -0
  75. package/plugin/build/ios/config-plugins/withEntitlements.d.ts +11 -0
  76. package/plugin/build/ios/config-plugins/withEntitlements.d.ts.map +1 -0
  77. package/plugin/build/ios/config-plugins/withEntitlements.js +49 -0
  78. package/plugin/build/ios/config-plugins/withEntitlements.js.map +1 -0
  79. package/plugin/build/ios/config-plugins/withIOSTarget.d.ts +17 -0
  80. package/plugin/build/ios/config-plugins/withIOSTarget.d.ts.map +1 -0
  81. package/plugin/build/ios/config-plugins/withIOSTarget.js +164 -0
  82. package/plugin/build/ios/config-plugins/withIOSTarget.js.map +1 -0
  83. package/plugin/build/ios/config-plugins/withIosColorset.d.ts +8 -0
  84. package/plugin/build/ios/config-plugins/withIosColorset.d.ts.map +1 -0
  85. package/plugin/build/ios/config-plugins/withIosColorset.js +25 -0
  86. package/plugin/build/ios/config-plugins/withIosColorset.js.map +1 -0
  87. package/plugin/build/ios/config-plugins/withIosStickerPack.d.ts +8 -0
  88. package/plugin/build/ios/config-plugins/withIosStickerPack.d.ts.map +1 -0
  89. package/plugin/build/ios/config-plugins/withIosStickerPack.js +52 -0
  90. package/plugin/build/ios/config-plugins/withIosStickerPack.js.map +1 -0
  91. package/plugin/build/ios/config-plugins/withPodfile.d.ts +12 -0
  92. package/plugin/build/ios/config-plugins/withPodfile.d.ts.map +1 -0
  93. package/plugin/build/ios/config-plugins/withPodfile.js +160 -0
  94. package/plugin/build/ios/config-plugins/withPodfile.js.map +1 -0
  95. package/plugin/build/ios/config-plugins/withXcodeChanges.d.ts +15 -0
  96. package/plugin/build/ios/config-plugins/withXcodeChanges.d.ts.map +1 -0
  97. package/plugin/build/ios/config-plugins/withXcodeChanges.js +707 -0
  98. package/plugin/build/ios/config-plugins/withXcodeChanges.js.map +1 -0
  99. package/plugin/build/ios/target.d.ts +41 -0
  100. package/plugin/build/ios/target.d.ts.map +1 -0
  101. package/plugin/build/ios/target.js +634 -0
  102. package/plugin/build/ios/target.js.map +1 -0
  103. package/plugin/build/ios/utils/asset.d.ts +60 -0
  104. package/plugin/build/ios/utils/asset.d.ts.map +1 -0
  105. package/plugin/build/ios/utils/asset.js +375 -0
  106. package/plugin/build/ios/utils/asset.js.map +1 -0
  107. package/plugin/build/ios/utils/file.d.ts +33 -0
  108. package/plugin/build/ios/utils/file.d.ts.map +1 -0
  109. package/plugin/build/ios/utils/file.js +88 -0
  110. package/plugin/build/ios/utils/file.js.map +1 -0
  111. package/plugin/{src/ios/utils/index.ts → build/ios/utils/index.d.ts} +2 -1
  112. package/plugin/build/ios/utils/index.d.ts.map +1 -0
  113. package/plugin/build/ios/utils/index.js +39 -0
  114. package/plugin/build/ios/utils/index.js.map +1 -0
  115. package/plugin/build/ios/utils/paths.d.ts +128 -0
  116. package/plugin/build/ios/utils/paths.d.ts.map +1 -0
  117. package/plugin/build/ios/utils/paths.js +141 -0
  118. package/plugin/build/ios/utils/paths.js.map +1 -0
  119. package/plugin/build/ios/utils/plist.d.ts +29 -0
  120. package/plugin/build/ios/utils/plist.d.ts.map +1 -0
  121. package/plugin/build/ios/utils/plist.js +115 -0
  122. package/plugin/build/ios/utils/plist.js.map +1 -0
  123. package/plugin/build/ios/utils/podfile.d.ts +82 -0
  124. package/plugin/build/ios/utils/podfile.d.ts.map +1 -0
  125. package/plugin/build/ios/utils/podfile.js +441 -0
  126. package/plugin/build/ios/utils/podfile.js.map +1 -0
  127. package/plugin/build/ios/utils/reactNativeSwift.d.ts +11 -0
  128. package/plugin/build/ios/utils/reactNativeSwift.d.ts.map +1 -0
  129. package/plugin/build/ios/utils/reactNativeSwift.js +263 -0
  130. package/plugin/build/ios/utils/reactNativeSwift.js.map +1 -0
  131. package/plugin/build/ios/utils/safari.d.ts +69 -0
  132. package/plugin/build/ios/utils/safari.d.ts.map +1 -0
  133. package/plugin/build/ios/utils/safari.js +359 -0
  134. package/plugin/build/ios/utils/safari.js.map +1 -0
  135. package/plugin/build/ios/utils/xcode.d.ts +185 -0
  136. package/plugin/build/ios/utils/xcode.d.ts.map +1 -0
  137. package/plugin/build/ios/utils/xcode.js +706 -0
  138. package/plugin/build/ios/utils/xcode.js.map +1 -0
  139. package/plugin/build/logger.d.ts +10 -0
  140. package/plugin/build/logger.d.ts.map +1 -0
  141. package/plugin/build/logger.js +62 -0
  142. package/plugin/build/logger.js.map +1 -0
  143. package/plugin/build/parseTargetConfig.d.ts +3 -0
  144. package/plugin/build/parseTargetConfig.d.ts.map +1 -0
  145. package/plugin/build/parseTargetConfig.js +113 -0
  146. package/plugin/build/parseTargetConfig.js.map +1 -0
  147. package/plugin/build/withTargetsDir.d.ts +6 -0
  148. package/plugin/build/withTargetsDir.d.ts.map +1 -0
  149. package/plugin/build/withTargetsDir.js +124 -0
  150. package/plugin/build/withTargetsDir.js.map +1 -0
  151. package/.eslintrc.js +0 -2
  152. package/metro/src/withTargetsMetro.ts +0 -72
  153. package/metro/tsconfig.build.json +0 -9
  154. package/plugin/src/android/withAndroidAppBuildGradle.ts +0 -34
  155. package/plugin/src/android/withAndroidTarget.ts +0 -26
  156. package/plugin/src/android/withAndroidWidget.ts +0 -778
  157. package/plugin/src/config.ts +0 -255
  158. package/plugin/src/index.ts +0 -19
  159. package/plugin/src/ios/config-plugins/withEntitlements.ts +0 -69
  160. package/plugin/src/ios/config-plugins/withIOSTarget.ts +0 -179
  161. package/plugin/src/ios/config-plugins/withIosColorset.ts +0 -29
  162. package/plugin/src/ios/config-plugins/withIosStickerPack.ts +0 -65
  163. package/plugin/src/ios/config-plugins/withPodfile.ts +0 -238
  164. package/plugin/src/ios/config-plugins/withXcodeChanges.ts +0 -891
  165. package/plugin/src/ios/target.ts +0 -668
  166. package/plugin/src/ios/utils/asset.ts +0 -490
  167. package/plugin/src/ios/utils/file.ts +0 -80
  168. package/plugin/src/ios/utils/paths.ts +0 -253
  169. package/plugin/src/ios/utils/plist.ts +0 -101
  170. package/plugin/src/ios/utils/podfile.ts +0 -534
  171. package/plugin/src/ios/utils/reactNativeSwift.ts +0 -283
  172. package/plugin/src/ios/utils/xcode.ts +0 -989
  173. package/plugin/src/logger.ts +0 -63
  174. package/plugin/src/parseTargetConfig.ts +0 -115
  175. package/plugin/src/types/normalize-colors.d.ts +0 -3
  176. package/plugin/src/withTargetsDir.ts +0 -120
  177. package/plugin/tsconfig.build.json +0 -9
  178. package/plugin/tsconfig.json +0 -9
  179. package/src/Target.ts +0 -239
  180. package/src/index.ts +0 -52
  181. package/src/modules/extension/index.ts +0 -54
  182. package/src/modules/messages/index.ts +0 -124
  183. package/src/modules/storage/index.ts +0 -126
  184. package/tsconfig.json +0 -8
  185. /package/plugin/{src → build}/ios/templates/MessagesViewController.swift +0 -0
  186. /package/plugin/{src → build}/ios/templates/ReactNativeViewController.swift +0 -0
  187. /package/plugin/{src → build}/ios/templates/action-extension-data.swift +0 -0
  188. /package/plugin/{src → build}/ios/templates/clip-extension-data.swift +0 -0
  189. /package/plugin/{src → build}/ios/templates/messages-extension-data.swift +0 -0
  190. /package/plugin/{src → build}/ios/templates/share-extension-data.swift +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withIosStickerPack.js","sourceRoot":"","sources":["../../../src/ios/config-plugins/withIosStickerPack.ts"],"names":[],"mappings":";;;;;;AAAA,yDAAsE;AACtE,4CAAoB;AACpB,gDAAwB;AAExB,oCAAwC;AAEjC,MAAM,kBAAkB,GAK1B,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;IACrB,OAAO,IAAA,iCAAgB,EAAC,MAAM,EAAE;QAC9B,KAAK;QACL,KAAK,EAAE,MAAM,EAAE,EAAE;YACf,MAAM,eAAe,GAAG,aAAK,CAAC,kBAAkB,CAAC;gBAC/C,mBAAmB,EAAE,MAA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,EAAE,CAC/D,CAAC;gBACJ,CAAC;YACH,CAAC,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AA1DW,QAAA,kBAAkB,sBA0D7B"}
@@ -0,0 +1,12 @@
1
+ import { ConfigPlugin } from '@expo/config-plugins';
2
+ import { type ExtensionType } from '../../config';
3
+ import { Logger } from '../../logger';
4
+ export declare const withTargetPodfile: ConfigPlugin<{
5
+ targetName: string;
6
+ deploymentTarget: string;
7
+ extensionType: ExtensionType;
8
+ excludedPackages?: string[];
9
+ standalone?: boolean;
10
+ logger: Logger;
11
+ }>;
12
+ //# sourceMappingURL=withPodfile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withPodfile.d.ts","sourceRoot":"","sources":["../../../src/ios/config-plugins/withPodfile.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAKtC,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAoNA,CAAC"}
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.withTargetPodfile = void 0;
7
+ const config_plugins_1 = require("@expo/config-plugins");
8
+ const path_1 = __importDefault(require("path"));
9
+ const utils_1 = require("../utils");
10
+ const { getProjectName } = config_plugins_1.IOSConfig.XcodeUtils;
11
+ const withTargetPodfile = (config, props) => {
12
+ return (0, config_plugins_1.withDangerousMod)(config, [
13
+ 'ios',
14
+ async (config) => {
15
+ const podfilePath = path_1.default.join(config.modRequest.platformProjectRoot, 'Podfile');
16
+ let podfile = utils_1.File.readFileIfExists(podfilePath);
17
+ if (!podfile) {
18
+ throw new Error(`Podfile not found at ${podfilePath}`);
19
+ }
20
+ // Remove existing target block if present (ensures correct placement on rebuild)
21
+ if (utils_1.Podfile.hasTargetBlock(podfile, props.targetName)) {
22
+ props.logger.log(`Removing existing '${props.targetName}' target to ensure correct placement`);
23
+ podfile = utils_1.Podfile.removeTargetBlock(podfile, props.targetName);
24
+ }
25
+ const projectRoot = config.modRequest.projectRoot;
26
+ const mainTargetName = getProjectName(projectRoot);
27
+ // Ensure main app has use_frameworks! for CocoaPods compatibility
28
+ // Both React Native and standalone extensions need main app to have matching setting
29
+ podfile = utils_1.Podfile.ensureMainTargetUsesFrameworks(podfile, mainTargetName);
30
+ // For standalone targets, detect main app's use_frameworks! setting
31
+ // CocoaPods requires host app and extensions to have matching use_frameworks! settings
32
+ const mainUsesFrameworks = props.standalone
33
+ ? utils_1.Podfile.mainTargetUsesFrameworks(podfile, mainTargetName)
34
+ : undefined;
35
+ // Generate appropriate target block based on type
36
+ // React Native targets are nested inside main target to inherit dependencies
37
+ const targetBlock = props.standalone
38
+ ? utils_1.Podfile.generateStandaloneTargetBlock({
39
+ targetName: props.targetName,
40
+ deploymentTarget: props.deploymentTarget,
41
+ useFrameworks: mainUsesFrameworks,
42
+ })
43
+ : utils_1.Podfile.generateReactNativeTargetBlock({
44
+ targetName: props.targetName,
45
+ deploymentTarget: props.deploymentTarget,
46
+ extensionType: props.extensionType,
47
+ });
48
+ props.logger.log(`Updated Podfile for ${props.standalone ? 'standalone' : 'React Native'} target: ${props.targetName}`);
49
+ // Insert target block into Podfile
50
+ // Standalone: sibling to avoid Expo autolinking, RN: nested to inherit
51
+ podfile = utils_1.Podfile.insertTargetBlock(podfile, targetBlock, props.standalone, props.logger);
52
+ // For React Native targets, ensure framework search paths are configured
53
+ // inherit! :search_paths needs additional framework search paths for Swift imports
54
+ if (!props.standalone) {
55
+ // Find all React Native extension targets nested inside main target
56
+ // These targets use inherit! :search_paths to avoid inheriting incompatible pods like Expo
57
+ const reactNativeTargets = [];
58
+ // Find the main target block and extract nested targets from within it
59
+ const mainTargetStart = podfile.indexOf(`target '${mainTargetName}' do`);
60
+ if (mainTargetStart >= 0) {
61
+ // Find the closing 'end' of the main target (before post_install)
62
+ const postInstallStart = podfile.indexOf('post_install do', mainTargetStart);
63
+ const mainTargetBlock = postInstallStart >= 0
64
+ ? podfile.substring(mainTargetStart, postInstallStart)
65
+ : podfile.substring(mainTargetStart);
66
+ // Match nested target blocks within main target that have inherit! :complete
67
+ // Look for lines that match: target 'Name' do ... inherit! :complete ... end
68
+ // We need to match complete target blocks, so we'll look for the pattern
69
+ // and verify it's a nested target (not the main target itself)
70
+ const lines = mainTargetBlock.split('\n');
71
+ let inNestedTarget = false;
72
+ let currentTargetName = '';
73
+ let currentTargetLines = [];
74
+ let nestedTargetDepth = 0;
75
+ for (let i = 0; i < lines.length; i++) {
76
+ const line = lines[i];
77
+ // Check if this line starts a nested target
78
+ const targetMatch = line.match(/^\s+target\s+'([^']+)'\s+do/);
79
+ if (targetMatch && targetMatch[1] !== mainTargetName) {
80
+ inNestedTarget = true;
81
+ currentTargetName = targetMatch[1];
82
+ currentTargetLines = [line];
83
+ nestedTargetDepth = 1;
84
+ continue;
85
+ }
86
+ // If we're in a nested target, collect lines until we find the closing 'end'
87
+ if (inNestedTarget) {
88
+ currentTargetLines.push(line);
89
+ // Count nested blocks (do/end pairs)
90
+ if (line.match(/\bdo\b/)) {
91
+ nestedTargetDepth++;
92
+ }
93
+ if (line.match(/\bend\b/)) {
94
+ nestedTargetDepth--;
95
+ // If depth is 0, we've closed the target block
96
+ if (nestedTargetDepth === 0) {
97
+ const targetBlock = currentTargetLines.join('\n');
98
+ // Check if this target has inherit! :search_paths (React Native extensions)
99
+ if (targetBlock.includes('inherit! :search_paths')) {
100
+ // Extract deployment target
101
+ const platformMatch = targetBlock.match(/platform\s+:ios,\s+'([^']+)'/);
102
+ const version = platformMatch
103
+ ? platformMatch[1]
104
+ : props.deploymentTarget;
105
+ reactNativeTargets.push({
106
+ targetName: currentTargetName,
107
+ deploymentTarget: version,
108
+ });
109
+ }
110
+ // Reset for next target
111
+ inNestedTarget = false;
112
+ currentTargetName = '';
113
+ currentTargetLines = [];
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ if (reactNativeTargets.length > 0) {
120
+ // Inject framework search paths configuration into post_install hook
121
+ podfile = utils_1.Podfile.ensureReactNativeExtensionFrameworkPaths(podfile, reactNativeTargets, mainTargetName);
122
+ }
123
+ }
124
+ // For standalone targets, inject deployment target fixes into post_install hook
125
+ // Must be done in Podfile because xcconfig files are generated by CocoaPods
126
+ if (props.standalone) {
127
+ const extensionTargets = [];
128
+ const targetPattern = /target\s+'([^']+)'\s+do\s+platform\s+:ios,\s+'([^']+)'/g;
129
+ let match;
130
+ // Find all standalone extension targets in the Podfile (including the one we just inserted)
131
+ while ((match = targetPattern.exec(podfile)) !== null) {
132
+ const [, name, version] = match;
133
+ if (name !== mainTargetName) {
134
+ extensionTargets.push({
135
+ targetName: name,
136
+ deploymentTarget: version,
137
+ });
138
+ }
139
+ }
140
+ // Find the highest deployment target among all standalone extensions
141
+ if (extensionTargets.length > 0) {
142
+ const highestDeploymentTarget = extensionTargets.reduce((highest, ext) => {
143
+ const extVersion = parseFloat(ext.deploymentTarget);
144
+ const highestVersion = parseFloat(highest.deploymentTarget);
145
+ return extVersion > highestVersion ? ext : highest;
146
+ }).deploymentTarget;
147
+ // Update Podfile platform line to match the highest extension deployment target
148
+ // This ensures consistency and prevents linker errors
149
+ podfile = utils_1.Podfile.updatePodfilePlatform(podfile, highestDeploymentTarget);
150
+ // Inject into post_install hook to fix after react_native_post_install runs
151
+ podfile = utils_1.Podfile.ensureExtensionDeploymentTargets(podfile, extensionTargets);
152
+ }
153
+ }
154
+ utils_1.File.writeFileSafe(podfilePath, podfile);
155
+ return config;
156
+ },
157
+ ]);
158
+ };
159
+ exports.withTargetPodfile = withTargetPodfile;
160
+ //# sourceMappingURL=withPodfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withPodfile.js","sourceRoot":"","sources":["../../../src/ios/config-plugins/withPodfile.ts"],"names":[],"mappings":";;;;;;AAAA,yDAI8B;AAC9B,gDAAwB;AAIxB,oCAAyC;AAEzC,MAAM,EAAE,cAAc,EAAE,GAAG,0BAAS,CAAC,UAAU,CAAC;AAEzC,MAAM,iBAAiB,GAOzB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;IACrB,OAAO,IAAA,iCAAgB,EAAC,MAAM,EAAE;QAC9B,KAAK;QACL,KAAK,EAAE,MAAM,EAAE,EAAE;YACf,MAAM,WAAW,GAAG,cAAI,CAAC,IAAI,CAC3B,MAAM,CAAC,UAAU,CAAC,mBAAmB,EACrC,SAAS,CACV,CAAC;YACF,IAAI,OAAO,GAAG,YAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;YAEjD,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,KAAK,CAAC,wBAAwB,WAAW,EAAE,CAAC,CAAC;YACzD,CAAC;YAED,iFAAiF;YACjF,IAAI,eAAO,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;gBACtD,KAAK,CAAC,MAAM,CAAC,GAAG,CACd,sBAAsB,KAAK,CAAC,UAAU,sCAAsC,CAC7E,CAAC;gBACF,OAAO,GAAG,eAAO,CAAC,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;YACjE,CAAC;YAED,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;YAClD,MAAM,cAAc,GAAG,cA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AC,CAAC;AA3NW,QAAA,iBAAiB,qBA2N5B"}
@@ -0,0 +1,15 @@
1
+ import { ConfigPlugin } from '@expo/config-plugins';
2
+ import type { ExtensionType, IOSTargetConfigWithReactNative } from '../../config';
3
+ import { Logger } from '../../logger';
4
+ interface IOSTargetProps extends IOSTargetConfigWithReactNative {
5
+ type: ExtensionType;
6
+ name: string;
7
+ entry?: string;
8
+ excludedPackages?: string[];
9
+ directory: string;
10
+ configPath: string;
11
+ logger: Logger;
12
+ }
13
+ export declare const withXcodeChanges: ConfigPlugin<IOSTargetProps>;
14
+ export {};
15
+ //# sourceMappingURL=withXcodeChanges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withXcodeChanges.d.ts","sourceRoot":"","sources":["../../../src/ios/config-plugins/withXcodeChanges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoB,MAAM,sBAAsB,CAAC;AAKtE,OAAO,KAAK,EACV,aAAa,EACb,8BAA8B,EAC/B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAStC,UAAU,cAAe,SAAQ,8BAA8B;IAC7D,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,cAAc,CA47BzD,CAAC"}