upgrading to new react-native version and doing pod install throws an error CocoaPods could not find compatible versions for pod "SocketRocket"

huangapple go评论100阅读模式
英文:

upgrading to new react-native version and doing pod install throws an error CocoaPods could not find compatible versions for pod "SocketRocket"

问题

我尝试将React Native版本更新到最新的0.72.3,并运行pod install,结果出现以下错误:

[!] CocoaPods无法找到与pod "SocketRocket"兼容的版本:
  在快照(Podfile.lock)中:
    SocketRocket(= 0.6.0,〜> 0.6.0)

  在Podfile中:
    React-Core/RCTWebSocket(来自`../node_modules/react-native/`)已解析为0.72.3,它依赖于
      SocketRocket(= 0.6.1)

找到了满足“SocketRocket(= 0.6.0,〜> 0.6.0),SocketRocket(= 0.6.1)”依赖关系的规范,但它们要求更高的最低部署目标。

问题可能是什么,是否有正常的解决方法?

英文:

i tried to update react-native version to latest 0.72.3 and run pod install which resulted in next error

[!] CocoaPods could not find compatible versions for pod "SocketRocket":
  In snapshot (Podfile.lock):
    SocketRocket (= 0.6.0, ~> 0.6.0)

  In Podfile:
    React-Core/RCTWebSocket (from `../node_modules/react-native/`) was resolved to 0.72.3, which depends on
      SocketRocket (= 0.6.1)

Specs satisfying the `SocketRocket (= 0.6.0, ~> 0.6.0), SocketRocket (= 0.6.1)` dependency were found, but they required a higher minimum deployment target.

what can be the issue and is there a normal way around it?

答案1

得分: 2

这对我来说有效,在ios文件夹内执行:

bundle exec pod install --repo-update

英文:

This worked for me, inside ios folder,

bundle exec pod install --repo-update

答案2

得分: 1

我遇到了相同的错误。通过删除锁定文件和pod文件夹,并运行 pod install --repo-update 来解决了问题。部署目标设置为 12.4

英文:

I got the same error. Manage to fix it by deleting the lockfile and pod folder, and run pod install --repo-update. Had deployment target set to 12.4.

答案3

得分: 0

将Podfile中的平台更新至至少iOS 11:

platform :ios, '11.0'

参考最近SocketRocket的要求更改,网址:https://github.com/facebookincubator/SocketRocket/commit/6637623b392a1ee3f1f2ce8c4a6bfcc75dd394e9

英文:

Update the platform in the Podfile to at least iOS 11:

platform :ios, '11.0'

Reference the recent SocketRocket requirement change at https://github.com/facebookincubator/SocketRocket/commit/6637623b392a1ee3f1f2ce8c4a6bfcc75dd394e9

huangapple
  • 本文由 发表于 2023年7月17日 20:27:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/76704454.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定