如何解决错误:架构 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
<key>NSPhotoLibraryUsageDescription</key>
<string>App Name would like access to your photo gallery</string>
感觉我已经在整个互联网上搜索了它,但仍然没有找到解决方案,在此先感谢各位!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。