react-native-async-storage / async-storage

An asynchronous, persistent, key-value storage system for React Native.
https://react-native-async-storage.github.io/async-storage/
MIT License
4.7k stars 466 forks source link

pod install fail CocoaPods could not find compatible versions for pod "RNCAsyncStorage" on RN 0.72.x & New Arch #998

Closed retyui closed 1 year ago

retyui commented 1 year ago

What happened?

pod install fail with the next error on RN+IOS+New_Arch

[Codegen] Done.
Updating local specs repositories
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "RNCAsyncStorage":
  In Podfile:
    RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)

Specs satisfying the `RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)` dependency were found, but they required a higher minimum deployment target.
Couldn't install Pods. Updating the Pods project and trying again...
Command `pod install` failed.
└─ Cause: CocoaPods could not find compatible versions for pod "RNCAsyncStorage":
  In Podfile:
    RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)

Specs satisfying the `RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)` dependency were found, but they required a higher minimum deployment target.

error Command failed with exit code 1.

Version

1.19.1

What platforms are you seeing this issue on?

System Information

System:
  OS: macOS 13.5
  CPU: (10) arm64 Apple M1 Pro
  Memory: 7.56 GB / 32.00 GB
  Shell:
    version: 3.6.1
    path: /opt/homebrew/bin/fish
Binaries:
  Node:
    version: 18.17.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.19
    path: /opt/homebrew/bin/yarn
  npm:
    version: 9.7.2
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2023.07.10.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.12.1
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: Flamingo 2022.2.1 Patch 2 Flamingo 2022.2.1 Patch 2
  Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.19
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.3
    wanted: 0.72.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Steps to Reproduce

cd MyRn72
yarn add @react-native-async-storage/async-storage
RCT_NEW_ARCH_ENABLED=1 npx pod-install
retyui commented 1 year ago

test on RN 0.72.x, the same issue

tido64 commented 1 year ago

Does this help: https://github.com/react-native-async-storage/async-storage/issues/982#issuecomment-1618938674

retyui commented 1 year ago

@tido64 no it's a different issue

tido64 commented 1 year ago

Do you have a repro? The error message indicates that you're not targeting a high enough iOS version.

retyui commented 1 year ago

fixed by defining a 13.4 platform version in ios/Podfile

platform :ios, "13.4"