Skip to content

Commit 5426e76

Browse files
committed
Adapt to API changes.
1 parent d93d880 commit 5426e76

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Example/NotesExample-iOS/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
3333
let noteBox = Services.instance.noteBox
3434
let authorBox = Services.instance.authorBox
3535

36-
guard noteBox.isEmpty && authorBox.isEmpty else { return }
36+
guard noteBox.isEmpty() && authorBox.isEmpty() else { return }
3737

3838
try Services.instance.replaceWithDemoData()
3939
}

Example/NotesExample-iOS/NotesOverviewViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ class NotesOverviewViewController: UITableViewController {
1616
struct Filter {
1717
static var all: Filter { return Filter(authorId: nil) }
1818

19-
let authorId: Id<Author>?
19+
let authorId: EntityId<Author>?
2020
let query: Query<Note>
2121
var queryObserver: Observer?
2222

23-
init(authorId: Id<Author>?, noteBox: Box<Note> = Services.instance.noteBox) {
23+
init(authorId: EntityId<Author>?, noteBox: Box<Note> = Services.instance.noteBox) {
2424
self.authorId = authorId
2525

2626
if let authorId = authorId {
@@ -35,7 +35,7 @@ class NotesOverviewViewController: UITableViewController {
3535
}
3636
}
3737

38-
func filterBy(authorId: Id<Author>?) {
38+
func filterBy(authorId: EntityId<Author>?) {
3939
filter = Filter(authorId: authorId)
4040
}
4141

Example/Shared/Author.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ObjectBox
44

55
// objectbox:Entity
66
class Author {
7-
var id: Id<Author> // An `Id<Author>` is required by ObjectBox
7+
var id: EntityId<Author> // An `EntityId<Author>` is required by ObjectBox
88
var name: String
99
// objectbox: backlink = "author"
1010
var notes: ToMany<Note, Author>

Example/Shared/Note.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import ObjectBox
44

55
class Note: Entity {
6-
var id: Id<Note> = 0 // An `Id<Note>` is required by ObjectBox
6+
var id: EntityId<Note> = 0 // An `EntityIdNote>` is required by ObjectBox
77
var title: String = "" {
88
didSet {
99
modificationDate = Date()

0 commit comments

Comments
 (0)