I have a Podfile set up to use WhirlyGlobeMaply:
platform :ios, '10.2'
project 'MyProject.xcodeproj'
target 'MyProject' do
use frameworks!
pod 'WhirlyGlobe', '2.4'
pod 'WhirlyGlobeResources'
[some other pods]
end
This builds fine. But when I add GRDB.swift
pod GRDB.swift
then pod install/clean/build everything, the new dependency gets compiled fine (GRDB), but during the compilation of the old one (WhirlyGlobe), I get:
'sqlite3.h' file not found
So, both pods on their own compile but there seems to be some interaction where the sqlite Header is concerned.
(In fact I didn't notice the issue at first, because I didn't clean my project and on re-building, XCode only had to compile GRDB, which went just fine. This only happens after a clean.)
What I found out so far:
Both WhirlyGlobe and and GRDB.swift include sqlite as a library.
s.library = 'sqlite3'
s.subspec 'Lib' do |l|
...
l.libraries = 'c++', 'sqlite3'
...
end
GRDB actually includes an sqlite3.h
file in it's Pod installation at
Pods/GRDB.swift/Support/sqlite3.h
.
No such file seems to be included in WhirlyGlobes installation (checked with find Pods/ -name "sqlite3.h"
.
The file #import "sqlite3.h"
that raises the error is VectorDatabase.h
and part of WhirlyGlobeLib as the podspec would suggest
What I did so far:
pod deintegrate
, pod install
with closed XCodesqlite3.h
from GRDB to the Header Search Path (both of that of my project and of the WhirlyGlobe Pods target)Any hints are (very much) appreciated.
Author of GRDB here.
For the context: GRDB for Swift 3 ships with sqlite3.h in order to let applications use the low-level C apis of SQLite when they need it. That sqlite3.h is identical to the header that ships with iOS SDK, but it has been duplicated in order to workaround limitations in the way Clang builds modules.
Now here are two possible solutions for your issue:
#import "sqlite3.h"
with #import <sqlite3.h>
, so that the compiler knows that it should be searched in the system headers.