将Clevertap集成到反应式应用程序时发生构建错误

时间:2019-04-17 14:54:05

标签: objective-c react-native cocoapods clevertap

我正在尝试将clevertap与本机反应集成在一起,当我包含“ use_frameworks!”时。在cocoa pods中可以使用

#import <CleverTapReact / CleverTapReactManager.h>

UMLCore中生成编译错误

  
      
  1. 已经使用clevertap建立了应用程序的链接
  2.   
  3. 通过“纱线安装”安装所有软件包
  4.   
  5. 通过“ pod install”安装豆荚
  6.   

这是我的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)


//----

1 个答案:

答案 0 :(得分:3)

似乎您正在使用Cocoapods将CleverTap React Native集成到iOS应用程序中,并且据我所知,您无法找到 CleverTapReactManager.h 类。

我建议在您的ios / Podfile中添加pod 'clevertap-react-native', :path => '../node_modules/clevertap-react-native'作为依赖项,而不要添加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/

上发布