Skip to content

Commit 0989c60

Browse files
committed
fix: patchExpoPre55.sh
1 parent 24db114 commit 0989c60

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

packages/react-native-brownfield/src/expo-config-plugin/ios/withBrownfieldIos.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ export const withBrownfieldIos: ConfigPlugin<
5757
`Adding ExpoModulesProvider patch phase for Expo SDK ${config.sdkVersion}`
5858
);
5959

60-
addExpoPre55ShellPatchScriptPhase(project, frameworkTargetUUIDIfAdded);
60+
addExpoPre55ShellPatchScriptPhase(project, {
61+
frameworkName: props.ios.frameworkName,
62+
frameworkTargetUUID: frameworkTargetUUIDIfAdded,
63+
});
6164
} else {
6265
Logger.logDebug(
6366
`Skipping ExpoModulesProvider patch phase for Expo SDK ${config.sdkVersion}`

packages/react-native-brownfield/src/expo-config-plugin/ios/xcodeHelpers.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,13 @@ export function copyBundleReactNativePhase(
242242

243243
export function addExpoPre55ShellPatchScriptPhase(
244244
project: XcodeProject,
245-
frameworkTargetUUID: string
245+
{
246+
frameworkName,
247+
frameworkTargetUUID,
248+
}: {
249+
frameworkName: string;
250+
frameworkTargetUUID: string;
251+
}
246252
) {
247253
project.addBuildPhase(
248254
[
@@ -253,7 +259,9 @@ export function addExpoPre55ShellPatchScriptPhase(
253259
frameworkTargetUUID,
254260
{
255261
shellPath: '/bin/sh',
256-
shellScript: renderTemplate('ios', 'patchExpoPre55.sh'),
262+
shellScript: renderTemplate('ios', 'patchExpoPre55.sh', {
263+
'{{FRAMEWORK_NAME}}': frameworkName,
264+
}),
257265
}
258266
);
259267
}

packages/react-native-brownfield/src/expo-config-plugin/template/ios/patchExpoPre55.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Patch by @hurali97, source: https://github.com/callstackincubator/rock/issues/492#issuecomment-3225109837
22
# Applicable only to Expo SDK versions prior to 55, which made ExpoModulesProvider internal by default: https://github.com/expo/expo/pull/42317
33
# Path to ExpoModulesProvider.swift
4-
FILE="${SRCROOT}/Pods/Target Support Files/Pods-expoapptest-RNEXFramework/ExpoModulesProvider.swift"
4+
FILE="${SRCROOT}/Pods/Target Support Files/Pods-ExpoApp-{{FRAMEWORK_NAME}}/ExpoModulesProvider.swift"
55

66
if [ -f "$FILE" ]; then
77
echo "Patching $FILE to hide Expo from public interface"

0 commit comments

Comments
 (0)