Skip to content

Commit 5e7ccf2

Browse files
authored
fix: correct typo in iOS plugin option name (#3013)
- Change 'with-folly-no-couroutines' to 'with-folly-no-coroutines' in iOS plugin and installation docs <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - Bug Fixes - Corrected the iOS plugin option name to with-folly-no-coroutines so the Folly workaround is recognized. - Documentation - Updated installation guide to show the corrected option key and added a migration note. - Chores - Added backward compatibility: the old option is still accepted temporarily and now triggers a one-time deprecation warning to prompt updates. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 57ab494 commit 5e7ccf2

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

docs/docs/installation.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,16 @@ After installing the package, you need to:
9292
"react-native-iap",
9393
{
9494
"ios": {
95-
"with-folly-no-couroutines": true
95+
"with-folly-no-coroutines": true
9696
}
9797
}
9898
]
9999
]
100100
}
101101
}
102102
```
103+
Note migration:
104+
- This option key was renamed from `with-folly-no-couroutines` to `with-folly-no-coroutines`. Update your Expo config accordingly. For compatibility, the plugin temporarily accepts the old key and logs a deprecation warning.
103105

104106
What this does:
105107
- Injects `FOLLY_NO_CONFIG=1`, `FOLLY_CFG_NO_COROUTINES=1`, and `FOLLY_HAS_COROUTINES=0` into the Podfile `post_install` block for all Pods targets, preventing `RCT-Folly` from including non‑vendored `<folly/coro/*>` headers.

plugin/src/withIAP.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ const withIapAndroid: ConfigPlugin = (config) => {
126126

127127
type IapPluginProps = {
128128
ios?: {
129-
// Intentionally following user-provided key spelling
130129
// Enable to inject Folly coroutine-disabling macros into Podfile during prebuild
130+
'with-folly-no-coroutines'?: boolean;
131+
// @deprecated Use 'with-folly-no-coroutines'. Kept for backward compatibility.
131132
'with-folly-no-couroutines'?: boolean;
132133
};
133134
};
@@ -136,7 +137,16 @@ const withIapIosFollyWorkaround: ConfigPlugin<IapPluginProps | undefined> = (
136137
config,
137138
props,
138139
) => {
139-
const enabled = !!props?.ios?.['with-folly-no-couroutines'];
140+
const newKey = props?.ios?.['with-folly-no-coroutines'];
141+
const oldKey = props?.ios?.['with-folly-no-couroutines'];
142+
if (oldKey && !hasLoggedPluginExecution) {
143+
// Temporary deprecation notice; remove when old key is dropped
144+
WarningAggregator.addWarningIOS(
145+
'react-native-iap',
146+
"react-native-iap: 'ios.with-folly-no-couroutines' is deprecated; use 'ios.with-folly-no-coroutines'."
147+
);
148+
}
149+
const enabled = !!(newKey ?? oldKey);
140150
if (!enabled) return config;
141151

142152
return withPodfile(config, (config) => {

0 commit comments

Comments
 (0)