Concurrent use of CocoaPods with frameworks and static libraries

I have this Subfile in my project:

platform :ios, '8.0' use_frameworks! target 'FunnyApp' do pod 'Alamofire', '~> 1.2' pod 'SWXMLHash', '~> 1.0' pod 'VaultKit', :path => './Frameworks/VaultKit' pod 'SessionKit', :path => './Frameworks/SessionKit' end 

Only VaultKit is a static library written in Objective-C. This method has:

 Pod::Spec.new do |s| s.name = 'VaultKit' s.version = '0.1' s.license = 'MIT' s.summary = 'Encryption library' s.homepage = 'https://someurl.com' s.social_media_url = 'http://twitter.com/greenfish29' s.authors = { 'Tomas Sliz' => ' greenfish29@email.com ' } s.source = { :git => ' git@github.org :greenfish29/vaultkit.git' } s.ios.deployment_target = '8.0' s.public_header_files = 'VaultKit/VaultKit.h' s.source_files = "VaultKit/*.{h,m}" "VaultKit/Models/*.{h,m}" s.requires_arc = true end 

I also have a title header in my project with this entry:

 #import <VaultKit/VaultKit.h> 

But when I try to build a project, I get this error:

FunnyApp-Bridging-Header.h: 5: 9: file VaultKit.h not found

What could be wrong?

+6
source share
1 answer

Cocoapods does not support both the Framework and Static libraries, and they do not intend to do this.

See discussion here .

In the end, I used the Obj-C libraries for my project, using the bridge title, because the important library that I could not get around had only the Obj-C version.

I think that we can at least get support for dynamic frameworks, which in the future will use static libraries as dependencies.

0
source

Source: https://habr.com/ru/post/986767/


All Articles