react-native-mmkv icon indicating copy to clipboard operation
react-native-mmkv copied to clipboard

Update MMKV dependency

Open hotrush opened this issue 4 years ago • 9 comments

Hey, can you please update MMKV dependency to 1.2.12

Otherwise now it's broken for tvos

(tvOS 12.0) is not compatible with `MMKV (1.2.10)`, which does not support `tvOS`

hotrush avatar Jan 21 '22 10:01 hotrush

Where do I update that?

mrousavy avatar Jan 21 '22 10:01 mrousavy

It is updated in master branch, but not for 2.0.0

image

hotrush avatar Jan 21 '22 11:01 hotrush

Actually it is, because iOS uses a podspec.

You may need to run pod repo update && pod update

mrousavy avatar Jan 21 '22 11:01 mrousavy

pod repo update && pod update 
Updating spec repo `react-native-tvos`
Updating spec repo `trunk`
Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration
Auto-linking React Native modules for target `App`: RNCAsyncStorage, RNCPicker, RNDateTimePicker, RNDeviceInfo, RNFBApp, RNFBAuth, RNGestureHandler, RNLocalize, RNReanimated, RNVectorIcons, ReactNativeNavigation, ReactNativeUiLib, react-native-blur, react-native-mmkv, and react-native-netinfo
Auto-linking React Native modules for target `App-tvOS`: RNCAsyncStorage, RNDeviceInfo, RNGestureHandler, RNLocalize, RNReanimated, RNVectorIcons, ReactNativeNavigation, ReactNativeUiLib, react-native-blur, react-native-mmkv, and react-native-netinfo
Update all pods
Updating local specs repositories
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[!] The platform of the target `App-tvOS` (tvOS 12.0) is not compatible with `MMKV (1.2.10)`, which does not support `tvOS`.

Also tried to clean yarn cache but no luck

hotrush avatar Jan 21 '22 11:01 hotrush

Delete your Podfile.lock and Pods/ folder and try again

mrousavy avatar Jan 21 '22 11:01 mrousavy

Yeah, I did it at first :)

Sorted it out finally, tried to add mmkv pod directly into Podfile with needed version and got:

[!] CocoaPods could not find compatible versions for pod "MMKV":
  In Podfile:
    MMKV (~> 1.2.12)

    react-native-mmkv (from `../node_modules/react-native-mmkv`) was resolved to 2.0.0, which depends on
      MMKV

Specs satisfying the `MMKV (~> 1.2.12), MMKV` dependency were found, but they required a higher minimum deployment target.

So, seems mmkv min platform version is 13 now, updated Podfile to have

platform :tvos, '13.0'

And it works. Thanks

hotrush avatar Jan 21 '22 13:01 hotrush

I'm getting this: CocoaPods could not find compatible versions for pod "MMKV": In Podfile: react-native-mmkv (from ../node_modules/react-native-mmkv) was resolved to 2.12.0, which depends on MMKV (>= 1.3.3)

react-native-mmkv-storage (from `../node_modules/react-native-mmkv-storage`) was resolved to 0.9.1, which depends on
  MMKV (= 1.2.13)
  
  any idea on what to do?

Oyedele-Sg avatar Apr 25 '24 14:04 Oyedele-Sg

pod update.

mrousavy avatar Apr 29 '24 10:04 mrousavy

@Oyedele-Sg I had a similar issue with my github action:

[!] CocoaPods could not find compatible versions for pod "MMKV":
  In snapshot (Podfile.lock):
    MMKV (= 1.3.5, >= 1.2.13)

  In Podfile:
    react-native-mmkv (from `../node_modules/react-native-mmkv`) was resolved to 2.11.0, which depends on
      MMKV (>= 1.2.13)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `MMKV` inside your development pod `react-native-mmkv`.
   You should run `pod update MMKV` to apply changes you've made.

to fix it, I added the pod repo update before my pod install:

- name: Update CocoaPods Repository
run: pod repo update

- name: Install Pods
run: yarn pod-install

coofzilla avatar Apr 30 '24 00:04 coofzilla