Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods importing an external framework

I built a Cocoapod which Crashlytics framework. I couldn't understand how to add the external framework (Crashlytics.framework) to the pod, so it will be imported on my project.

Is it possible?

like image 570
Roei Avatar asked May 13 '13 15:05

Roei


2 Answers

If you can add the framework library to your Pod's source files, here's another way to do it. For Pod, 'MyPod', add the framework to a directory 'MyPodSubDirectory'. Then edit the podspec file as follows.

s.preserve_paths = 'MyPodSubDirectory/Crashlytics.framework'
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework Crashlytics' }
s.vendored_frameworks = 'MyPodSubDirectory/Crashlytics.framework'
like image 107
Nithin Haridas Avatar answered Sep 29 '22 10:09

Nithin Haridas


You want to use the vendored_frameworks property.

like image 22
Swizzlr Avatar answered Sep 29 '22 10:09

Swizzlr