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,441 @@
1
+ "use strict";
2
+ /**
3
+ * Podfile manipulation utilities.
4
+ * Provides helpers for injecting target blocks into Podfile.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ensureReactNativeExtensionFrameworkPaths = exports.ensureExtensionDeploymentTargets = exports.updatePodfilePlatform = exports.ensureMainTargetUsesFrameworks = exports.removeTargetBlock = exports.hasTargetBlock = exports.insertTargetBlock = exports.generateStandaloneTargetBlock = exports.mainTargetUsesFrameworks = exports.generateReactNativeTargetBlock = void 0;
8
+ /**
9
+ * Generate a Podfile target block for a React Native extension.
10
+ * Extension targets only inherit search paths, with no explicit pod dependencies.
11
+ * This avoids linking incompatible modules like Expo that contain UIApplication APIs.
12
+ *
13
+ * Note: ExpoTargetsMessages is accessed via the main app's autolinking through shared
14
+ * registry defined in generated code, so no direct pod dependency is needed.
15
+ */
16
+ function generateReactNativeTargetBlock({ targetName, deploymentTarget, extensionType, }) {
17
+ return `
18
+ target '${targetName}' do
19
+ platform :ios, '${deploymentTarget}'
20
+ inherit! :search_paths
21
+ end
22
+ `;
23
+ }
24
+ exports.generateReactNativeTargetBlock = generateReactNativeTargetBlock;
25
+ /**
26
+ * Check if main app target uses frameworks.
27
+ * Returns true if use_frameworks! is found in the main target block.
28
+ */
29
+ function mainTargetUsesFrameworks(podfileContent, mainTargetName) {
30
+ const targetRegex = new RegExp(`target\\s+'${mainTargetName}'\\s+do([\\s\\S]*?)(?=post_install|\\ntarget\\s+|$)`);
31
+ const match = podfileContent.match(targetRegex);
32
+ if (!match) {
33
+ return false;
34
+ }
35
+ const targetBlock = match[1];
36
+ return targetBlock.includes('use_frameworks!');
37
+ }
38
+ exports.mainTargetUsesFrameworks = mainTargetUsesFrameworks;
39
+ /**
40
+ * Generate a Podfile target block for a standalone (non-RN) extension.
41
+ * Standalone targets use native code only (Swift/Obj-C), no React Native or Expo modules.
42
+ * Must match main app's use_frameworks! setting for CocoaPods integration.
43
+ */
44
+ function generateStandaloneTargetBlock({ targetName, deploymentTarget, useFrameworks, }) {
45
+ const frameworksLine = useFrameworks
46
+ ? ` use_frameworks! :linkage => :static\n`
47
+ : '';
48
+ return `
49
+ target '${targetName}' do
50
+ ${frameworksLine} platform :ios, '${deploymentTarget}'
51
+ end
52
+ `;
53
+ }
54
+ exports.generateStandaloneTargetBlock = generateStandaloneTargetBlock;
55
+ /**
56
+ * Insert a target block into a Podfile.
57
+ * React Native targets are nested inside main app to inherit dependencies.
58
+ * Standalone targets are inserted as siblings to avoid Expo module autolinking.
59
+ */
60
+ function insertTargetBlock(podfileContent, targetBlock, standalone = false, logger) {
61
+ if (standalone) {
62
+ // Standalone targets: insert as sibling AFTER main target's closing 'end'
63
+ // This prevents CocoaPods from auto-generating Expo module providers
64
+ // Find the last 'end' in the Podfile - this should be the main target's closing 'end'
65
+ // since the main target is the outermost block in a standard Expo Podfile
66
+ const lastEndMatch = podfileContent.match(/\bend\b(?!.*\bend\b)/s);
67
+ if (!lastEndMatch) {
68
+ throw new Error('Could not find any end keyword in Podfile');
69
+ }
70
+ const mainTargetEndIndex = lastEndMatch.index + lastEndMatch[0].length;
71
+ if (logger) {
72
+ logger.log(`Inserting standalone target after main target's closing 'end' at position ${mainTargetEndIndex}`);
73
+ }
74
+ else {
75
+ console.log(`[expo-targets] Inserting standalone target after main target's closing 'end' at position ${mainTargetEndIndex}`);
76
+ }
77
+ // Insert after main target's closing 'end'
78
+ return (podfileContent.slice(0, mainTargetEndIndex) +
79
+ '\n\n' +
80
+ targetBlock.trim() +
81
+ podfileContent.slice(mainTargetEndIndex));
82
+ }
83
+ if (logger) {
84
+ logger.log('Inserting React Native target nested inside main target');
85
+ }
86
+ else {
87
+ console.log('[expo-targets] Inserting React Native target nested inside main target');
88
+ }
89
+ // React Native targets: nest inside main target before post_install
90
+ const postInstallIndex = podfileContent.indexOf('post_install do');
91
+ if (postInstallIndex !== -1) {
92
+ return (podfileContent.slice(0, postInstallIndex) +
93
+ targetBlock +
94
+ '\n ' +
95
+ podfileContent.slice(postInstallIndex));
96
+ }
97
+ // Fallback: insert before the last 'end' of main target
98
+ const lastEndIndex = podfileContent.lastIndexOf('end');
99
+ return (podfileContent.slice(0, lastEndIndex) +
100
+ targetBlock +
101
+ '\n' +
102
+ podfileContent.slice(lastEndIndex));
103
+ }
104
+ exports.insertTargetBlock = insertTargetBlock;
105
+ /**
106
+ * Check if a Podfile already contains a target block.
107
+ */
108
+ function hasTargetBlock(podfileContent, targetName) {
109
+ return podfileContent.includes(`target '${targetName}'`);
110
+ }
111
+ exports.hasTargetBlock = hasTargetBlock;
112
+ /**
113
+ * Remove an existing target block from a Podfile.
114
+ * Finds the target declaration and removes it along with its entire do/end block.
115
+ */
116
+ function removeTargetBlock(podfileContent, targetName) {
117
+ // Find the target block
118
+ const targetRegex = new RegExp(`target\\s+['"]${targetName}['"]\\s+do`, 'g');
119
+ const targetMatch = targetRegex.exec(podfileContent);
120
+ if (!targetMatch) {
121
+ return podfileContent; // Target doesn't exist, nothing to remove
122
+ }
123
+ // Find the corresponding closing 'end' by counting nested block pairs
124
+ const startIndex = targetMatch.index;
125
+ const afterDoIndex = targetMatch.index + targetMatch[0].length;
126
+ // Start at depth 1 because we're already inside the target block (after 'do')
127
+ let depth = 1;
128
+ // Match all Ruby block keywords that require 'end'
129
+ const blockRegex = /\b(do|if|unless|case|begin|class|module|def|end)\b/g;
130
+ blockRegex.lastIndex = afterDoIndex;
131
+ let match;
132
+ let targetEndIndex = -1;
133
+ while ((match = blockRegex.exec(podfileContent)) !== null) {
134
+ if (match[1] === 'end') {
135
+ depth--;
136
+ if (depth === 0) {
137
+ // Found the matching 'end' for target
138
+ targetEndIndex = match.index + match[0].length;
139
+ break;
140
+ }
141
+ }
142
+ else {
143
+ // All other keywords open a block
144
+ depth++;
145
+ }
146
+ }
147
+ if (targetEndIndex === -1) {
148
+ throw new Error(`Could not find closing end for target '${targetName}'`);
149
+ }
150
+ // Remove the target block including surrounding whitespace
151
+ // Look back to remove leading whitespace/newlines
152
+ let removeStart = startIndex;
153
+ while (removeStart > 0 && /[\s\n]/.test(podfileContent[removeStart - 1])) {
154
+ removeStart--;
155
+ }
156
+ // Look forward to remove trailing newlines (but keep one newline if present)
157
+ let removeEnd = targetEndIndex;
158
+ while (removeEnd < podfileContent.length &&
159
+ podfileContent[removeEnd] === '\n') {
160
+ removeEnd++;
161
+ break; // Keep only one trailing newline
162
+ }
163
+ return podfileContent.slice(0, removeStart) + podfileContent.slice(removeEnd);
164
+ }
165
+ exports.removeTargetBlock = removeTargetBlock;
166
+ /**
167
+ * Ensure main app target has use_frameworks! to match extension requirements.
168
+ * CocoaPods requires host app and extensions to have matching use_frameworks! settings.
169
+ */
170
+ function ensureMainTargetUsesFrameworks(podfileContent, mainTargetName) {
171
+ // Check if main target already has use_frameworks!
172
+ const targetRegex = new RegExp(`target\\s+'${mainTargetName}'\\s+do([\\s\\S]*?)(?=post_install|\\ntarget\\s+|$)`);
173
+ const match = podfileContent.match(targetRegex);
174
+ if (!match) {
175
+ return podfileContent;
176
+ }
177
+ const targetBlock = match[1];
178
+ // Check if unconditional use_frameworks! :linkage => :static already exists
179
+ // Conditional statements use variables (podfile_properties or ENV), so checking
180
+ // for the literal ':static' ensures we only match unconditional statements
181
+ if (targetBlock.includes('use_frameworks! :linkage => :static')) {
182
+ return podfileContent;
183
+ }
184
+ // Find insertion point: after "target 'Name' do" line
185
+ const targetLineRegex = new RegExp(`(target\\s+'${mainTargetName}'\\s+do\\s*\\n)`, 'm');
186
+ return podfileContent.replace(targetLineRegex, `$1 use_frameworks! :linkage => :static\n\n`);
187
+ }
188
+ exports.ensureMainTargetUsesFrameworks = ensureMainTargetUsesFrameworks;
189
+ /**
190
+ * Update the Podfile platform line to match the highest deployment target.
191
+ * This ensures consistency between the main app platform and extension targets.
192
+ *
193
+ * Fixes deployment target mismatch where Podfile defaults to 15.1 but extension
194
+ * targets require a higher version (e.g., 17.0), causing linker errors.
195
+ */
196
+ function updatePodfilePlatform(podfileContent, deploymentTarget) {
197
+ // Match platform line with various formats:
198
+ // - platform :ios, '15.1'
199
+ // - platform :ios, podfile_properties['ios.deploymentTarget'] || '15.1'
200
+ // - platform :ios, "15.1"
201
+ const platformLineRegex = /(platform\s+:ios\s*,\s*)(?:podfile_properties\[['"]ios\.deploymentTarget['"]\]\s*\|\|\s*)?(['"])([^'"]+)(['"])/;
202
+ const match = podfileContent.match(platformLineRegex);
203
+ if (!match) {
204
+ console.warn('[expo-targets] Could not find platform :ios line in Podfile to update');
205
+ return podfileContent;
206
+ }
207
+ const currentVersion = match[3];
208
+ const quoteChar = match[2]; // Preserve original quote style (' or ")
209
+ const currentVersionNum = parseFloat(currentVersion);
210
+ const newVersionNum = parseFloat(deploymentTarget);
211
+ // Only update if the new version is higher
212
+ if (newVersionNum > currentVersionNum) {
213
+ console.log(`[expo-targets] Updating Podfile platform from iOS ${currentVersion} to ${deploymentTarget}`);
214
+ // Replace the entire platform line with a simple version
215
+ // Use the same quote style as the original
216
+ return podfileContent.replace(platformLineRegex, `$1${quoteChar}${deploymentTarget}${quoteChar}`);
217
+ }
218
+ return podfileContent;
219
+ }
220
+ exports.updatePodfilePlatform = updatePodfilePlatform;
221
+ /**
222
+ * Inject deployment target fixes into the main app's existing post_install hook.
223
+ * This ensures extension targets maintain their correct deployment targets even after
224
+ * react_native_post_install runs, which might override them.
225
+ *
226
+ * Fixes both the Pods Xcode project targets AND the xcconfig files that extensions reference.
227
+ */
228
+ function ensureExtensionDeploymentTargets(podfileContent, extensions) {
229
+ if (extensions.length === 0) {
230
+ return podfileContent;
231
+ }
232
+ const START_MARKER = ' # [expo-targets-standalone-start]';
233
+ const END_MARKER = ' # [expo-targets-standalone-end]';
234
+ // Remove any existing block between markers (idempotent)
235
+ const startIndex = podfileContent.indexOf(START_MARKER);
236
+ if (startIndex !== -1) {
237
+ const endIndex = podfileContent.indexOf(END_MARKER, startIndex);
238
+ if (endIndex !== -1) {
239
+ const beforeBlock = podfileContent.substring(0, startIndex);
240
+ const afterBlock = podfileContent.substring(endIndex + END_MARKER.length);
241
+ podfileContent = beforeBlock.trimEnd() + '\n' + afterBlock.trimStart();
242
+ }
243
+ }
244
+ // Generate the deployment target fix code to inject
245
+ const fixCode = `${START_MARKER}
246
+ # Fix standalone extension deployment targets
247
+ installer.pods_project.targets.each do |target|
248
+ ${extensions
249
+ .map((ext) => ` if target.name.include?('${ext.targetName}')
250
+ target.build_configurations.each do |config|
251
+ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${ext.deploymentTarget}'
252
+ # Also update the xcconfig file
253
+ xcconfig_path = config.base_configuration_reference.real_path
254
+ if xcconfig_path && File.exist?(xcconfig_path)
255
+ xcconfig_content = File.read(xcconfig_path)
256
+ # Remove existing IPHONEOS_DEPLOYMENT_TARGET if present
257
+ xcconfig_content.gsub!(/^IPHONEOS_DEPLOYMENT_TARGET = .*$/, '')
258
+ # Add deployment target
259
+ xcconfig_content += "\\nIPHONEOS_DEPLOYMENT_TARGET = ${ext.deploymentTarget}\\n"
260
+ File.write(xcconfig_path, xcconfig_content)
261
+ end
262
+ end
263
+ end`)
264
+ .join('\n')}
265
+ end
266
+ ${END_MARKER}`;
267
+ // Find the post_install block and its closing 'end' by counting Ruby block keywords
268
+ // Ruby uses 'end' to close: do, if, unless, def, class, module, begin, case, while, until
269
+ const lines = podfileContent.split('\n');
270
+ let postInstallStartLine = -1;
271
+ let postInstallEndLine = -1;
272
+ let depth = 0;
273
+ // Ruby keywords that open blocks requiring 'end'
274
+ const blockOpenRegex = /\b(do|if|unless|def|class|module|begin|case|while|until)\b/g;
275
+ for (let i = 0; i < lines.length; i++) {
276
+ const line = lines[i];
277
+ if (line.includes('post_install do')) {
278
+ postInstallStartLine = i;
279
+ depth = 1;
280
+ continue;
281
+ }
282
+ if (postInstallStartLine !== -1) {
283
+ // Count all Ruby block openers and 'end' to find the matching end
284
+ const openMatches = (line.match(blockOpenRegex) || []).length;
285
+ const endMatches = (line.match(/\bend\b/g) || []).length;
286
+ depth += openMatches - endMatches;
287
+ if (depth === 0 && endMatches > 0) {
288
+ postInstallEndLine = i;
289
+ break;
290
+ }
291
+ }
292
+ }
293
+ if (postInstallStartLine === -1 || postInstallEndLine === -1) {
294
+ return podfileContent;
295
+ }
296
+ // Insert before the closing 'end' of post_install
297
+ const beforeLines = lines.slice(0, postInstallEndLine).join('\n');
298
+ const afterLines = lines.slice(postInstallEndLine).join('\n');
299
+ return beforeLines + '\n' + fixCode + '\n' + afterLines;
300
+ }
301
+ exports.ensureExtensionDeploymentTargets = ensureExtensionDeploymentTargets;
302
+ /**
303
+ * Ensure React Native extension targets have proper framework search paths.
304
+ * Uses START/END markers for reliable, idempotent injection.
305
+ */
306
+ function ensureReactNativeExtensionFrameworkPaths(podfileContent, extensions, mainTargetName) {
307
+ if (extensions.length === 0) {
308
+ return podfileContent;
309
+ }
310
+ const START_MARKER = ' # [expo-targets-start]';
311
+ const END_MARKER = ' # [expo-targets-end]';
312
+ // Remove any existing block between markers (idempotent)
313
+ const startIndex = podfileContent.indexOf(START_MARKER);
314
+ if (startIndex !== -1) {
315
+ const endIndex = podfileContent.indexOf(END_MARKER, startIndex);
316
+ if (endIndex !== -1) {
317
+ const beforeBlock = podfileContent.substring(0, startIndex);
318
+ const afterBlock = podfileContent.substring(endIndex + END_MARKER.length);
319
+ podfileContent = beforeBlock.trimEnd() + '\n' + afterBlock.trimStart();
320
+ }
321
+ }
322
+ // Generate fresh code with markers
323
+ const mainPodsTarget = `Pods-${mainTargetName}`;
324
+ const fixCode = `${START_MARKER}
325
+ # Fix React Native extension framework search paths
326
+ installer.pods_project.targets.each do |target|
327
+ ${extensions
328
+ .map((ext) => ` if target.name.include?('${ext.targetName}')
329
+ target.build_configurations.each do |config|
330
+ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${ext.deploymentTarget}'
331
+ # Copy framework search paths from main app target
332
+ main_target = installer.pods_project.targets.find { |t| t.name == '${mainPodsTarget}' }
333
+ if main_target
334
+ main_config = main_target.build_configurations.find { |c| c.name == config.name }
335
+ if main_config && main_config.build_settings['FRAMEWORK_SEARCH_PATHS']
336
+ existing_paths = config.build_settings['FRAMEWORK_SEARCH_PATHS'] || ['$(inherited)']
337
+ inherited_paths = main_config.build_settings['FRAMEWORK_SEARCH_PATHS']
338
+ # Merge inherited paths, avoiding duplicates
339
+ merged_paths = existing_paths + inherited_paths.reject { |p| existing_paths.include?(p) }
340
+ config.build_settings['FRAMEWORK_SEARCH_PATHS'] = merged_paths
341
+ end
342
+ end
343
+ # Update the xcconfig file with framework search paths and deployment target
344
+ xcconfig_path = config.base_configuration_reference.real_path
345
+ if xcconfig_path && File.exist?(xcconfig_path)
346
+ xcconfig_content = File.read(xcconfig_path)
347
+ # Remove existing IPHONEOS_DEPLOYMENT_TARGET if present
348
+ xcconfig_content.gsub!(/^IPHONEOS_DEPLOYMENT_TARGET = .*$/, '')
349
+ # Add deployment target
350
+ xcconfig_content += "\\nIPHONEOS_DEPLOYMENT_TARGET = ${ext.deploymentTarget}\\n"
351
+ # Copy framework search paths and other Swift-related settings from main app's xcconfig
352
+ if main_target
353
+ main_config = main_target.build_configurations.find { |c| c.name == config.name }
354
+ if main_config
355
+ main_xcconfig_path = main_config.base_configuration_reference.real_path
356
+ if main_xcconfig_path && File.exist?(main_xcconfig_path)
357
+ main_xcconfig_content = File.read(main_xcconfig_path)
358
+ # Copy FRAMEWORK_SEARCH_PATHS (needed for Swift imports)
359
+ framework_paths_match = main_xcconfig_content.match(/^FRAMEWORK_SEARCH_PATHS = (.+)$/m)
360
+ if framework_paths_match
361
+ xcconfig_content.gsub!(/^FRAMEWORK_SEARCH_PATHS = .*$/, '')
362
+ xcconfig_content += "\\nFRAMEWORK_SEARCH_PATHS = #{framework_paths_match[1]}\\n"
363
+ end
364
+ # Copy HEADER_SEARCH_PATHS (includes ExpoModulesCore headers)
365
+ header_paths_match = main_xcconfig_content.match(/^HEADER_SEARCH_PATHS = (.+)$/m)
366
+ if header_paths_match
367
+ xcconfig_content.gsub!(/^HEADER_SEARCH_PATHS = .*$/, '')
368
+ xcconfig_content += "\\nHEADER_SEARCH_PATHS = #{header_paths_match[1]}\\n"
369
+ end
370
+ # Copy OTHER_SWIFT_FLAGS (includes module map files for ExpoModulesCore)
371
+ swift_flags_match = main_xcconfig_content.match(/^OTHER_SWIFT_FLAGS = (.+)$/m)
372
+ if swift_flags_match
373
+ xcconfig_content.gsub!(/^OTHER_SWIFT_FLAGS = .*$/, '')
374
+ xcconfig_content += "\\nOTHER_SWIFT_FLAGS = #{swift_flags_match[1]}\\n"
375
+ end
376
+ # Copy SWIFT_INCLUDE_PATHS (Swift module search paths)
377
+ swift_include_match = main_xcconfig_content.match(/^SWIFT_INCLUDE_PATHS = (.+)$/m)
378
+ if swift_include_match
379
+ xcconfig_content.gsub!(/^SWIFT_INCLUDE_PATHS = .*$/, '')
380
+ xcconfig_content += "\\nSWIFT_INCLUDE_PATHS = #{swift_include_match[1]}\\n"
381
+ end
382
+ end
383
+ end
384
+ end
385
+ File.write(xcconfig_path, xcconfig_content)
386
+ end
387
+ end
388
+ end`)
389
+ .join('\n')}
390
+ end
391
+ ${END_MARKER}`;
392
+ // Find where to inject (after react_native_post_install closing paren)
393
+ // Use line-by-line approach to find the closing paren properly
394
+ const lines = podfileContent.split('\n');
395
+ let reactNativeStartLine = -1;
396
+ let reactNativeEndLine = -1;
397
+ let parenDepth = 0;
398
+ for (let i = 0; i < lines.length; i++) {
399
+ const line = lines[i];
400
+ if (line.includes('react_native_post_install(')) {
401
+ reactNativeStartLine = i;
402
+ parenDepth =
403
+ (line.match(/\(/g) || []).length - (line.match(/\)/g) || []).length;
404
+ continue;
405
+ }
406
+ if (reactNativeStartLine !== -1) {
407
+ const openParens = (line.match(/\(/g) || []).length;
408
+ const closeParens = (line.match(/\)/g) || []).length;
409
+ parenDepth += openParens - closeParens;
410
+ if (parenDepth === 0 && closeParens > 0) {
411
+ reactNativeEndLine = i;
412
+ break;
413
+ }
414
+ }
415
+ }
416
+ if (reactNativeStartLine === -1 || reactNativeEndLine === -1) {
417
+ console.warn('[expo-targets] Could not find react_native_post_install');
418
+ return podfileContent;
419
+ }
420
+ // Find the position after the closing paren
421
+ const beforeLines = lines.slice(0, reactNativeEndLine + 1).join('\n');
422
+ const insertPosition = beforeLines.length;
423
+ const beforeInsert = podfileContent.substring(0, insertPosition);
424
+ const afterInsert = podfileContent.substring(insertPosition);
425
+ // Insert our code with proper newlines
426
+ // Ensure newline before our code
427
+ const needsNewlineBefore = !beforeInsert.endsWith('\n');
428
+ // Check what comes after - preserve any existing closing 'end' for post_install
429
+ const afterTrimmed = afterInsert.trimStart();
430
+ const hasPostInstallEnd = afterTrimmed.startsWith('end');
431
+ // Insert: newline + our code + newline (preserve existing post_install end if present)
432
+ // Important: preserve indentation of afterInsert to maintain valid Podfile structure
433
+ // Using trimStart() would break the " end" indentation that ensureExtensionDeploymentTargets relies on
434
+ return (beforeInsert.trimEnd() +
435
+ (needsNewlineBefore ? '\n' : '') +
436
+ fixCode +
437
+ '\n' +
438
+ afterInsert);
439
+ }
440
+ exports.ensureReactNativeExtensionFrameworkPaths = ensureReactNativeExtensionFrameworkPaths;
441
+ //# sourceMappingURL=podfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"podfile.js","sourceRoot":"","sources":["../../../src/ios/utils/podfile.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;GAOG;AACH,SAAgB,8BAA8B,CAAC,EAC7C,UAAU,EACV,gBAAgB,EAChB,aAAa,GAKd;IACC,OAAO;YACG,UAAU;sBACA,gBAAgB;;;CAGrC,CAAC;AACF,CAAC;AAfD,wEAeC;AAED;;;GAGG;AACH,SAAgB,wBAAwB,CACtC,cAAsB,EACtB,cAAsB;IAEtB,MAAM,WAAW,GAAG,IAAI,MAAM,CAC5B,cAAc,cAAc,qDAAqD,CAClF,CAAC;IAEF,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAChD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7B,OAAO,WAAW,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AACjD,CAAC;AAfD,4DAeC;AAED;;;;GAIG;AACH,SAAgB,6BAA6B,CAAC,EAC5C,UAAU,EACV,gBAAgB,EAChB,aAAa,GAKd;IACC,MAAM,cAAc,GAAG,aAAa;QAClC,CAAC,CAAC,2CAA2C;QAC7C,CAAC,CAAC,EAAE,CAAC;IACP,OAAO;YACG,UAAU;EACpB,cAAc,uBAAuB,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AAK,CAAC,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;gBACxC,kBAAkB,GAAG,CAAC,CAAC;gBACvB,MAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,oBAAoB,KAAK,CAAC,CAAC,IAAI,kBAAkB,KAAK,CAAC,CAAC,EAAE,CAAC;QAC7D,OAAO,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC;QACxE,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,4CAA4C;IAC5C,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAkB,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtE,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC;IAC1C,MAAM,YAAY,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;IACjE,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAE7D,uCAAuC;IACvC,iCAAiC;IACjC,MAAM,kBAAkB,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAExD,gFAAgF;IAChF,MAAM,YAAY,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC;IAC7C,MAAM,iBAAiB,GAAG,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAEzD,uFAAuF;IACvF,qFAAqF;IACrF,wGAAwG;IACxG,OAAO,CACL,YAAY,CAAC,OAAO,EAAE;QACtB,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,OAAO;QACP,IAAI;QACJ,WAAW,CACZ,CAAC;AACJ,CAAC;AAvJD,4FAuJC"}
@@ -0,0 +1,11 @@
1
+ import type { ExtensionType } from '../../config';
2
+ export interface ReactNativeViewControllerOptions {
3
+ type: ExtensionType;
4
+ moduleName: string;
5
+ targetName: string;
6
+ preprocessingFile?: string;
7
+ entry?: string;
8
+ }
9
+ export declare function generateMessagesViewController(): string;
10
+ export declare function generateReactNativeViewController(options: ReactNativeViewControllerOptions): string;
11
+ //# sourceMappingURL=reactNativeSwift.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactNativeSwift.d.ts","sourceRoot":"","sources":["../../../src/ios/utils/reactNativeSwift.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIlD,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA2ND,wBAAgB,8BAA8B,IAAI,MAAM,CAEvD;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,gCAAgC,GACxC,MAAM,CA4CR"}