expo-targets 0.1.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 (231) hide show
  1. package/.eslintrc.js +2 -0
  2. package/README.md +244 -0
  3. package/android/build.gradle +22 -0
  4. package/android/src/main/java/expo/modules/targets/ExpoTargetsLogger.kt +98 -0
  5. package/android/src/main/java/expo/modules/targets/ExpoTargetsReceiver.kt +136 -0
  6. package/android/src/main/java/expo/modules/targets/ExpoTargetsRemoteViewsProvider.kt +72 -0
  7. package/android/src/main/java/expo/modules/targets/ExpoTargetsWidgetProvider.kt +47 -0
  8. package/android/src/main/java/expo/modules/targets/ExpoTargetsWidgetSync.kt +78 -0
  9. package/android/src/main/java/expo/modules/targets/ExpoTargetsWidgetUpdateReceiver.kt +30 -0
  10. package/android/src/main/java/expo/modules/targets/extension/ExpoTargetsExtensionModule.kt +27 -0
  11. package/android/src/main/java/expo/modules/targets/messages/ExpoTargetsMessagesModule.kt +40 -0
  12. package/android/src/main/java/expo/modules/targets/storage/ExpoTargetsStorageModule.kt +119 -0
  13. package/app.plugin.js +1 -0
  14. package/build/metro/src/index.d.ts +2 -0
  15. package/build/metro/src/index.d.ts.map +1 -0
  16. package/build/metro/src/index.js +6 -0
  17. package/build/metro/src/index.js.map +1 -0
  18. package/build/metro/src/withTargetsMetro.d.ts +6 -0
  19. package/build/metro/src/withTargetsMetro.d.ts.map +1 -0
  20. package/build/metro/src/withTargetsMetro.js +171 -0
  21. package/build/metro/src/withTargetsMetro.js.map +1 -0
  22. package/build/plugin/src/android/config-plugins/withAndroidColors.d.ts +7 -0
  23. package/build/plugin/src/android/config-plugins/withAndroidColors.d.ts.map +1 -0
  24. package/build/plugin/src/android/config-plugins/withAndroidColors.js +56 -0
  25. package/build/plugin/src/android/config-plugins/withAndroidColors.js.map +1 -0
  26. package/build/plugin/src/android/config-plugins/withAndroidManifest.d.ts +7 -0
  27. package/build/plugin/src/android/config-plugins/withAndroidManifest.d.ts.map +1 -0
  28. package/build/plugin/src/android/config-plugins/withAndroidManifest.js +70 -0
  29. package/build/plugin/src/android/config-plugins/withAndroidManifest.js.map +1 -0
  30. package/build/plugin/src/android/config-plugins/withAndroidModule.d.ts +7 -0
  31. package/build/plugin/src/android/config-plugins/withAndroidModule.d.ts.map +1 -0
  32. package/build/plugin/src/android/config-plugins/withAndroidModule.js +41 -0
  33. package/build/plugin/src/android/config-plugins/withAndroidModule.js.map +1 -0
  34. package/build/plugin/src/android/config-plugins/withAndroidResources.d.ts +7 -0
  35. package/build/plugin/src/android/config-plugins/withAndroidResources.d.ts.map +1 -0
  36. package/build/plugin/src/android/config-plugins/withAndroidResources.js +75 -0
  37. package/build/plugin/src/android/config-plugins/withAndroidResources.js.map +1 -0
  38. package/build/plugin/src/android/config-plugins/withAndroidTarget.d.ts +28 -0
  39. package/build/plugin/src/android/config-plugins/withAndroidTarget.d.ts.map +1 -0
  40. package/build/plugin/src/android/config-plugins/withAndroidTarget.js +28 -0
  41. package/build/plugin/src/android/config-plugins/withAndroidTarget.js.map +1 -0
  42. package/build/plugin/src/android/config-plugins/withGradleModule.d.ts +7 -0
  43. package/build/plugin/src/android/config-plugins/withGradleModule.d.ts.map +1 -0
  44. package/build/plugin/src/android/config-plugins/withGradleModule.js +86 -0
  45. package/build/plugin/src/android/config-plugins/withGradleModule.js.map +1 -0
  46. package/build/plugin/src/android/config-plugins/withGradleSettings.d.ts +7 -0
  47. package/build/plugin/src/android/config-plugins/withGradleSettings.d.ts.map +1 -0
  48. package/build/plugin/src/android/config-plugins/withGradleSettings.js +23 -0
  49. package/build/plugin/src/android/config-plugins/withGradleSettings.js.map +1 -0
  50. package/build/plugin/src/android/withAndroidAppBuildGradle.d.ts +7 -0
  51. package/build/plugin/src/android/withAndroidAppBuildGradle.d.ts.map +1 -0
  52. package/build/plugin/src/android/withAndroidAppBuildGradle.js +31 -0
  53. package/build/plugin/src/android/withAndroidAppBuildGradle.js.map +1 -0
  54. package/build/plugin/src/android/withAndroidKotlinGradleProperty.d.ts +3 -0
  55. package/build/plugin/src/android/withAndroidKotlinGradleProperty.d.ts.map +1 -0
  56. package/build/plugin/src/android/withAndroidKotlinGradleProperty.js +24 -0
  57. package/build/plugin/src/android/withAndroidKotlinGradleProperty.js.map +1 -0
  58. package/build/plugin/src/android/withAndroidProjectKotlinVersion.d.ts +3 -0
  59. package/build/plugin/src/android/withAndroidProjectKotlinVersion.d.ts.map +1 -0
  60. package/build/plugin/src/android/withAndroidProjectKotlinVersion.js +27 -0
  61. package/build/plugin/src/android/withAndroidProjectKotlinVersion.js.map +1 -0
  62. package/build/plugin/src/android/withAndroidTarget.d.ts +10 -0
  63. package/build/plugin/src/android/withAndroidTarget.d.ts.map +1 -0
  64. package/build/plugin/src/android/withAndroidTarget.js +22 -0
  65. package/build/plugin/src/android/withAndroidTarget.js.map +1 -0
  66. package/build/plugin/src/android/withAndroidWidget.d.ts +13 -0
  67. package/build/plugin/src/android/withAndroidWidget.d.ts.map +1 -0
  68. package/build/plugin/src/android/withAndroidWidget.js +564 -0
  69. package/build/plugin/src/android/withAndroidWidget.js.map +1 -0
  70. package/build/plugin/src/config.d.ts +141 -0
  71. package/build/plugin/src/config.d.ts.map +1 -0
  72. package/build/plugin/src/config.js +54 -0
  73. package/build/plugin/src/config.js.map +1 -0
  74. package/build/plugin/src/index.d.ts +9 -0
  75. package/build/plugin/src/index.d.ts.map +1 -0
  76. package/build/plugin/src/index.js +11 -0
  77. package/build/plugin/src/index.js.map +1 -0
  78. package/build/plugin/src/ios/config-plugins/withEntitlements.d.ts +11 -0
  79. package/build/plugin/src/ios/config-plugins/withEntitlements.d.ts.map +1 -0
  80. package/build/plugin/src/ios/config-plugins/withEntitlements.js +49 -0
  81. package/build/plugin/src/ios/config-plugins/withEntitlements.js.map +1 -0
  82. package/build/plugin/src/ios/config-plugins/withIOSTarget.d.ts +17 -0
  83. package/build/plugin/src/ios/config-plugins/withIOSTarget.d.ts.map +1 -0
  84. package/build/plugin/src/ios/config-plugins/withIOSTarget.js +152 -0
  85. package/build/plugin/src/ios/config-plugins/withIOSTarget.js.map +1 -0
  86. package/build/plugin/src/ios/config-plugins/withIosColorset.d.ts +8 -0
  87. package/build/plugin/src/ios/config-plugins/withIosColorset.d.ts.map +1 -0
  88. package/build/plugin/src/ios/config-plugins/withIosColorset.js +25 -0
  89. package/build/plugin/src/ios/config-plugins/withIosColorset.js.map +1 -0
  90. package/build/plugin/src/ios/config-plugins/withIosStickerPack.d.ts +8 -0
  91. package/build/plugin/src/ios/config-plugins/withIosStickerPack.d.ts.map +1 -0
  92. package/build/plugin/src/ios/config-plugins/withIosStickerPack.js +52 -0
  93. package/build/plugin/src/ios/config-plugins/withIosStickerPack.js.map +1 -0
  94. package/build/plugin/src/ios/config-plugins/withPodfile.d.ts +12 -0
  95. package/build/plugin/src/ios/config-plugins/withPodfile.d.ts.map +1 -0
  96. package/build/plugin/src/ios/config-plugins/withPodfile.js +162 -0
  97. package/build/plugin/src/ios/config-plugins/withPodfile.js.map +1 -0
  98. package/build/plugin/src/ios/config-plugins/withXcodeChanges.d.ts +15 -0
  99. package/build/plugin/src/ios/config-plugins/withXcodeChanges.d.ts.map +1 -0
  100. package/build/plugin/src/ios/config-plugins/withXcodeChanges.js +646 -0
  101. package/build/plugin/src/ios/config-plugins/withXcodeChanges.js.map +1 -0
  102. package/build/plugin/src/ios/target.d.ts +41 -0
  103. package/build/plugin/src/ios/target.d.ts.map +1 -0
  104. package/build/plugin/src/ios/target.js +574 -0
  105. package/build/plugin/src/ios/target.js.map +1 -0
  106. package/build/plugin/src/ios/utils/asset.d.ts +60 -0
  107. package/build/plugin/src/ios/utils/asset.d.ts.map +1 -0
  108. package/build/plugin/src/ios/utils/asset.js +375 -0
  109. package/build/plugin/src/ios/utils/asset.js.map +1 -0
  110. package/build/plugin/src/ios/utils/file.d.ts +33 -0
  111. package/build/plugin/src/ios/utils/file.d.ts.map +1 -0
  112. package/build/plugin/src/ios/utils/file.js +88 -0
  113. package/build/plugin/src/ios/utils/file.js.map +1 -0
  114. package/build/plugin/src/ios/utils/index.d.ts +12 -0
  115. package/build/plugin/src/ios/utils/index.d.ts.map +1 -0
  116. package/build/plugin/src/ios/utils/index.js +38 -0
  117. package/build/plugin/src/ios/utils/index.js.map +1 -0
  118. package/build/plugin/src/ios/utils/paths.d.ts +128 -0
  119. package/build/plugin/src/ios/utils/paths.d.ts.map +1 -0
  120. package/build/plugin/src/ios/utils/paths.js +141 -0
  121. package/build/plugin/src/ios/utils/paths.js.map +1 -0
  122. package/build/plugin/src/ios/utils/plist.d.ts +29 -0
  123. package/build/plugin/src/ios/utils/plist.d.ts.map +1 -0
  124. package/build/plugin/src/ios/utils/plist.js +114 -0
  125. package/build/plugin/src/ios/utils/plist.js.map +1 -0
  126. package/build/plugin/src/ios/utils/podfile.d.ts +82 -0
  127. package/build/plugin/src/ios/utils/podfile.d.ts.map +1 -0
  128. package/build/plugin/src/ios/utils/podfile.js +408 -0
  129. package/build/plugin/src/ios/utils/podfile.js.map +1 -0
  130. package/build/plugin/src/ios/utils/reactNativeSwift.d.ts +11 -0
  131. package/build/plugin/src/ios/utils/reactNativeSwift.d.ts.map +1 -0
  132. package/build/plugin/src/ios/utils/reactNativeSwift.js +263 -0
  133. package/build/plugin/src/ios/utils/reactNativeSwift.js.map +1 -0
  134. package/build/plugin/src/ios/utils/xcode.d.ts +185 -0
  135. package/build/plugin/src/ios/utils/xcode.d.ts.map +1 -0
  136. package/build/plugin/src/ios/utils/xcode.js +706 -0
  137. package/build/plugin/src/ios/utils/xcode.js.map +1 -0
  138. package/build/plugin/src/logger.d.ts +10 -0
  139. package/build/plugin/src/logger.d.ts.map +1 -0
  140. package/build/plugin/src/logger.js +62 -0
  141. package/build/plugin/src/logger.js.map +1 -0
  142. package/build/plugin/src/parseTargetConfig.d.ts +3 -0
  143. package/build/plugin/src/parseTargetConfig.d.ts.map +1 -0
  144. package/build/plugin/src/parseTargetConfig.js +113 -0
  145. package/build/plugin/src/parseTargetConfig.js.map +1 -0
  146. package/build/plugin/src/withTargetsDir.d.ts +6 -0
  147. package/build/plugin/src/withTargetsDir.d.ts.map +1 -0
  148. package/build/plugin/src/withTargetsDir.js +90 -0
  149. package/build/plugin/src/withTargetsDir.js.map +1 -0
  150. package/build/src/Target.d.ts +43 -0
  151. package/build/src/Target.d.ts.map +1 -0
  152. package/build/src/Target.js +128 -0
  153. package/build/src/Target.js.map +1 -0
  154. package/build/src/index.d.ts +9 -0
  155. package/build/src/index.d.ts.map +1 -0
  156. package/build/src/index.js +27 -0
  157. package/build/src/index.js.map +1 -0
  158. package/build/src/modules/extension/index.d.ts +18 -0
  159. package/build/src/modules/extension/index.d.ts.map +1 -0
  160. package/build/src/modules/extension/index.js +44 -0
  161. package/build/src/modules/extension/index.js.map +1 -0
  162. package/build/src/modules/messages/index.d.ts +40 -0
  163. package/build/src/modules/messages/index.d.ts.map +1 -0
  164. package/build/src/modules/messages/index.js +94 -0
  165. package/build/src/modules/messages/index.js.map +1 -0
  166. package/build/src/modules/storage/index.d.ts +16 -0
  167. package/build/src/modules/storage/index.d.ts.map +1 -0
  168. package/build/src/modules/storage/index.js +122 -0
  169. package/build/src/modules/storage/index.js.map +1 -0
  170. package/expo-module.config.json +17 -0
  171. package/ios/ExpoTargetsExtension.podspec +23 -0
  172. package/ios/ExpoTargetsExtensionModule.swift +181 -0
  173. package/ios/ExpoTargetsMessages.podspec +23 -0
  174. package/ios/ExpoTargetsMessagesModule.swift +267 -0
  175. package/ios/ExpoTargetsStorage.podspec +23 -0
  176. package/ios/ExpoTargetsStorageModule.swift +91 -0
  177. package/ios/Tests/.swiftlint.yml +52 -0
  178. package/ios/Tests/Helpers/MockExtensionContext.swift +58 -0
  179. package/ios/Tests/Helpers/MockUserDefaults.swift +70 -0
  180. package/ios/Tests/Helpers/MockWidgetCenter.swift +71 -0
  181. package/ios/Tests/Helpers/TestHelpers.swift +90 -0
  182. package/ios/Tests/Integration/TargetIntegrationTests.swift +478 -0
  183. package/ios/Tests/Main/AllTests.swift +80 -0
  184. package/ios/Tests/Package.swift +66 -0
  185. package/ios/Tests/Performance/StoragePerformanceTests.swift +461 -0
  186. package/ios/Tests/Unit/Extension/ExpoTargetsExtensionModuleTests.swift +501 -0
  187. package/ios/Tests/Unit/Storage/ExpoTargetsStorageModuleTests.swift +578 -0
  188. package/ios/Tests/Unit/Template/ShareExtensionTemplateTests.swift +421 -0
  189. package/ios/Tests/XCTestPlan.xctestplan +87 -0
  190. package/metro/src/index.ts +1 -0
  191. package/metro/src/withTargetsMetro.ts +247 -0
  192. package/metro/tsconfig.build.json +9 -0
  193. package/package.json +74 -0
  194. package/plugin/src/android/withAndroidAppBuildGradle.ts +34 -0
  195. package/plugin/src/android/withAndroidTarget.ts +26 -0
  196. package/plugin/src/android/withAndroidWidget.ts +778 -0
  197. package/plugin/src/config.ts +255 -0
  198. package/plugin/src/index.ts +19 -0
  199. package/plugin/src/ios/config-plugins/withEntitlements.ts +69 -0
  200. package/plugin/src/ios/config-plugins/withIOSTarget.ts +179 -0
  201. package/plugin/src/ios/config-plugins/withIosColorset.ts +29 -0
  202. package/plugin/src/ios/config-plugins/withIosStickerPack.ts +65 -0
  203. package/plugin/src/ios/config-plugins/withPodfile.ts +238 -0
  204. package/plugin/src/ios/config-plugins/withXcodeChanges.ts +891 -0
  205. package/plugin/src/ios/target.ts +668 -0
  206. package/plugin/src/ios/templates/MessagesViewController.swift +120 -0
  207. package/plugin/src/ios/templates/ReactNativeViewController.swift +240 -0
  208. package/plugin/src/ios/templates/action-extension-data.swift +106 -0
  209. package/plugin/src/ios/templates/clip-extension-data.swift +28 -0
  210. package/plugin/src/ios/templates/messages-extension-data.swift +28 -0
  211. package/plugin/src/ios/templates/share-extension-data.swift +113 -0
  212. package/plugin/src/ios/utils/asset.ts +490 -0
  213. package/plugin/src/ios/utils/file.ts +80 -0
  214. package/plugin/src/ios/utils/index.ts +12 -0
  215. package/plugin/src/ios/utils/paths.ts +253 -0
  216. package/plugin/src/ios/utils/plist.ts +101 -0
  217. package/plugin/src/ios/utils/podfile.ts +534 -0
  218. package/plugin/src/ios/utils/reactNativeSwift.ts +283 -0
  219. package/plugin/src/ios/utils/xcode.ts +989 -0
  220. package/plugin/src/logger.ts +63 -0
  221. package/plugin/src/parseTargetConfig.ts +115 -0
  222. package/plugin/src/types/normalize-colors.d.ts +3 -0
  223. package/plugin/src/withTargetsDir.ts +120 -0
  224. package/plugin/tsconfig.build.json +9 -0
  225. package/plugin/tsconfig.json +9 -0
  226. package/src/Target.ts +239 -0
  227. package/src/index.ts +52 -0
  228. package/src/modules/extension/index.ts +54 -0
  229. package/src/modules/messages/index.ts +124 -0
  230. package/src/modules/storage/index.ts +126 -0
  231. package/tsconfig.json +8 -0
@@ -0,0 +1,162 @@
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
+ // Only React Native extensions need main app to use_frameworks! (they inherit pods)
28
+ // Standalone extensions are siblings and don't inherit, so they don't need this
29
+ if (!props.standalone) {
30
+ podfile = utils_1.Podfile.ensureMainTargetUsesFrameworks(podfile, mainTargetName);
31
+ }
32
+ // For standalone targets, detect main app's use_frameworks! setting
33
+ // CocoaPods requires host app and extensions to have matching use_frameworks! settings
34
+ const mainUsesFrameworks = props.standalone
35
+ ? utils_1.Podfile.mainTargetUsesFrameworks(podfile, mainTargetName)
36
+ : undefined;
37
+ // Generate appropriate target block based on type
38
+ // React Native targets are nested inside main target to inherit dependencies
39
+ const targetBlock = props.standalone
40
+ ? utils_1.Podfile.generateStandaloneTargetBlock({
41
+ targetName: props.targetName,
42
+ deploymentTarget: props.deploymentTarget,
43
+ useFrameworks: mainUsesFrameworks,
44
+ })
45
+ : utils_1.Podfile.generateReactNativeTargetBlock({
46
+ targetName: props.targetName,
47
+ deploymentTarget: props.deploymentTarget,
48
+ extensionType: props.extensionType,
49
+ });
50
+ props.logger.log(`Updated Podfile for ${props.standalone ? 'standalone' : 'React Native'} target: ${props.targetName}`);
51
+ // Insert target block into Podfile
52
+ // Standalone: sibling to avoid Expo autolinking, RN: nested to inherit
53
+ podfile = utils_1.Podfile.insertTargetBlock(podfile, targetBlock, props.standalone, props.logger);
54
+ // For React Native targets, ensure framework search paths are configured
55
+ // inherit! :search_paths needs additional framework search paths for Swift imports
56
+ if (!props.standalone) {
57
+ // Find all React Native extension targets nested inside main target
58
+ // These targets use inherit! :search_paths to avoid inheriting incompatible pods like Expo
59
+ const reactNativeTargets = [];
60
+ // Find the main target block and extract nested targets from within it
61
+ const mainTargetStart = podfile.indexOf(`target '${mainTargetName}' do`);
62
+ if (mainTargetStart >= 0) {
63
+ // Find the closing 'end' of the main target (before post_install)
64
+ const postInstallStart = podfile.indexOf('post_install do', mainTargetStart);
65
+ const mainTargetBlock = postInstallStart >= 0
66
+ ? podfile.substring(mainTargetStart, postInstallStart)
67
+ : podfile.substring(mainTargetStart);
68
+ // Match nested target blocks within main target that have inherit! :complete
69
+ // Look for lines that match: target 'Name' do ... inherit! :complete ... end
70
+ // We need to match complete target blocks, so we'll look for the pattern
71
+ // and verify it's a nested target (not the main target itself)
72
+ const lines = mainTargetBlock.split('\n');
73
+ let inNestedTarget = false;
74
+ let currentTargetName = '';
75
+ let currentTargetLines = [];
76
+ let nestedTargetDepth = 0;
77
+ for (let i = 0; i < lines.length; i++) {
78
+ const line = lines[i];
79
+ // Check if this line starts a nested target
80
+ const targetMatch = line.match(/^\s+target\s+'([^']+)'\s+do/);
81
+ if (targetMatch && targetMatch[1] !== mainTargetName) {
82
+ inNestedTarget = true;
83
+ currentTargetName = targetMatch[1];
84
+ currentTargetLines = [line];
85
+ nestedTargetDepth = 1;
86
+ continue;
87
+ }
88
+ // If we're in a nested target, collect lines until we find the closing 'end'
89
+ if (inNestedTarget) {
90
+ currentTargetLines.push(line);
91
+ // Count nested blocks (do/end pairs)
92
+ if (line.match(/\bdo\b/)) {
93
+ nestedTargetDepth++;
94
+ }
95
+ if (line.match(/\bend\b/)) {
96
+ nestedTargetDepth--;
97
+ // If depth is 0, we've closed the target block
98
+ if (nestedTargetDepth === 0) {
99
+ const targetBlock = currentTargetLines.join('\n');
100
+ // Check if this target has inherit! :search_paths (React Native extensions)
101
+ if (targetBlock.includes('inherit! :search_paths')) {
102
+ // Extract deployment target
103
+ const platformMatch = targetBlock.match(/platform\s+:ios,\s+'([^']+)'/);
104
+ const version = platformMatch
105
+ ? platformMatch[1]
106
+ : props.deploymentTarget;
107
+ reactNativeTargets.push({
108
+ targetName: currentTargetName,
109
+ deploymentTarget: version,
110
+ });
111
+ }
112
+ // Reset for next target
113
+ inNestedTarget = false;
114
+ currentTargetName = '';
115
+ currentTargetLines = [];
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
121
+ if (reactNativeTargets.length > 0) {
122
+ // Inject framework search paths configuration into post_install hook
123
+ podfile = utils_1.Podfile.ensureReactNativeExtensionFrameworkPaths(podfile, reactNativeTargets, mainTargetName);
124
+ }
125
+ }
126
+ // For standalone targets, inject deployment target fixes into post_install hook
127
+ // Must be done in Podfile because xcconfig files are generated by CocoaPods
128
+ if (props.standalone) {
129
+ const extensionTargets = [];
130
+ const targetPattern = /target\s+'([^']+)'\s+do\s+platform\s+:ios,\s+'([^']+)'/g;
131
+ let match;
132
+ // Find all standalone extension targets in the Podfile (including the one we just inserted)
133
+ while ((match = targetPattern.exec(podfile)) !== null) {
134
+ const [, name, version] = match;
135
+ if (name !== mainTargetName) {
136
+ extensionTargets.push({
137
+ targetName: name,
138
+ deploymentTarget: version,
139
+ });
140
+ }
141
+ }
142
+ // Find the highest deployment target among all standalone extensions
143
+ if (extensionTargets.length > 0) {
144
+ const highestDeploymentTarget = extensionTargets.reduce((highest, ext) => {
145
+ const extVersion = parseFloat(ext.deploymentTarget);
146
+ const highestVersion = parseFloat(highest.deploymentTarget);
147
+ return extVersion > highestVersion ? ext : highest;
148
+ }).deploymentTarget;
149
+ // Update Podfile platform line to match the highest extension deployment target
150
+ // This ensures consistency and prevents linker errors
151
+ podfile = utils_1.Podfile.updatePodfilePlatform(podfile, highestDeploymentTarget);
152
+ // Inject into post_install hook to fix after react_native_post_install runs
153
+ podfile = utils_1.Podfile.ensureExtensionDeploymentTargets(podfile, extensionTargets);
154
+ }
155
+ }
156
+ utils_1.File.writeFileSafe(podfilePath, podfile);
157
+ return config;
158
+ },
159
+ ]);
160
+ };
161
+ exports.withTargetPodfile = withTargetPodfile;
162
+ //# sourceMappingURL=withPodfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withPodfile.js","sourceRoot":"","sources":["../../../../../plugin/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,E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,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;gBAED,qEAAqE;gBACrE,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAChC,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,MAAM,CACrD,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE;wBACf,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;wBACpD,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;wBAC5D,OAAO,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;oBACrD,CAAC,CACF,CAAC,gBAAgB,CAAC;oBAEnB,gFAAgF;oBAChF,sDAAsD;oBACtD,OAAO,GAAG,eAAO,CAAC,qBAAqB,CACrC,OAAO,EACP,uBAAuB,CACxB,CAAC;oBAEF,4EAA4E;oBAC5E,OAAO,GAAG,eAAO,CAAC,gCAAgC,CAChD,OAAO,EACP,gBAAgB,CACjB,CAAC;gBACJ,CAAC;YACH,CAAC;YAED,YAAI,CAAC,aAAa,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;YACzC,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAhOW,QAAA,iBAAiB,qBAgO5B"}
@@ -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":["../../../../../plugin/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,CA61BzD,CAAC"}