From d822ad2b77ec772f2ae5e9ca631b38c5e175764a Mon Sep 17 00:00:00 2001 From: Stefan Mayer-Popp Date: Wed, 23 Mar 2016 11:41:10 +0100 Subject: [PATCH 1/3] Update module.modulemap Imports the SDK based on current architecture. Fixes incompatibility problems for Xcode 7.3. Also includes link flag for convenience. --- podstuff/module.modulemap | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/podstuff/module.modulemap b/podstuff/module.modulemap index 122acd2e..443b93e9 100644 --- a/podstuff/module.modulemap +++ b/podstuff/module.modulemap @@ -5,7 +5,18 @@ framework module SQLite { // // header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sqlite3.h" // header "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sqlite3.h" - header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h" + // header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h" + module arm { + header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h" + link "sqlite3" + requires arm + } + + module x86 { + header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sqlite3.h" + link "sqlite3" + requires x86 + } export * module * { export * } From d0277040a8bc3ece266f3651a73445080a6a5022 Mon Sep 17 00:00:00 2001 From: Stefan Mayer-Popp Date: Wed, 23 Mar 2016 12:10:00 +0100 Subject: [PATCH 2/3] Fixes missing arm64 compatibility I've just missed arm64 compatibility. Works now fine with Xcode 7.2.1 --- podstuff/module.modulemap | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/podstuff/module.modulemap b/podstuff/module.modulemap index 443b93e9..50c31a61 100644 --- a/podstuff/module.modulemap +++ b/podstuff/module.modulemap @@ -8,15 +8,20 @@ framework module SQLite { // header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h" module arm { header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h" - link "sqlite3" requires arm } + module arm64 { + header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h" + requires arm64 + } + module x86 { header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sqlite3.h" - link "sqlite3" requires x86 } + + link "sqlite3" export * module * { export * } From 8d2903bd70029379184e77e2b6916cf2d884b6de Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Wed, 23 Mar 2016 10:59:24 -0400 Subject: [PATCH 3/3] CocoaPods fix: Use platform-specific module maps Xcode 7.3 got more strict about SDK headers. We need to use multiple module maps to accommodate various platforms and we need to scope `requires` to accommodate various architecturers. Signed-off-by: Stephen Celis --- .../ios.modulemap | 11 +++-------- CocoaPods/osx.modulemap | 10 ++++++++++ CocoaPods/tvos.modulemap | 18 ++++++++++++++++++ SQLite.swift.podspec | 5 ++++- SQLite.xcodeproj/project.pbxproj | 2 +- 5 files changed, 36 insertions(+), 10 deletions(-) rename podstuff/module.modulemap => CocoaPods/ios.modulemap (56%) create mode 100644 CocoaPods/osx.modulemap create mode 100644 CocoaPods/tvos.modulemap diff --git a/podstuff/module.modulemap b/CocoaPods/ios.modulemap similarity index 56% rename from podstuff/module.modulemap rename to CocoaPods/ios.modulemap index 50c31a61..502383f3 100644 --- a/podstuff/module.modulemap +++ b/CocoaPods/ios.modulemap @@ -1,26 +1,21 @@ framework module SQLite { umbrella header "SQLite.h" - // Load the SDK header alongside SQLite.swift. Alternate headers: - // - // header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sqlite3.h" - // header "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sqlite3.h" - // header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h" module arm { header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h" requires arm } - + module arm64 { header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h" requires arm64 } - + module x86 { header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sqlite3.h" requires x86 } - + link "sqlite3" export * diff --git a/CocoaPods/osx.modulemap b/CocoaPods/osx.modulemap new file mode 100644 index 00000000..80628c7b --- /dev/null +++ b/CocoaPods/osx.modulemap @@ -0,0 +1,10 @@ +framework module SQLite { + umbrella header "SQLite.h" + + header "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sqlite3.h" + + link "sqlite3" + + export * + module * { export * } +} diff --git a/CocoaPods/tvos.modulemap b/CocoaPods/tvos.modulemap new file mode 100644 index 00000000..480ff6f3 --- /dev/null +++ b/CocoaPods/tvos.modulemap @@ -0,0 +1,18 @@ +framework module SQLite { + umbrella header "SQLite.h" + + module arm64 { + header "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sqlite3.h" + requires arm64 + } + + module x86 { + header "/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sqlite3.h" + requires x86 + } + + link "sqlite3" + + export * + module * { export * } +} diff --git a/SQLite.swift.podspec b/SQLite.swift.podspec index b8160396..a4a79ba4 100644 --- a/SQLite.swift.podspec +++ b/SQLite.swift.podspec @@ -24,7 +24,10 @@ Pod::Spec.new do |s| s.tvos.deployment_target = "9.0" s.osx.deployment_target = "10.9" - s.module_map = "podstuff/module.modulemap" + s.ios.module_map = "CocoaPods/ios.modulemap" + s.tvos.module_map = "CocoaPods/tvos.modulemap" + s.osx.module_map = "CocoaPods/osx.modulemap" + s.libraries = 'sqlite3' s.source_files = 'SQLite/**/*.{c,h,m,swift}' s.private_header_files = 'SQLite/Core/fts3_tokenizer.h' diff --git a/SQLite.xcodeproj/project.pbxproj b/SQLite.xcodeproj/project.pbxproj index d73ebb51..4960525a 100644 --- a/SQLite.xcodeproj/project.pbxproj +++ b/SQLite.xcodeproj/project.pbxproj @@ -153,7 +153,7 @@ /* Begin PBXFileReference section */ 03A65E5A1C6BB0F50062603F /* SQLite.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SQLite.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 03A65E631C6BB0F60062603F /* SQLiteTests tvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SQLiteTests tvOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 03A65E961C6BB3210062603F /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.1.sdk/usr/lib/libsqlite3.tbd; sourceTree = DEVELOPER_DIR; }; + 03A65E961C6BB3210062603F /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/lib/libsqlite3.tbd; sourceTree = DEVELOPER_DIR; }; EE247AD31C3F04ED00AE3E12 /* SQLite.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SQLite.framework; sourceTree = BUILT_PRODUCTS_DIR; }; EE247AD61C3F04ED00AE3E12 /* SQLite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQLite.h; sourceTree = ""; }; EE247AD81C3F04ED00AE3E12 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };