uiwjs / react-native-alipay

基于 React Native 的宝支付包,已更新到最新的支付宝 SDK 版本,支持Android/iOS。
https://uiwjs.github.io/react-native-alipay/
MIT License
208 stars 49 forks source link

RN 0.66.4 , react-native-alipay 4.0.2 , iOS 模拟器编译报错。Undefined symbols for architecture x86_64...... #54

Open iscodeok opened 2 years ago

iscodeok commented 2 years ago
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_UTDevice", referenced from:
      objc-class-ref in AlipaySDK
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
jaywcjlove commented 2 years ago

@iscodeok 这个问题只能排查,我也不知道什么问题。:(

iscodeok commented 2 years ago

@jaywcjlove 好,谢谢

qilovehua commented 2 years ago

@iscodeok 有解决了吗? 我也碰到了。。。 xcode12.1

qilovehua commented 2 years ago

需要在 Podfile 里手动集成一下 pod 'UTDID' 就好了

iscodeok commented 2 years ago

@qilovehua react-native-alipay 4.0.2我暂时降级用 react-native-alipay 3.0.0 没有问题

qilovehua commented 2 years ago

pod 'UTDID'

Podfile里加pod 'UTDID' 就可以了哦,我的已经正常了

iscodeok commented 2 years ago

@qilovehua 我加过 pod 'UTDID' 老样子,可能RN版本太高。

qilovehua commented 2 years ago

@iscodeok 我的就是0.66.4哦,gradle version用的6.8.1,不能用7以上的

iscodeok commented 2 years ago

@qilovehua 好,有空再试看,目前支付宝旧的SDK没有弃用 3.0.0 也是可以用。

yxf007 commented 2 years ago

@iscodeok 我的就是0.66.4哦,gradle version用的6.8.1,不能用7以上的

pod 'UTDID' 这句话直接加上吗 那个位置?

qilovehua commented 2 years ago

@yxf007 ios/Podfile

platform :ios, '11.0'
target '***app' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  pod 'UTDID'
  ...
end
yxf007 commented 2 years ago

@yxf007 ios/Podfile

platform :ios, '11.0'
target '***app' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  pod 'UTDID'
  ...
end

十分感谢! gradle我用的6.9也报错了 换成6.8.1 可以了

junyongNie commented 2 years ago

@qilovehua 我加过 pod 'UTDID' 老样子,可能RN版本太高。

加 pod 'UTDID' 以后你重新 pod install 了吗

qilovehua commented 2 years ago

@qilovehua 我加过 pod 'UTDID' 老样子,可能RN版本太高。

加 pod 'UTDID' 以后你重新 pod install 了吗

需要的