OneSignal / OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
https://www.onesignal.com
Other
616 stars 213 forks source link

Update OneSignal Flutter SDK to use pod version 2.12.3 #186

Closed rok5ek closed 4 years ago

rok5ek commented 4 years ago

Description:

I'm trying to run a Flutter app that has a OneSignal Flutter lib 2.3.1 inside, but I'm getting a dependency error on CodeMagic (CI/CD):

Resolving dependencies of Podfile [!] CocoaPods could not find compatible versions for pod "OneSignal": In snapshot (Podfile.lock): OneSignal (< 3.0, = 2.12.3, >= 2.9.3)

  In Podfile:
    OneSignal (< 3.0, >= 2.9.3)

    onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`) was resolved to 2.3.1, which depends on
      OneSignal (= 2.12.2)

It seems like you've changed the constraints of dependency `OneSignal` inside your development pod `onesignal_flutter`.
You should run `pod update OneSignal` to apply changes you've made.

It seems like the latest Flutter lib wasn't updated to use the 2.12.3 OneSignal pod version.

Environment

OneSignal Flutter SDK version: 2.3.1 OneSignal Flutter lib was added in pubspec.yaml under flutter dependencies.

Steps to Reproduce Issue:

  1. Install the Flutter version 2.3.1 using pub into your project
  2. Try to build the app via CodeMagic
  3. Error: CocoaPods could not find compatible versions for pod "OneSignal"

Anything else:

(crash stacktraces, as well as any other information here)

jkasten2 commented 4 years ago

@rok5ek I looks like you updated the OneSignal pod in the OneSignalNotificationServiceExtension target to 2.12.3. We recommend using a version range in our setup guide so the correct version is always used.

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignal', '>= 2.12.2', '< 3.0'
end

An exact version of the OneSignal-Flutter-SDK will always match to an exact version of the OneSignal-iOS-SDK native counter part so builds are consistent. A Flutter SDK update normally is not far behind a native update but not always if the fix / feature does not apply