From 82a5f8ce62013c73775a5f0aaa78c792b60efbd7 Mon Sep 17 00:00:00 2001 From: Andrew Crookston Date: Wed, 23 Mar 2016 16:36:59 -0700 Subject: [PATCH 1/3] Adds watchOS support --- CocoaPods/watchos.modulemap | 18 ++++++ SQLite.swift.podspec | 2 + SQLite.xcodeproj/project.pbxproj | 104 +++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 CocoaPods/watchos.modulemap diff --git a/CocoaPods/watchos.modulemap b/CocoaPods/watchos.modulemap new file mode 100644 index 000000000..596604481 --- /dev/null +++ b/CocoaPods/watchos.modulemap @@ -0,0 +1,18 @@ +framework module SQLite { + umbrella header "SQLite.h" + + module arm64 { + header "/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sqlite3.h" + requires arm64 + } + + module x86 { + header "/Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sqlite3.h" + requires x86 + } + + link "sqlite3" + + export * + module * { export * } +} diff --git a/SQLite.swift.podspec b/SQLite.swift.podspec index a4a79ba4d..a7dc8f6ef 100644 --- a/SQLite.swift.podspec +++ b/SQLite.swift.podspec @@ -23,10 +23,12 @@ Pod::Spec.new do |s| s.ios.deployment_target = "8.0" s.tvos.deployment_target = "9.0" s.osx.deployment_target = "10.9" + s.watchos.deployment_target = "2.0" s.ios.module_map = "CocoaPods/ios.modulemap" s.tvos.module_map = "CocoaPods/tvos.modulemap" s.osx.module_map = "CocoaPods/osx.modulemap" + s.watchos.module_map = "CocoaPods/watchos.modulemap" s.libraries = 'sqlite3' s.source_files = 'SQLite/**/*.{c,h,m,swift}' diff --git a/SQLite.xcodeproj/project.pbxproj b/SQLite.xcodeproj/project.pbxproj index 4960525af..bc23874a2 100644 --- a/SQLite.xcodeproj/project.pbxproj +++ b/SQLite.xcodeproj/project.pbxproj @@ -154,6 +154,7 @@ 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/AppleTVOS.sdk/usr/lib/libsqlite3.tbd; sourceTree = DEVELOPER_DIR; }; + A121AC451CA35C79005A31D1 /* SQLite.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SQLite.framework; sourceTree = BUILT_PRODUCTS_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 = ""; }; @@ -226,6 +227,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A121AC411CA35C79005A31D1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; EE247ACF1C3F04ED00AE3E12 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -280,6 +288,7 @@ EE247B451C3F3ED000AE3E12 /* SQLiteTests Mac.xctest */, 03A65E5A1C6BB0F50062603F /* SQLite.framework */, 03A65E631C6BB0F60062603F /* SQLiteTests tvOS.xctest */, + A121AC451CA35C79005A31D1 /* SQLite.framework */, ); name = Products; sourceTree = ""; @@ -409,6 +418,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A121AC421CA35C79005A31D1 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; EE247AD01C3F04ED00AE3E12 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -470,6 +486,24 @@ productReference = 03A65E631C6BB0F60062603F /* SQLiteTests tvOS.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + A121AC441CA35C79005A31D1 /* SQLite watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = A121AC4C1CA35C79005A31D1 /* Build configuration list for PBXNativeTarget "SQLite watchOS" */; + buildPhases = ( + A121AC401CA35C79005A31D1 /* Sources */, + A121AC411CA35C79005A31D1 /* Frameworks */, + A121AC421CA35C79005A31D1 /* Headers */, + A121AC431CA35C79005A31D1 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "SQLite watchOS"; + productName = "SQLite watchOS"; + productReference = A121AC451CA35C79005A31D1 /* SQLite.framework */; + productType = "com.apple.product-type.framework"; + }; EE247AD21C3F04ED00AE3E12 /* SQLite iOS */ = { isa = PBXNativeTarget; buildConfigurationList = EE247AE71C3F04ED00AE3E12 /* Build configuration list for PBXNativeTarget "SQLite iOS" */; @@ -557,6 +591,9 @@ 03A65E621C6BB0F60062603F = { CreatedOnToolsVersion = 7.2; }; + A121AC441CA35C79005A31D1 = { + CreatedOnToolsVersion = 7.3; + }; EE247AD21C3F04ED00AE3E12 = { CreatedOnToolsVersion = 7.2; }; @@ -589,6 +626,7 @@ EE247B441C3F3ED000AE3E12 /* SQLiteTests Mac */, 03A65E591C6BB0F50062603F /* SQLite tvOS */, 03A65E621C6BB0F60062603F /* SQLiteTests tvOS */, + A121AC441CA35C79005A31D1 /* SQLite watchOS */, ); }; /* End PBXProject section */ @@ -608,6 +646,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A121AC431CA35C79005A31D1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; EE247AD11C3F04ED00AE3E12 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -686,6 +731,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A121AC401CA35C79005A31D1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; EE247ACE1C3F04ED00AE3E12 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -861,6 +913,48 @@ }; name = Release; }; + A121AC4A1CA35C79005A31D1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ANALYZER_NONNULL = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = SQLite/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLite; + PRODUCT_NAME = SQLite; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.2; + }; + name = Debug; + }; + A121AC4B1CA35C79005A31D1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ANALYZER_NONNULL = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = SQLite/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLite; + PRODUCT_NAME = SQLite; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.2; + }; + name = Release; + }; EE247AE51C3F04ED00AE3E12 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1099,6 +1193,7 @@ 03A65E6C1C6BB0F60062603F /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 03A65E701C6BB0F60062603F /* Build configuration list for PBXNativeTarget "SQLiteTests tvOS" */ = { isa = XCConfigurationList; @@ -1107,6 +1202,15 @@ 03A65E6E1C6BB0F60062603F /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A121AC4C1CA35C79005A31D1 /* Build configuration list for PBXNativeTarget "SQLite watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A121AC4A1CA35C79005A31D1 /* Debug */, + A121AC4B1CA35C79005A31D1 /* Release */, + ); + defaultConfigurationIsVisible = 0; }; EE247ACD1C3F04ED00AE3E12 /* Build configuration list for PBXProject "SQLite" */ = { isa = XCConfigurationList; From 4243bc42d4aec145607d1b9af275883382681ab9 Mon Sep 17 00:00:00 2001 From: Andrew Crookston Date: Thu, 24 Mar 2016 16:12:38 -0700 Subject: [PATCH 2/3] Use armv7k architecture, not arm64, for the WatchOS SDK --- CocoaPods/watchos.modulemap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CocoaPods/watchos.modulemap b/CocoaPods/watchos.modulemap index 596604481..7de537676 100644 --- a/CocoaPods/watchos.modulemap +++ b/CocoaPods/watchos.modulemap @@ -1,7 +1,7 @@ framework module SQLite { umbrella header "SQLite.h" - module arm64 { + module armv7k { header "/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sqlite3.h" requires arm64 } From 5d09ab210525f6f21b37eaf7e5263bb3f9779ddc Mon Sep 17 00:00:00 2001 From: Andrew Crookston Date: Thu, 24 Mar 2016 16:21:47 -0700 Subject: [PATCH 3/3] Changes a missed arm64 reference to armv7k from previous commit --- CocoaPods/watchos.modulemap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CocoaPods/watchos.modulemap b/CocoaPods/watchos.modulemap index 7de537676..ff9080ab7 100644 --- a/CocoaPods/watchos.modulemap +++ b/CocoaPods/watchos.modulemap @@ -3,7 +3,7 @@ framework module SQLite { module armv7k { header "/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sqlite3.h" - requires arm64 + requires armv7k } module x86 {