-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Environment
- React Native: 0.81.5
- Expo: 54.0.20
- iOS Deployment Target: 15.5
- New Architecture: Enabled (newArchEnabled: true)
- Package versions:
- react-native-agora: 4.5.3
- react-native-agora-chat: 1.3.4
Description
When running pod install with New Architecture enabled in React Native 0.81+, the following error occurs:
[!] Unable to find a specification for `RCT-Folly` depended upon by `react-native-chat-sdk`
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.Root Cause
Starting from React Native 0.80, Meta introduced prebuilt iOS dependencies via ReactNativeDependencies.xcframework, which bundles third-party libraries including Folly, Glog, and DoubleConversion.
When RCT_USE_RN_DEP=1 is set (automatically enabled with New Architecture), Folly is no longer available as a separate CocoaPods pod (RCT-Folly). Instead, it's included in the prebuilt framework.
Reference: React Native 0.80 Blog - Prebuilt iOS Dependencies
Affected Code
Both react-native-agora.podspec and react-native-chat-sdk.podspec
declare RCT-Folly as a dependency when New Architecture is enabled:
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
s.dependency "React-Codegen"
s.dependency "RCT-Folly" # ❌ Not available
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
endWorkaround
Remove or comment out the RCT-Folly dependency since it's already included in ReactNativeDependencies.xcframework:
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
s.dependency "React-Codegen"
# s.dependency "RCT-Folly" # Already included in ReactNativeDependencies.xcframework
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
endSuggested Fix
Update the podspec files to be compatible with React Native 0.80+ by removing the explicit RCT-Folly dependency when using prebuilt dependencies. The Folly headers and libraries are already available through ReactNativeDependencies.xcframework.
Additional Context
This issue affects any library that explicitly depends on RCT-Folly when:
- React Native 0.80+ is used
- New Architecture is enabled
RCT_USE_RN_DEP=1is set (default with New Architecture)