Skip to content

Commit f6e3d1c

Browse files
committed
Add xcframework support
1 parent 315e45d commit f6e3d1c

15 files changed

+173
-441
lines changed

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
[submodule "rocksdb"]
2-
path = rocksdb
3-
url = https://github.com/facebook/rocksdb.git
4-
[submodule "lz4"]
5-
path = lz4
6-
url = [email protected]:lz4/lz4.git
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1520"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "ObjectiveRocks"
18+
BuildableName = "ObjectiveRocks"
19+
BlueprintName = "ObjectiveRocks"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "NO"
27+
buildForArchiving = "NO"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "ObjectiveRocksTests"
32+
BuildableName = "ObjectiveRocksTests"
33+
BlueprintName = "ObjectiveRocksTests"
34+
ReferencedContainer = "container:">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
</BuildActionEntries>
38+
</BuildAction>
39+
<TestAction
40+
buildConfiguration = "Debug"
41+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
42+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43+
shouldUseLaunchSchemeArgsEnv = "YES"
44+
shouldAutocreateTestPlan = "YES">
45+
<Testables>
46+
<TestableReference
47+
skipped = "NO">
48+
<BuildableReference
49+
BuildableIdentifier = "primary"
50+
BlueprintIdentifier = "ObjectiveRocksTests"
51+
BuildableName = "ObjectiveRocksTests"
52+
BlueprintName = "ObjectiveRocksTests"
53+
ReferencedContainer = "container:">
54+
</BuildableReference>
55+
</TestableReference>
56+
</Testables>
57+
</TestAction>
58+
<LaunchAction
59+
buildConfiguration = "Debug"
60+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
61+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
62+
launchStyle = "0"
63+
useCustomWorkingDirectory = "NO"
64+
ignoresPersistentStateOnLaunch = "NO"
65+
debugDocumentVersioning = "YES"
66+
debugServiceExtension = "internal"
67+
allowLocationSimulation = "YES">
68+
</LaunchAction>
69+
<ProfileAction
70+
buildConfiguration = "Release"
71+
shouldUseLaunchSchemeArgsEnv = "YES"
72+
savedToolIdentifier = ""
73+
useCustomWorkingDirectory = "NO"
74+
debugDocumentVersioning = "YES">
75+
<MacroExpansion>
76+
<BuildableReference
77+
BuildableIdentifier = "primary"
78+
BlueprintIdentifier = "ObjectiveRocks"
79+
BuildableName = "ObjectiveRocks"
80+
BlueprintName = "ObjectiveRocks"
81+
ReferencedContainer = "container:">
82+
</BuildableReference>
83+
</MacroExpansion>
84+
</ProfileAction>
85+
<AnalyzeAction
86+
buildConfiguration = "Debug">
87+
</AnalyzeAction>
88+
<ArchiveAction
89+
buildConfiguration = "Release"
90+
revealArchiveInOrganizer = "YES">
91+
</ArchiveAction>
92+
</Scheme>

Code/RocksDBBackupEngine.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#import "RocksDBBackupInfo.h"
1212

1313
#include <rocksdb/db.h>
14-
#include <rocksdb/utilities/backupable_db.h>
14+
#include <rocksdb/utilities/backup_engine.h>
1515

1616
#pragma mark - Informal Protocols
1717

@@ -45,7 +45,7 @@ - (instancetype)initWithPath:(NSString *)path
4545
if (self) {
4646
_path = [path copy];
4747
rocksdb::Status status = rocksdb::BackupEngine::Open(rocksdb::Env::Default(),
48-
rocksdb::BackupableDBOptions(_path.UTF8String),
48+
rocksdb::BackupEngineOptions(_path.UTF8String),
4949
&_backupEngine);
5050
if (!status.ok()) {
5151
NSLog(@"Error opening database backup: %@", [RocksDBError errorWithRocksStatus:status]);

Code/RocksDBComparator.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ + (instancetype)comaparatorWithType:(RocksDBComparatorType)type
4242
return [[self alloc] initWithName:@"objectiverocks.string.compare.asc" andBlock:^int(NSData *key1, NSData *key2) {
4343
NSString *str1 = [[NSString alloc] initWithData:key1 encoding:NSUTF8StringEncoding];
4444
NSString *str2 = [[NSString alloc] initWithData:key2 encoding:NSUTF8StringEncoding];
45-
return [str1 compare:str2];
45+
return (int)[str1 compare:str2];
4646
}];
4747

4848
case RocksDBComparatorStringCompareDescending:
4949
return [[self alloc] initWithName:@"objectiverocks.string.compare.desc" andBlock:^int(NSData *key1, NSData *key2) {
5050
NSString *str1 = [[NSString alloc] initWithData:key1 encoding:NSUTF8StringEncoding];
5151
NSString *str2 = [[NSString alloc] initWithData:key2 encoding:NSUTF8StringEncoding];
52-
return -1 * [str1 compare:str2];
52+
return -1 * (int)[str1 compare:str2];
5353
}];
5454
}
5555
}

0 commit comments

Comments
 (0)