Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion WCDB.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ Pod::Spec.new do |wcdb|
"VALID_ARCHS[sdk=watchos*]" => "arm64_32 arm64 86_64",
"OTHER_CFLAGS" => "-fvisibility-inlines-hidden",
"OTHER_CPLUSPLUSFLAGS" => "-fvisibility-inlines-hidden",
"SWIFT_ENABLE_EXPLICIT_MODULES" => 'NO',
"OTHER_SWIFT_FLAGS" => "-no-verify-emitted-module-interface",
"SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "WCDB_SWIFT_BRIDGE_OBJC",
}
Expand Down
2 changes: 1 addition & 1 deletion WCDB.swift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ Pod::Spec.new do |wcdb|
"VALID_ARCHS[sdk=watchos*]" => "arm64_32 arm64 x86_64",
"OTHER_CFLAGS" => "-fvisibility-inlines-hidden",
"OTHER_CPLUSPLUSFLAGS" => "-fvisibility-inlines-hidden",
"SWIFT_ENABLE_EXPLICIT_MODULES" => 'NO',
"OTHER_SWIFT_FLAGS" => "-no-verify-emitted-module-interface",
"SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "WCDB_SWIFT_TARGET",
}
wcdb.swift_versions = '5'
wcdb.dependency 'WCDBOptimizedSQLCipher', '1.4.7'
Expand Down
8 changes: 6 additions & 2 deletions src/WCDB.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4785,6 +4785,7 @@
39B524DC2304F9A2001DF52D /* InnerHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InnerHandle.cpp; sourceTree = "<group>"; };
39C70CC52313E20E002D773C /* Assemble.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Assemble.cpp; sourceTree = "<group>"; };
39C70CC62313E20F002D773C /* Assemble.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Assemble.hpp; sourceTree = "<group>"; };
3C9A56E02EB44B9D00DA1C6E /* WCDBSwift.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = WCDBSwift.xcconfig; sourceTree = "<group>"; };
7500829229223463009C0F38 /* WCTBridgeMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WCTBridgeMacro.h; sourceTree = "<group>"; };
75067CBD293F8192005DA25B /* AutoAddColumnObject.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AutoAddColumnObject.mm; sourceTree = "<group>"; };
75067CBF293F819B005DA25B /* AutoAddColumnObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AutoAddColumnObject.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -7469,6 +7470,7 @@
234F0369227A9E3C00DD65A2 /* Info.plist */,
234F0370227A9E3D00DD65A2 /* WCDBWithoutCompression.xcconfig */,
0DACF8B22B2ADC7700CB0710 /* WCDB.xcconfig */,
3C9A56E02EB44B9D00DA1C6E /* WCDBSwift.xcconfig */,
234F036E227A9E3D00DD65A2 /* WCDB.modulemap */,
7521DA49291E9D9E009642EF /* WCDBCpp.modulemap */,
7521DA4A291E9D9E009642EF /* WCDBObjc.modulemap */,
Expand Down Expand Up @@ -12196,17 +12198,19 @@
};
7521DDDB291EA349009642EF /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 0DACF8B22B2ADC7700CB0710 /* WCDB.xcconfig */;
baseConfigurationReference = 3C9A56E02EB44B9D00DA1C6E /* WCDBSwift.xcconfig */;
buildSettings = {
MODULEMAP_FILE = "$(SRCROOT)/support/WCDBSwift.modulemap";
SWIFT_ENABLE_EXPLICIT_MODULES = YES;
};
name = Debug;
};
7521DDDC291EA349009642EF /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 0DACF8B22B2ADC7700CB0710 /* WCDB.xcconfig */;
baseConfigurationReference = 3C9A56E02EB44B9D00DA1C6E /* WCDBSwift.xcconfig */;
buildSettings = {
MODULEMAP_FILE = "$(SRCROOT)/support/WCDBSwift.modulemap";
SWIFT_ENABLE_EXPLICIT_MODULES = YES;
};
name = Release;
};
Expand Down
9 changes: 3 additions & 6 deletions src/support/WCDB.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ framework module WCDB {
header "WCTTableCoding.h"
export *
}
}

framework module WCDB_Private {
requires objc

module BridgeHeader {

explicit module Private {
requires objc
umbrella header "WCDBBridging.h"
export *
}
Expand Down
7 changes: 2 additions & 5 deletions src/support/WCDBSwift.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ framework module WCDBSwift {
module All {
export *
}
}

framework module WCDB_Private {
requires objc

module BridgeHeader {
explicit module Private {
requires objc
umbrella header "WCDBBridging.h"
export *
}
Expand Down
3 changes: 3 additions & 0 deletions src/support/WCDBSwift.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "WCDB.xcconfig"

SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) WCDB_SWIFT_TARGET
2 changes: 0 additions & 2 deletions src/support/WCDBWithoutCompression.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ MARKETING_VERSION = 1.1.0
// Preprocessing
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(WCDB_VERSION_DEFINITIONS) $(SQLITE_PREPROCESSOR_DEFINITIONS) ZLIB_CONST=1 SQLITE_WCDB=1

SWIFT_ENABLE_EXPLICIT_MODULES = NO;

OTHER_SWIFT_FLAGS = -no-verify-emitted-module-interface
6 changes: 6 additions & 0 deletions src/swift/bridge/ErrorBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

internal final class ErrorBridge {
static func getErrorFrom(cppError error: CPPError) -> WCDBError {
Expand Down
6 changes: 6 additions & 0 deletions src/swift/bridge/FTSBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

public enum TokenizerErrorCode {
case OK
Expand Down
6 changes: 6 additions & 0 deletions src/swift/bridge/ObjectBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

internal final class ValueWrap<T> {
var value: T
Expand Down
6 changes: 6 additions & 0 deletions src/swift/bridge/WCTBridgeProperty.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
#if WCDB_SWIFT_BRIDGE_OBJC

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

extension WCTBridgeProperty: PropertyOperable {

Expand Down
6 changes: 6 additions & 0 deletions src/swift/builtin/CodableType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

/*
* Builtin codable implementation
Expand Down
6 changes: 6 additions & 0 deletions src/swift/builtin/Master.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

public struct Master: TableCodable {
public static let builtinTableName: String = "sqlite_master"
Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/base/BaseType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

public typealias Tag = Int

Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/base/Database+WCTTableCoding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
#if WCDB_SWIFT_BRIDGE_OBJC

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

// WCTTable
public extension Database {
Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/base/Database.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

/// Thread-safe Database object
public class Database {
Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/base/Handle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

public final class Handle {
private let recyclableHandle: RecyclableCPPHandle
Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/base/HandleStatement+WCTTableCoding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
#if WCDB_SWIFT_BRIDGE_OBJC

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

extension PreparedStatement: StatementInterfaceForObjc {}

Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/base/PreparedStatement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif
public final class PreparedStatement {
internal let recyclableStmt: RecyclableCPPHandleStatement

Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/base/Table+WCTTableCoding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
#if WCDB_SWIFT_BRIDGE_OBJC

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

/// Convenient table interface
extension Table {
Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/base/Table.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

/// Convenient table interface
public final class Table<Object: Any>: @unchecked Sendable {
Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/binding/CheckExpressionConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

public final class CheckExpressionConfig: TableConfiguration {
private let constraints: [TableConstraint]
Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/binding/ColumnConstraintConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

public final class ColumnConstraintConfig<CodingTableKeyType: CodingTableKey>: TableConfiguration {
let codingKey: CodingTableKeyType
Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/binding/ForeignKeyConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

public final class ForeignKeyConfig<CodingTableKeyType: CodingTableKey>: TableConfiguration {
let codingKeys: [CodingTableKeyType]
Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/binding/IndexConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

public final class IndexConfig<CodingTableKeyType: CodingTableKey>: TableConfiguration {
private let indexes: [IndexedColumnConvertible]
Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/binding/MultiPrimaryConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

public final class MultiPrimaryConfig<CodingTableKeyType: CodingTableKey>: TableConfiguration {

Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/binding/MultiUniqueConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

public final class MultiUniqueConfig<CodingTableKeyType: CodingTableKey>: TableConfiguration {
private let indexes: [IndexedColumnConvertible]
Expand Down
6 changes: 6 additions & 0 deletions src/swift/core/binding/Property.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
*/

import Foundation
#if SWIFT_PACKAGE
import WCDB_Private
#elseif WCDB_SWIFT_TARGET
import WCDBSwift.Private
#else
import WCDB.Private
#endif

public protocol PropertyConvertible: ColumnConvertible, PropertyRedirectable {
func isSwiftProperty() -> Bool
Expand Down
Loading