braintree / braintree-ios-drop-in

Braintree Drop-in for iOS
https://developers.braintreepayments.com
MIT License
98 stars 77 forks source link

Dropin 7.3.0 is not compatible with Braintree 4.27.0 #172

Closed pcki11 closed 5 years ago

pcki11 commented 5 years ago

General information

Issue description

Having defined both in a podfile like this:

    pod 'Braintree', '4.27.0'
    pod 'BraintreeDropIn', '7.3.0'

Results in:

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Braintree/Core":
  In snapshot (Podfile.lock):
    Braintree/Core (= 4.27.0)

  In Podfile:
    Braintree (= 4.27.0) was resolved to 4.27.0, which depends on
      Braintree/Core (= 4.27.0)

    BraintreeDropIn (= 7.3.0) was resolved to 7.3.0, which depends on
      BraintreeDropIn/DropIn (= 7.3.0) was resolved to 7.3.0, which depends on
        Braintree/Core (~> 4.26.1)

Specs satisfying the `Braintree/Core (= 4.27.0), Braintree/Core (= 4.27.0), Braintree/Core (~> 4.26.1)` dependency were found, but they required a higher minimum deployment target.
sestevens commented 5 years ago

Hi @pcki11, thanks for pointing this out! You're correct that BraintreeDropIn is using the previous version of Braintree. This will be updated in a future release.

You don't need to include pod 'Braintree', '4.27.0' if you're using BraintreeDropIn, since BraintreeDropIn already includes Braintree as a dependency.

Also, BraintreeDropIn supports a minimum deployment target of iOS 9, which it looks like is the root of the issue. See this line from your error message:

Specs satisfying the `Braintree/Core (= 4.27.0), Braintree/Core (= 4.27.0), Braintree/Core (~> 4.26.1)` dependency were found, but they required a higher minimum deployment target.

If you need to support iOS 8, you'll need to use the base Braintree SDK rather than BraintreeDropIn.

sestevens commented 5 years ago

Actually, I spoke too soon. Braintree 4.26.1 is the minimum version compatible with BraintreeDropIn, but BraintreeDropIn will use a later version if it's available.

Still, you will need to update your minimum deployment target to iOS 9 if you want to use BraintreeDropIn.