'Build error integrating Clevertap to a Reactnative Application
I'm trying to integrate clevertap with native react and when I include "use_frameworks!" in cocoa pods
to be able to use
#import <CleverTapReact / CleverTapReactManager.h>
a compilation error is generated in UMLCore
- Already make the link of the application with clevertap
- Install all the package throught "yarn install"
- Install the pods throught "pod install"
This is my podfile:
//----
target 'discovery' do
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
'RCTAnimation',
'RCTImage',
]
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'Google-Mobile-Ads-SDK'
pod 'CleverTap-iOS-SDK'
pod "Segment-CleverTap"
use_unimodules!
use_frameworks!
target 'discoveryTests' do
inherit! :search_paths
end
end
//----
I expect a good compilation for the app, and instead im getting a compilation error
this is the error code:
//----
info Undefined symbols for architecture x86_64:
"_UMLogError", referenced from:
+[UMUtilities NSDate:] in UMUtilities.o
-[UMViewManager updateProp:withValue:onView:] in UMViewManager.o
info "_UMLogInfo", referenced from:
+[UMUtilities UIColor:] in UMUtilities.o
info "_UMLogWarn", referenced from:
-[UMModuleRegistry registerExportedModule:] in UMModuleRegistry.o
-[UMModuleRegistry registerViewManager:] in UMModuleRegistry.o
-[UMModuleRegistry registerSingletonModule:] in UMModuleRegistry.o
-[UMModuleRegistryProvider moduleRegistryForExperienceId:] in UMModuleRegistryProvider.o
-[UMViewManager updateProp:withValue:onView:] in UMViewManager.o
ld: symbol(s) not found for architecture x86_64
info clang: error: linker command failed with exit code 1 (use -v to see invocation)
//----
Solution 1:[1]
It seems like you're integrating CleverTap React Native using Cocoapods for your iOS Application and in my understanding issue is that you're unable to find the CleverTapReactManager.h class.
I would suggest adding pod 'clevertap-react-native', :path => '../node_modules/clevertap-react-native'
as a dependency in your ios/Podfile instead of pod 'CleverTap-iOS-SDK'
This local clevertap-react-native Podspec integrate the React Native iOS bridge via Cocoapods.
Helping link to install the same: https://github.com/CleverTap/clevertap-react-native/blob/master/docs/install.md#installing-clevertap-react-native
Hope this helps. For further questions, you can post on https://community.clevertap.com/
Solution 2:[2]
or while importing in Appdelegate file , instead of
#import <<CleverTapReact/CleverTap.h>
#import <CleverTapReact/CleverTapReactManager.h>
use
#import <CleverTapReactManager.h>
#import <CleverTap.h>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | josef |