• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ios - ExpoKit : 'pod update' error after updating to SDK 29

[复制链接]
菜鸟教程小白 发表于 2022-12-11 20:46:50 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

我已经将一个独立的 Expo 项目升级到 Expo SDK 29。现在我想运行 pod install,但是当我这样做时,我收到以下错误消息:

[!] CocoaPods could not find compatible versions for pod "EXPermissionsInterface":
  In Podfile:
    EXCamera (from `../node_modules/expo-camera/ios`) was resolved to 1.0.1, which depends on
      EXPermissionsInterface

    EXPermissionsInterface (from `../node_modules/expo-permissions-interface/ios`)

Specs satisfying the `EXPermissionsInterface (from `../node_modules/expo-permissions-interface/ios`), EXPermissionsInterface` dependency were found, but they required a higher minimum deployment target.

很遗憾,我还没有在网络上发现这个错误。我的 Podfile 看起来像这样:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

EXPO_CPP_HEADER_DIR = 'ExpoKit'

target 'my-app' do
  pod 'ExpoKit',
    :git => "http://github.com/expo/expo.git",
    :tag => "ios/2.7.0",
    :subspecs => [
      "Core"
    ],
    :inhibit_warnings => true
  pod 'EXGL',
    :path => "../node_modules/expo-gl/ios",
    :inhibit_warnings => true
  pod 'EXCore',
    :path => "../node_modules/expo-core/ios",
    :inhibit_warnings => true
  pod 'EXCamera',
    :path => "../node_modules/expo-camera/ios",
    :inhibit_warnings => true
  pod 'EXSensors',
    :path => "../node_modules/expo-sensors/ios",
    :inhibit_warnings => true
  pod 'EXConstants',
    :path => "../node_modules/expo-constants/ios",
    :inhibit_warnings => true
  pod 'EXFileSystem',
    :path => "../node_modules/expo-file-system/ios",
    :inhibit_warnings => true
  pod 'EXPermissions',
    :path => "../node_modules/expo-permissions/ios",
    :inhibit_warnings => true
  pod 'EXCameraInterface',
    :path => "../node_modules/expo-camera-interface/ios",
    :inhibit_warnings => true
  pod 'EXSensorsInterface',
    :path => "../node_modules/expo-sensors-interface/ios",
    :inhibit_warnings => true
  pod 'EXConstantsInterface',
    :path => "../node_modules/expo-constants-interface/ios",
    :inhibit_warnings => true
  pod 'EXReactNativeAdapter',
    :path => "../node_modules/expo-react-native-adapter/ios",
    :inhibit_warnings => true
  pod 'EXFileSystemInterface',
    :path => "../node_modules/expo-file-system-interface/ios",
    :inhibit_warnings => true
  pod 'EXPermissionsInterface',
    :path => "../node_modules/expo-permissions-interface/ios",
    :inhibit_warnings => true
  pod 'EXFaceDetectorInterface',
    :path => "../node_modules/expo-face-detector-interface/ios",
    :inhibit_warnings => true
  pod 'EXSMS',
    :path => "../node_modules/expo-sms/ios",
    :inhibit_warnings => true
  pod 'EXGL-CPP',
    :path => "../node_modules/expo-gl-cpp/cpp",
    :inhibit_warnings => true

  pod 'React',
    :path => "../node_modules/react-native",
    :inhibit_warnings => true,
    :subspecs => [
      "Core",
      "ART",
      "RCTActionSheet",
      "RCTAnimation",
      "RCTCameraRoll",
      "RCTGeolocation",
      "RCTImage",
      "RCTNetwork",
      "RCTText",
      "RCTVibration",
      "RCTWebSocket",
      "DevSupport",
      "CxxBridge"
    ]
  pod 'yoga',
    :path => "../node_modules/react-native/ReactCommon/yoga",
    :inhibit_warnings => true
  pod 'DoubleConversion',
    :podspec => "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec",
    :inhibit_warnings => true
  pod 'Folly',
    :podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec",
    :inhibit_warnings => true
  pod 'glog',
    :podspec => "../node_modules/react-native/third-party-podspecs/glog.podspec",
    :inhibit_warnings => true


  post_install do |installer|
    installer.pods_project.main_group.tab_width = '2';
    installer.pods_project.main_group.indent_width = '2';

    installer.pod_targets.each do |target|

    if target.pod_name == 'ExpoKit'
      target.native_target.build_configurations.each do |config|
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'EX_DETACHED=1'

        # needed for GoogleMaps 2.x
        config.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= []
        config.build_settings['FRAMEWORK_SEARCH_PATHS'] << '${PODS_ROOT}/GoogleMaps/Base/Frameworks'
        config.build_settings['FRAMEWORK_SEARCH_PATHS'] << '${PODS_ROOT}/GoogleMaps/Maps/Frameworks'
      end
    end


    if ['Amplitude-iOS','Analytics','AppAuth','Branch','CocoaLumberjack','FBSDKCoreKit','FBSDKLoginKit','FBSDKShareKit','GPUImage','JKBigInteger2'].include? target.pod_name
      target.native_target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
      end
    end
    # Can't specify this in the React podspec because we need
    # to use those podspecs for detached projects which don't reference ExponentCPP.
    if target.pod_name.start_with?('React')
      target.native_target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
        config.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)']
      end
    end
    # Build React Native with RCT_DEV enabled
    next unless target.pod_name == 'React'
    target.native_target.build_configurations.each do |config|
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV=1'
    end

    end
  end
end

要创建 Podfile,我已按照 Expo 在 Github 上提供的相应说明进行操作。

我认为解决我的问题并不重要,但是,这是我的 package.json:

{
  "main": "node_modules/expo/AppEntry.js",
  "private": true,
  "dependencies": {
    "@expo/react-native-action-sheet": "^1.1.2",
    "@mapbox/polyline": "^1.0.0",
    "expo": "^29.0.0",
    "i18next": "^11.9.0",
    "i18next-locize-backend": "^1.6.0",
    "locize-editor": "^1.6.0",
    "native-base": "^2.7.2",
    "prop-types": "^15.6.2",
    "react": "16.3.1",
    "react-i18next": "^7.12.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz",
    "react-native-create-bridge": "^2.0.1",
    "react-native-keyboard-spacer": "^0.4.1",
    "react-native-maps": "^0.21.0",
    "react-native-remote-svg": "^1.2.0",
    "react-native-swiper": "^1.5.13",
    "react-native-triangle": "0.0.9",
    "react-navigation": "^2.1.0",
    "react-redux": "^5.0.7",
    "redux": "^4.0.0",
    "redux-thunk": "^2.3.0"
  }
}



Best Answer-推荐答案


我也在 Github 上问过这个问题,并在那里得到了一个有效的答案:https://github.com/expo/expo/issues/2585 .

问题是我在 Podfile 中定义的最低 iOS 版本。将此版本从 9.0 更改为 10.0 后,我可以毫无问题地运行 pod update

关于ios - ExpoKit : 'pod update' error after updating to SDK 29,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53143437/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap