Home > Mobile >  How to add third party libraries to custom framework with CocoaPods?
How to add third party libraries to custom framework with CocoaPods?

Time:09-15

I want to add third party libraries (like Swinject, or AlamoFire) to my custom framework (that created with swift) with CocoaPods.

the way I'm using is open terminal and navigate to my framework directory and run pod init. after that adding third party libraries to Podfile and then run pod install.

is this way correct for using my framework later in my app project? and is there a better way for doing this?

CodePudding user response:

For installing the third-party libraries into the project:

Step 1: Open the terminal and navigate to the project directory.

Step 2: Type pod init in the terminal and press enter.

Step 3: Add the third-party libraries into the Podfile.

Step 4: Type pod install in the terminal and press enter.

CodePudding user response:

So, you need to add dependencies in your Custom Pod Podspec -

s.dependency 'Alamofire', "~> 5.4"
s.dependency 'PromiseKit', "~> 5.4"

For further reference - Cocopod Link

  • Related