XlsxReaderWriter icon indicating copy to clipboard operation
XlsxReaderWriter copied to clipboard

Cocoapods + Swift results does not build

Open dpyro opened this issue 8 years ago • 3 comments

Specifically, while the scheme for the Pods and any of the Pod descendants builds, trying to build my app’s (written in Swift) schema results in “Could not build Objective-C module ‘XlsxReaderWriter’”.

The more specific error is that “‘XMLDictionary.h’ could not be found” for BRARelationship.h.

I am not using a bridging header, as "XlsxReaderWriter-swift-bridge.h” does not seem to be discoverable from the Swift project.

I’m not a CocoaPod or Xcode veteran, so if there’s something else I need to be doing, please let me know!

dpyro avatar May 23 '16 19:05 dpyro

This issue also occurs when using XlsxReaderWriter as a subproject to Swift 2.2/Xcode 7. I fixed it by first adding XMLDictionary.h to the public headers under Build Phases for the Pod project.

dpyro avatar May 27 '16 02:05 dpyro

Created a pull-request to fix, see https://github.com/renebigot/XlsxReaderWriter/pull/36

dpyro avatar May 30 '16 18:05 dpyro

I was trying to use the framework with Swift in an OS X application and having XMLDictionary.h not found error. This link helped me to fix it.

Basically, all you need to do is:

""" In build settings, point the Header Search Paths (if you use #include <file.h>) or User Header Search Paths (if you use #include "file.h") to the directory of the static library project. If the static library project is inside your app directory, use this:

"$(PROJECT_DIR)" (recursive enabled) """

Hope, it helps someone.

gunesmert avatar May 30 '16 23:05 gunesmert