Failed to create Objective-C module 'zipzap'

I would like to use a library zipzap

in my swift ios project.

I am using cocoapods to integrate it. When I run pod install

everything works fine, but when I do import zipzap

it says Could not build Objective-C module 'zipzap'

.

I've done everything that people recommend here and in similar questions. But no luck.

Is it possible that this library is just not compatible with swift based projects?

This is mine Podfile

:

# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

target 'MyProject-iOS' do
pod 'Reachability', '~> 3.2'
pod 'SwiftyJSON', '~> 2.1'
pod 'zipzap', '~> 8.0'
end

target 'MyProject-iOSTests' do

end

      

+3


source to share


3 answers


I faced the same problem. It looks like there is no subsip for zipzap. This causes the pod to end up making all header files public. And this is what is causing the problem.

I wrote my own podspec file that only publishes five headers, the rest are private. This solution was based on podspec.json found in the zipzap repository.



I have included zipzap in my project like this:

pod 'zipzap' ,: podspec => ' https://raw.githubusercontent.com/tahasamad/zipzap/master/zipzap.podspec '

+4


source


I am the author of ZipZap. Version 8.0.4 now correctly supports iOS and OS X frameworks, both with and without CocoaPods. After updating with CocoaPods you should just be able to import ZipZap

in Swift and "it just works".



To get proper exception handling you will need to be using CocoaPods 0.36 or newer, otherwise you might get build warnings.

+3


source


Glen Lowe's answer did it for me.

But I had to use "import zipzap" (all lowercase) instead of "import ZipZap" (uppercase Zs).

Using CocoaPods 0.38.2 and ZipZap 8.0.4

PS: I don't have enough reputation to comment on his answer. Unfortunately.

0


source







All Articles