apptentive / apptentive-react-native

Apptentive SDK module for React Native
https://learn.apptentive.com/article-categories/react-native/
BSD 3-Clause "New" or "Revised" License
15 stars 19 forks source link

[iOS] CocoaPods could not find compatible versions for pod "ApptentiveKit" #258

Open arunnambissan opened 3 months ago

arunnambissan commented 3 months ago

I am getting below error after updating apptentive-react-native to 6.7.0.

[!] CocoaPods could not find compatible versions for pod "ApptentiveKit":
  In Podfile:
    ApptentiveKit

    apptentive-react-native (from `../node_modules/apptentive-react-native/`) was resolved to 6.7.0, which depends on
      ApptentiveKit (~> 6.7.0)

Specs satisfying the 'ApptentiveKit, ApptentiveKit (~> 6.7.0)' dependency were found, but they required a higher minimum deployment target.
Screenshot 2024-06-24 at 1 00 14 PM
arunnambissan commented 3 months ago

It's getting resolved if I remove the version restriction in this podspec file - node_modules/apptentive-react-native/apptentive-react-native.podspec

From s.dependency 'ApptentiveKit', '~> 6.7.0' to s.dependency 'ApptentiveKit'.

But to do this I will need to create a patch file for the package. Can anyone suggest the correct approach?

arunnambissan commented 3 months ago

The issue was with min_ios_version_supported in project's Podfile. I am using react-native@0.72.10 which has the min_ios_version_supported value as 12.4. But apptentive-react-native supports only iOS 13 and above.

It works if we hard code 13 instead of min_ios_version_supported in Podfile.

Fixed the issue using this approach - https://github.com/stripe/stripe-react-native/issues/1280#issuecomment-1828346834