jpush / jshare-react-native

https://docs.jiguang.cn
MIT License
105 stars 28 forks source link

iOS安装编译报错 #56

Closed Lxxyx closed 6 years ago

Lxxyx commented 6 years ago

背景:纯RN项目

  1. 安装
  2. react-native link

Headers search path已加

编译时报错:

Undefined symbols for architecture x86_64: "_OBJCCLASS$_JSHAREService", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture x86_64

另外在使用 pods install 添加依赖时,Pods会安装 React 的依赖

huangminlinux commented 6 years ago

检查配置项加了没 https://github.com/jpush/jshare-react-native/blob/master/docs/iOSConfig.md#添加搜索路径

Lxxyx commented 6 years ago

确定是已添加了的。上面也提过 Headers search path已加

Lxxyx commented 6 years ago

image

huangminlinux commented 6 years ago

编译选项是否设为 release 了?

huangminlinux commented 6 years ago

换成真机看看还有没问题。

Lxxyx commented 6 years ago

设为 release 一样报错

image

Lxxyx commented 6 years ago

真机装不上。打包时候就报错了,archive无法生成安装包

huangminlinux commented 6 years ago

用最新版测试没出现这个问题,QQ 聊效率高点 Q:380108184

Lxxyx commented 6 years ago

因为 link 失败出现的问题。 需要用户手动链接文件:

  1. 找到node_modules/jshare-react-native
  2. image

  3. 拖到 image
  4. image

模拟器有错误的参考这个:https://github.com/jpush/jpush-react-native/issues/104#issuecomment-269127564

谢谢 @huangminlinux 的热心解答