Dependency Conflict: Tuya Native iOS SDK (v5.0.0) breaks React Native Fabric build.

App development related product technical discussions, including OEM App, App SDK, device control interface development, mini program development and other topics.


Post Reply
sgaglani
Posts: 1

Summary:
When adding any of the core Tuya native iOS SDKs (like ThingSmartBaseKit) to a new React Native project with Fabric enabled, the build fails with linker errors for core React Native symbols. The project builds successfully without the Tuya pods.

Environment:

React Native Version: 0.81.1

Tuya SDK Version: 5.0.0 (from ThingSmartCryption.podspec)

Xcode Version: 16.3

CocoaPods Version: 1.16.2

Steps to Reproduce:

Create a new React Native project:
npx @react-native-community/cli init TuyaConflictTest

Copy the ios_core_sdk folder (containing ThingSmartCryption) into the TuyaConflictTest/ios directory.

Replace the contents of TuyaConflictTest/ios/Podfile with the following:

Ruby

require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', dir]).strip

source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/TuyaInc/TuyaPublicSpecs.git'
source 'https://github.com/tuya/tuya-pod-specs.git'

platform :ios, '16.0'

prepare_react_native_project!

target 'TuyaConflictTest' do
use_frameworks!
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => true,
:fabric_enabled => true
)
pod 'ThingSmartCryption', :path => './ios_core_sdk'
pod 'ThingSmartBaseKit'
post_install do |installer|
react_native_post_install(installer)
end
end
Navigate to the ios directory and run pod install (using a Rosetta terminal on Apple Silicon).

Open the .xcworkspace in Xcode and build the project.

Expected Result:
The project should build successfully.

Actual Result:
The build fails with the linker error: Undefined symbol: OBJC_CLASS$_RCTAppDependencyProvider.

Would you have a sample code that uses react native and Tuya?

Thanks in advance for your help.

Post Reply