renebigot / XlsxReaderWriter

XlsxReaderWriter is an Objective-C library for iPhone / iPad and Mac. It parses and writes MS Excel XLSX files.
MIT License
437 stars 119 forks source link

Not able to use with cocoapods in mac application #72

Open jkmathew opened 7 years ago

jkmathew commented 7 years ago

In my pod file for mac application project, I have added pod 'XlsxReaderWriter' , but when I runpod install its giving error like

$ pod install Analyzing dependencies [!] The platform of the target CoredataMacSample (OS X 10.11) is not compatible with XlsxReaderWriter (1.0.11), which does not support OS X.

What I could understand is its only specifying iOS(s.platforms = { :ios => "7.0" }) as platform in the podspec. Will XlsxReaderWriter support macOS?

wateryoma commented 7 years ago

i forked repo and made some change to podspec added to platforms :osx => "10.12" removed from frameworks "UIKit"

now it can be installed with cocoapods, add

pod 'XlsxReaderWriter', :git => 'https://github.com/wateryoma/XlsxReaderWriter.git', :branch => 'master'

to your Podfile after

pod install

you need to create bridge header (if you use swift) and add $(SRCROOT)/Pods to Header search paths in build settings

i guess it's not the best way, but i needed to make lib work for osx asap