0

尝试通过 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>

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

4

0 回答 0