Skip to content

Commit

Permalink
ObjectBox Swift database 1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
greenrobot committed Jan 30, 2023
1 parent ec093e2 commit 148d8dd
Show file tree
Hide file tree
Showing 17 changed files with 3,988 additions and 280 deletions.
10 changes: 5 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// swift-tools-version:5.3
// swift-tools-version:5.7

import PackageDescription

let package = Package(
name: "ObjectBox",
platforms: [
Expand All @@ -15,8 +15,8 @@ let package = Package(
targets: [
.binaryTarget(
name: "ObjectBox",
url: "https://github.com/objectbox/objectbox-swift/releases/download/v1.7.0/ObjectBox-xcframework-1.7.0.zip",
checksum: "fb842c0ccd86a81b0640bc2dc1eee39d36528fcfc8e0af51396a45e4af7db004"
url: "https://github.com/objectbox/objectbox-swift/releases/download/v1.8.1/ObjectBox-xcframework-1.8.1.zip",
checksum: "d4f6d9caed7ae2808b15b81b769ad48e47c78d8abb882ff6fa8938cda7cf864c"
)
]
)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Here's a list of ObjectBox releases, and the Swift versions they were compiled w

| ObjectBox version(s) | Swift version |
|:--------------------:|:-------------:|
| 1.8.1 | 5.7.2 |
| 1.8.0 | 5.7.1 |
| 1.7.0 | 5.5 |
| 1.6.0 | 5.4 |
Expand Down
2 changes: 1 addition & 1 deletion Source/external/objectbox-swift-generator
4 changes: 2 additions & 2 deletions Source/fetch_dependencies.command
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ if [ -d "$code_dir" ] && [ "$staging_repo" != "true" ]; then # Do we have an exi
popd
else # Download static public release and unzip into $dest
if [ ! -d "${dest_dir}" ] || [ ! -e "${dest_dir}/libObjectBoxCore-iOS.a" ]; then
version=1.8.0
c_version=0.18.0
version=1.8.1
c_version=0.18.1
archive_path="${my_dir}/external/objectbox-static.zip"
if [ "$staging_repo" == "true" ]; then
release_url_path="https://github.com/objectbox/objectbox-swift-spec-staging/releases/download/v1.x"
Expand Down
2 changes: 1 addition & 1 deletion Source/ios-framework/CommonSource/Box.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright © 2018-2020 ObjectBox Ltd. All rights reserved.
// Copyright © 2018-2023 ObjectBox Ltd. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
8 changes: 5 additions & 3 deletions Source/ios-framework/CommonSource/Store.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright © 2019-2022 ObjectBox Ltd. All rights reserved.
// Copyright © 2019-2023 ObjectBox Ltd. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,7 +43,7 @@ public class Store: CustomDebugStringConvertible {
internal(set) public var directoryPath: String

/// Returns the version of ObjectBox Swift.
public static var version = "1.8.0"
public static var version = "1.8.1"

/// Returns the versions of ObjectBox Swift, the ObjectBox lib, and ObjectBox core.
public static var versionAll: String {
Expand Down Expand Up @@ -191,7 +191,9 @@ public class Store: CustomDebugStringConvertible {
public func closeAndDeleteAllFiles() throws {
self.close()
obx_remove_db_files(directoryPath)
try FileManager.default.removeItem(at: URL(fileURLWithPath: directoryPath))
if FileManager.default.fileExists(atPath: directoryPath) {
try FileManager.default.removeItem(atPath: directoryPath)
}
}

internal let setUpMutexIdentifier: Bool = {
Expand Down
Loading

0 comments on commit 148d8dd

Please sign in to comment.