微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

错误:架构 x86_64 的未定义符号:“_OBJC_CLASS_$_RNPermissionHandlerPhotoLibrary” in react-native (iOS)

如何解决错误:架构 x86_64 的未定义符号:“_OBJC_CLASS_$_RNPermissionHandlerPhotoLibrary” in react-native (iOS)

尝试通过 Xcode 构建项目时出现上述错误

我知道已经有一些关于此问题的线索,但我尝试了所有方法,但仍然无法正常工作。 Cocoapods 更新,带有静态链接等的预安装东西

我的 podfile 如下所示:

    require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios,'10.0'

target 'gymlabs_mobile_client' 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
  )

  target 'gymlabs_mobile_clientTests' do
    inherit! :complete
    # Pods for testing

    permissions_path = '../node_modules/react-native-permissions/ios'

    pod 'Permission-PhotoLibrary',:path => "#{permissions_path}/PhotoLibrary"
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled,Flipper will not work and
  # you should disable the next line.
  # use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.12'
      end
    end
  end
end

我还在 Info.plist 中添加了以下内容

<key>NSPhotoLibraryUsageDescription</key>
    <string>App Name would like access to your photo gallery</string>

感觉我已经在整个互联网上搜索了它,但仍然没有找到解决方案,在此先感谢各位!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?