我正在尝试将 clevertap 与本机反应集成,当我在cocoa pods
中包含"use_frameworks!"以便能够使用
#import <CleverTapReact / CleverTapReactManager.h>
在 UMLCore 中生成编译错误
- 已经使用智能点击制作了应用程序的链接
- 通过"纱线安装"安装所有软件包
- 通过"容器安装"安装 Pod
这是我的 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
//----
我希望该应用程序有一个很好的编译,相反,我收到编译错误
这是错误代码:
//----
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)
//----
看起来你正在为你的iOS应用程序使用Cocoapods集成CleverTap React Native,在我的理解中,问题是你找不到CleverTapReactManager.h类。
我建议将pod 'clevertap-react-native', :path => '../node_modules/clevertap-react-native'
作为依赖项添加到ios/Podfile中,而不是pod 'CleverTap-iOS-SDK'
这个本地的 clevertap-react-native Podspec 通过 Cocoapods 集成了 React Native iOS 桥。
帮助链接以安装相同的:https://github.com/CleverTap/clevertap-react-native/blob/master/docs/install.md#installing-clevertap-react-native
希望这有帮助。如有其他问题,您可以在 https://community.clevertap.com/
或者在 Appdelegate 文件中导入时发布,而不是
#import <<CleverTapReact/CleverTap.h>
#import <CleverTapReact/CleverTapReactManager.h>
用
#import <CleverTapReactManager.h>
#import <CleverTap.h>