Add Swift Package dependency to Cocoapod

Viewed 220

I have a react-native project which has a custom cocoapods dependency. The dependency is a wrapper for a native iOS SDK.

The SDK was a binary that I included in the dependency, which worked fine.

With the latest SDK update they moved to Swift Package Manager and now I am struggling to add the dependency to my wrapper which is included as cocoapod.

As I understand Swift packages should live in the main application and not in the dependency. How can the cocoapods dependency access the Swift Package from the main project?

So the structure is

  • react-native app depends on cocoapods dependency
  • cocoapods dependency depends on Swift Package
  • Swift Package is included in react-native app

Any help is appreciated!

0 Answers
Related