braze-inc / braze-swift-sdk

Braze SDK for the Apple ecosystem, including: iOS, macOS, iPadOS, visionOS, tvOS
https://www.braze.com
Other
52 stars 19 forks source link

[Bug]: Update dependency of SDWebImage to 5.18.0 to solve SPM issues. #78

Closed BryanNorden closed 1 year ago

BryanNorden commented 1 year ago

Platform

iOS

Platform Version

iOS 16.4

Braze SDK Version

6.6.0

Xcode Version

Xcode 14.3.1

Computer Processor

Apple (M1)

Repro Rate

80

Steps To Reproduce

Example:

  1. Add braze-swift-sdk v6.6.0 to iOS project via SPM
  2. Add SDWebImageWebPCoder v0.11.0 or higher via SPM
  3. Build and Run the app.

SPM will add SDWebImage since SDWebImageWebPCoder has declared it as a dependency. However, SPM will get confused because SDWebImageWebPCoder v0.11.0 or higher requires SDWebImage v5.15.0 or higher; whereas braze has the dependency of SDWebImage for v5.13.2

Expected Behavior

Use braze-swift-sdk via SPM like normal without having SPM struggle trying to find the right SDWebImage to satisfy braze sdk and other sdks that require a newer SDWebImage version.

Actual Incorrect Behavior

SPM will go in circles when checking out new branches trying to grab the correct SDWebImage framework that will work for both braze and other sdks added.

Verbose Logs

No response

Additional Information

Would it be possible to update braze-swift-sdk to use SDWebImage's latest version?

jerielng commented 1 year ago

Hi @BryanNorden, your SPM instance shouldn't run into any compatibility issues with Braze + SDWebImage since our dependency does not strictly confine the usage to 5.13.2. Rather, it only requires >= 5.13.2, so a higher version like 5.15.0 should be compatible.

As a test, I imported both SDKs into a fresh project and was able to get the latest version of SDWebImage 5.18.0 automatically. image

Knowing the above, are you able to reproduce this case successfully? One other thing you could also try is maybe clearing your package caches or re-adding some of these dependencies?

BryanNorden commented 1 year ago

I have been trying to do some deep cleaning and cleaning my package cache. I was able to get it to work on one machine, but not another. So probably more on my side then thanks for the reply. I will close this bug