Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: [!] CocoaPods could not find compatible versions for pod "OneSignalXCFramework": #1543

Closed
2 of 3 tasks
n3omaster opened this issue Aug 24, 2023 · 8 comments
Closed
2 of 3 tasks

Comments

@n3omaster
Copy link

n3omaster commented Aug 24, 2023

What happened?

When installing "react-native-onesignal": "^5.0.0" it works fine with android but ios pod install returns:

[Hermes] Using the release tarball from Maven Central
[!] CocoaPods could not find compatible versions for pod "OneSignalXCFramework":
In Podfile:
OneSignalXCFramework (< 4.0, >= 3.0)

react-native-onesignal (from `../node_modules/react-native-onesignal`) was resolved to 5.0.0, which depends on
  OneSignalXCFramework (= 5.0.1)

Specs satisfying the OneSignalXCFramework (< 4.0, >= 3.0), OneSignalXCFramework (= 5.0.1) dependency were found, but they required a higher minimum deployment target.

Steps to reproduce?

1. Install "react-native-onesignal": "^5.0.0"
2. Install ios pods

What did you expect to happen?

Error when installing Pods

React Native OneSignal SDK version

Release 5.0.0

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

erich@Erichs-MBP ios % pod install
Auto-linking React Native modules for target `qp`: BVLinearGradient, RNCAsyncStorage, RNCClipboard, RNDeviceInfo, RNFastImage, RNGestureHandler, RNPermissions, RNSVG, RNScreens, RNSentry, RNSound, RNVectorIcons, lottie-react-native, react-native-camera, react-native-device-brightness, react-native-encrypted-storage, react-native-fingerprint-scanner, react-native-image-picker, react-native-onesignal, and react-native-safe-area-context
Framework build type is static library
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
[Codegen] Found rncore
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`
[Hermes] Using the release tarball from Maven Central
[!] CocoaPods could not find compatible versions for pod "OneSignalXCFramework":
  In Podfile:
    OneSignalXCFramework (< 4.0, >= 3.0)

    react-native-onesignal (from `../node_modules/react-native-onesignal`) was resolved to 5.0.0, which depends on
      OneSignalXCFramework (= 5.0.1)

Specs satisfying the `OneSignalXCFramework (< 4.0, >= 3.0), OneSignalXCFramework (= 5.0.1)` dependency were found, but they required a higher minimum deployment target.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@n3omaster
Copy link
Author

Fixed!

Just modify the Podfile:

target 'OneSignalNotificationServiceExtension' do
pod 'OneSignalXCFramework', '>= 5.0', '< 6.0'
end

@jennantilla
Copy link
Contributor

@n3omaster glad you got it! Let us know if you have any other questions or concerns!

@yernandus
Copy link

can we fix this in the repo itself? can't use this hack for expo project

@Rehan-05
Copy link

Rehan-05 commented Oct 28, 2023

still having the same issue.

**Fetching podspec for glog from ../node_modules/react-native/third-party-podspecs/glog.podspec
[!] CocoaPods could not find compatible versions for pod "react-native-onesignal":
In Podfile:
react-native-onesignal (from ../node_modules/react-native-onesignal)

Specs satisfying the react-native-onesignal (from ../node_modules/react-native-onesignal) dependency were found, but they** required a higher minimum deployment target.

Here is my pod file code:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'EWallet' do
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "../node_modules/react-native-permissions/ios/Camera"
config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])

pod 'RNCViewpager', :path => '../node_modules/@react-native-community/viewpager'

add pods for desired Firebase products

https://firebase.google.com/docs/ios/setup#available-pods

pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'

target 'EWalletTests' do
inherit! :complete
# Pods for testing
end

target 'OneSignalNotificationServiceExtension' do
pod 'OneSignalXCFramework', '>= 5.0', '< 6.0'
end

Enables Flipper.

Note that if you have use_frameworks! enabled, Flipper will not work and

you should disable these next few lines.

use_flipper!

post_install do |installer|

flipper_post_install(installer)

end

end

#target 'EWallet-tvOS' do

# Pods for EWallet-tvOS

target 'EWallet-tvOSTests' do

inherit! :search_paths

# Pods for testing

end

#end

@workabhideveloper
Copy link

image got this

@MSetnik
Copy link

MSetnik commented Oct 17, 2024

Got the same error, @workabhideveloper have you found a solution?

@jasonfish568
Copy link

Got the same error, @workabhideveloper have you found a solution?

https://stackoverflow.com/a/70508921/4958459

cd ios/
pod repo update
rm -rf Podfile.lock Pods
pod install

@donmb1
Copy link

donmb1 commented Oct 23, 2024

cd ios/
pod repo update
rm -rf Podfile.lock Pods
pod install

cd ios/
pod repo update
rm -rf Podfile.lock Pods
cd ..
npx cap sync

worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants