2

我正在尝试将clevertap 与本机反应集成,当我包含“use_frameworks!”时 在cocoa pods能够使用

#import <CleverTapReact / CleverTapReactManager.h>

在 UMLCore 中生成编译错误

  1. 已经用clevertap制作了应用程序的链接
  2. 通过“yarn install”安装所有软件包
  3. 通过“pod install”安装 pod

这是我的播客文件:

//----

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)


//----
4

1 回答 1

4

似乎您正在使用 Cocoapods 为您的 iOS 应用程序集成 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/上发帖

于 2019-04-18T11:14:26.860 回答