Reputation: 2220
I have created custom swift framework in this I have installed pods for using some third party framework.
I am done with the successful build now but How I can use or add that framework in my existing project.
Do I need to copy the entire framework project in my existing project?
If any one knows the solution please help.
Thank you.
Upvotes: 1
Views: 2293
Reputation: 202
I was also facing the same problem and here's what I did
Open the custom framework you are creating, under products section in the navigation bar right click on the your custom framework (eg customFramework.framework) file and select "reveal in finder".
Now along with your custom framework you can see all the third party frameworks you are using. Copy all the frameworks you need and paste them wherever you feel like so you can easily access to them.
Now open up your existing project where you want to use your custom framework.
Go to Embedded Binaries section in the general tab of your target. Click on the + button -> click on add other -> navigate to location where you pasted all your required frameworks along with your custom framework and click open.
That's it. Do this and let me know if it helped you.
Upvotes: 2
Reputation: 349
Upvotes: 1
Reputation: 3291
Hope this will help.
Upvotes: 1
Reputation: 8013
The most obvious, easiest and manageable solution would be creating a pod. Then declare the required pods in xyz.podspec
file to use your pod as dependencies.
Use your custom cocoapod using following:
pod 'Name', :path => '~/code/Pods/' # if in local file system
pod 'NAME', :git => 'https://example.com/URL/to/repo/NAME.git' # if it is in your private repo
Upvotes: 0