gpt4 book ai didi

ios - 安装原生 SDK 后 NativeModules.RNRadar 仍未定义

转载 作者:行者123 更新时间:2023-11-28 23:39:51 28 4
gpt4 key购买 nike

在 iOS 模拟器上运行时,任何 Radar 函数都会产生“NativeModules.RNRadar 未定义”错误。我已经按照 iOS 的 SDK 说明进行操作。我还没有为 Android 安装。

该应用只是基本的 rn 模板应用,在我调用 Radar 之前运行良好。

  1. 使用 rn typescript 模板开始清理项目。
  2. 按照SDK安装instructions来自 Radar 文档。
  3. 安装 RN 包并按照安装 instructions .
  4. componentDidMount 中从 App.tsx 调用 Radar。

enter image description here

enter image description here

enter image description here

更新:在 Plist 屏幕截图中,您会看到其中一项隐私设置为空字符串。我输入了一个字符串,但它没有任何改变。

AppDelegate 中的错误在运行时没有影响。

最佳答案

我在 initializeWithPublishableKey 中遗漏了 @ 字符串前缀,但不知何故 native 代码正在编译。

来自随附的 GitHub thread ...

Yeah, this is very odd as that native could shouldn't even compile; the string literal in [Radar initializeWithPublishableKey:"key"] should fail, should be [Radar initializeWithPublishableKey:@"key"]. I've noticed that react native builds can fail but the toolchain still pushes an old version of the .app to the simulator, its worth double checking that your build is succeeding.

关于ios - 安装原生 SDK 后 NativeModules.RNRadar 仍未定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53823861/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com