Cannot find header file when using Cocoapods version 1.0 - works fine with Cocoapods version 0.39

I am trying to use libFLAC compiled in iOS in my project, using CocoaPod to install as a dependency.

The problem is that the workspace is created just fine if I use CocoaPod version 0.39, but there is a build error if I use CocoaPod version 1.0 (see below for detailed error information)

I am using the project https://github.com/evature/flac-ios

My podkayl contains:

source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/evature/Eva-Pods.git' platform :ios, '8.0' use_frameworks! target 'ExampleApp' do pod 'JSQMessagesViewController', '~>7.0' pod 'libFLAC', '~>1.3.0' pod 'RXPromise', '~>0.13.0' end 

Error compiling missing header file (inside libFlac source) -

#include "private/bitmath.h" <'private / bitmath.h' not found

This header file exists in the Pods project under Pods/libFlac/CorePrivateHeaders

libflac podspec is located at https://github.com/evature/Eva-Pods/blob/master/libFLAC/1.3.1/libFLAC.podspec

I am using Xcode Version 7.3.1

I suppose that some discontinuous change between version 0.39 and version 1.0 is to blame, but looking at the change log and Podspec, I could not find the violation.

+8
cocoapods podspec
source share
2 answers

Passed a quick check. I think you need to remove "use_frameworks!". from your podcast. Since none of the other libraries are built using Swift, you should be fine.

+2
source share

For me, this is caused by Xcode cache data. You can copy the project to a new path and run it to verify this. Or delete the cache and run. Here's how to remove it:

  • Open your Xcode preference and select Locations: enter image description here

  • Click the arrow on Derived Data and delete all files in the DeriveData folder: enter image description here

  • Run
+1
source share

All Articles