简体   繁体   中英

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?

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'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM