expo-livekit-screen-share 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/index.js +35 -3
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -138,9 +138,6 @@ function withScreenShareXcodeProject(config, extensionName) {
138
138
  configEntry.buildSettings.INFOPLIST_FILE = `${extensionName}/Info.plist`;
139
139
  configEntry.buildSettings.CURRENT_PROJECT_VERSION = "1";
140
140
  configEntry.buildSettings.MARKETING_VERSION = "1.0";
141
- // Override compiler — prevents inheriting ccache-clang paths from main project
142
- configEntry.buildSettings.CC = "clang";
143
- configEntry.buildSettings.CXX = "clang++";
144
141
  }
145
142
  }
146
143
  }
@@ -195,6 +192,40 @@ function withScreenShareExtensionFiles(config, extensionName, appGroupId) {
195
192
  },
196
193
  ]);
197
194
  }
195
+ // --- iOS: Patch Podfile to reset ccache on extension target ---
196
+ function withScreenSharePodfilePostInstall(config, extensionName) {
197
+ return (0, config_plugins_1.withDangerousMod)(config, [
198
+ "ios",
199
+ (mod) => {
200
+ const iosPath = path_1.default.resolve(mod.modRequest.platformProjectRoot);
201
+ const podfilePath = path_1.default.join(iosPath, "Podfile");
202
+ let podfileContent = fs_1.default.readFileSync(podfilePath, "utf8");
203
+ const snippet = `
204
+ # [expo-livekit-screen-share] Reset ccache compiler on extension target
205
+ installer.aggregate_targets
206
+ .map(&:user_project)
207
+ .uniq(&:path)
208
+ .each do |project|
209
+ extension_target = project.native_targets.find { |t| t.name == '${extensionName}' }
210
+ next unless extension_target
211
+ extension_target.build_configurations.each do |config|
212
+ config.build_settings.delete('CC')
213
+ config.build_settings.delete('LD')
214
+ config.build_settings.delete('CXX')
215
+ config.build_settings.delete('LDPLUSPLUS')
216
+ end
217
+ project.save()
218
+ end`;
219
+ // Insert before the closing `end` of the post_install block
220
+ // Look for the react_native_post_install call and add after it
221
+ if (podfileContent.includes("react_native_post_install")) {
222
+ podfileContent = podfileContent.replace(/(react_native_post_install\([^)]*\))/, `$1\n${snippet}`);
223
+ }
224
+ fs_1.default.writeFileSync(podfilePath, podfileContent);
225
+ return mod;
226
+ },
227
+ ]);
228
+ }
198
229
  // --- Android Mods ---
199
230
  function withScreenShareAndroidPermission(config) {
200
231
  return (0, config_plugins_1.withAndroidManifest)(config, (mod) => {
@@ -234,6 +265,7 @@ const withScreenShare = (config, options) => {
234
265
  config = withScreenShareEntitlements(config, appGroupId);
235
266
  config = withScreenShareXcodeProject(config, extensionName);
236
267
  config = withScreenShareExtensionFiles(config, extensionName, appGroupId);
268
+ config = withScreenSharePodfilePostInstall(config, extensionName);
237
269
  // Android
238
270
  if (enableAndroidPermission) {
239
271
  config = withScreenShareAndroidPermission(config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-livekit-screen-share",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Expo config plugin for LiveKit screen sharing on iOS (Broadcast Upload Extension) and Android (foreground service)",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",