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
396 changes: 378 additions & 18 deletions CouchbaseLite.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "40CC4C4D3033CE540002386D"
BuildableName = "CBL_Binary_Tests.app"
BlueprintName = "CBL_ObjC_Binary_Tests_iOS_App"
BlueprintName = "CBL_Binary_Tests_iOS_App"
ReferencedContainer = "container:CouchbaseLite.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2640"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "NO"
buildArchitectures = "Automatic">
</BuildAction>
<TestAction
buildConfiguration = "Debug_EE"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "40E92C11303E4282005C088C"
BuildableName = "CouchbaseLiteSwiftBinaryTests.xctest"
BlueprintName = "CBL_EE_Swift_Binary_Tests"
ReferencedContainer = "container:CouchbaseLite.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug_EE"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
queueDebuggingEnableBacktraceRecording = "Yes">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release_EE"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug_EE">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release_EE"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2640"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "NO"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "40CC4C4D3033CE540002386D"
BuildableName = "CBL_Binary_Tests.app"
BlueprintName = "CBL_Binary_Tests_iOS_App"
ReferencedContainer = "container:CouchbaseLite.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "40E92C11303E4282005C088C"
BuildableName = "CouchbaseLiteSwiftBinaryTests.xctest"
BlueprintName = "CBL_EE_Swift_Binary_Tests"
ReferencedContainer = "container:CouchbaseLite.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug_EE"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "40E92C11303E4282005C088C"
BuildableName = "CouchbaseLiteSwiftBinaryTests.xctest"
BlueprintName = "CBL_EE_Swift_Binary_Tests"
ReferencedContainer = "container:CouchbaseLite.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug_EE"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
queueDebuggingEnableBacktraceRecording = "Yes">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release_EE"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug_EE">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release_EE"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "40CC4C4D3033CE540002386D"
BuildableName = "CBL_Binary_Tests.app"
BlueprintName = "CBL_ObjC_Binary_Tests_iOS_App"
BlueprintName = "CBL_Binary_Tests_iOS_App"
ReferencedContainer = "container:CouchbaseLite.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2640"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "NO"
buildArchitectures = "Automatic">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "40E92C76303E45A3005C088C"
BuildableName = "CouchbaseLiteSwiftBinaryTests.xctest"
BlueprintName = "CBL_Swift_Binary_Tests"
ReferencedContainer = "container:CouchbaseLite.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
queueDebuggingEnableBacktraceRecording = "Yes">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2640"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "NO"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "40CC4C4D3033CE540002386D"
BuildableName = "CBL_Binary_Tests.app"
BlueprintName = "CBL_Binary_Tests_iOS_App"
ReferencedContainer = "container:CouchbaseLite.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "40E92C76303E45A3005C088C"
BuildableName = "CouchbaseLiteSwiftBinaryTests.xctest"
BlueprintName = "CBL_Swift_Binary_Tests"
ReferencedContainer = "container:CouchbaseLite.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "40E92C76303E45A3005C088C"
BuildableName = "CouchbaseLiteSwiftBinaryTests.xctest"
BlueprintName = "CBL_Swift_Binary_Tests"
ReferencedContainer = "container:CouchbaseLite.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
queueDebuggingEnableBacktraceRecording = "Yes">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
19 changes: 4 additions & 15 deletions Objective-C/Tests/URLEndpointListenerTest+Main.m
Original file line number Diff line number Diff line change
Expand Up @@ -1484,27 +1484,16 @@ - (void) testCleanUpAnonymousIdentities {

// The identity created above must be found by the discovered name; this guards
// against the zero-count checks below passing vacuously with a wrong name:
Assert([self anonymousIdentityCount] > 0);
Assert([self keychainItemCount: (id)kSecClassIdentity commonName: commonName] > 0);

[self cleanUpAnonymousIdentities];

// No anonymous identities nor certificates should be left in the keychain:
AssertEqual([self anonymousIdentityCount], 0);
AssertEqual([self anonymousCertificateCount], 0);
AssertEqual([self keychainItemCount: (id)kSecClassIdentity commonName: commonName], 0);
AssertEqual([self keychainItemCount: (id)kSecClassCertificate commonName: commonName], 0);
}

- (NSUInteger) anonymousIdentityCount {
return [self keychainItemCount: (id)kSecClassIdentity];
}

- (NSUInteger) anonymousCertificateCount {
return [self keychainItemCount: (id)kSecClassCertificate];
}

- (NSUInteger) keychainItemCount: (id)itemClass {
NSString* commonName = [self anonymousIdentityCommonName];
AssertNotNil(commonName);

- (NSUInteger) keychainItemCount: (id)itemClass commonName: (NSString*)commonName {
NSDictionary* query = @{(id)kSecClass: itemClass,
(id)kSecMatchLimit: (id)kSecMatchLimitAll,
(id)kSecReturnRef: @YES};
Expand Down
1 change: 0 additions & 1 deletion Swift/ModuleMap/CouchbaseLiteSwift-EE.private.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
header "CBLTLSIdentity.h"
header "CBLTLSIdentity+Swift.h"
header "CBLURLEndpointListener.h"
header "CBLURLEndpointListener+Swift.h"
header "CBLURLEndpointListenerConfiguration.h"
header "CBLVectorEncoding.h"
header "CBLVectorIndexConfiguration.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ framework module CouchbaseLiteSwift_Private {
header "CBLTLSIdentity.h"
header "CBLTLSIdentity+Swift.h"
header "CBLURLEndpointListener.h"
header "CBLURLEndpointListener+Swift.h"
header "CBLURLEndpointListenerConfiguration.h"
header "CBLVectorEncoding.h"
header "CBLVectorIndexConfiguration.h"
Expand Down
17 changes: 0 additions & 17 deletions Swift/Query.swift
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,6 @@ public class Query {
}
}

/// Encoded JSON representation of the query.
/// Can be used later to reconstruct an identical query.
var json : Data {
prepareQuery()
return queryImpl!.json
}

/// Initialize a Query given a JSON-encoded representation.
/// - Parameters:
/// - database: The database to query.
/// - json: JSON data encoding the query. This can be obtained from a Query object's
/// JSONRepresentation property.
init(database: Database, JSONRepresentation json: Data) {
self.database = database
queryImpl = CBLQuery(database: database.impl, json: json)
}

/// Creates a query, given the query string, as from the expression property.
/// - Parameters:
/// - database: The database to query.
Expand Down
2 changes: 1 addition & 1 deletion Swift/Tests/CBLTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import XCTest
import Foundation
@testable import CouchbaseLiteSwift
import CouchbaseLiteSwift

extension String {
func toJSONObj() -> Any {
Expand Down
3 changes: 0 additions & 3 deletions Swift/Tests/CBLTestHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
//

#import <Foundation/Foundation.h>
#import <stdatomic.h>

extern atomic_int gC4ExpectExceptions;

@interface CBLTestHelper : NSObject

Expand Down
Loading
Loading