Skip to content

Commit 31687c1

Browse files
committed
Build fixes for changes in 1.0rc10
1 parent 95aa18e commit 31687c1

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
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 try noteBox.isEmpty() && authorBox.isEmpty() else { return }
3737

3838
try Services.instance.replaceWithDemoData()
3939
}

Example/NotesExample-iOS/MasterViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ extension MasterViewController {
5050

5151
if indexPath.section == 0 {
5252
if indexPath.row == 0 {
53-
cell.detailTextLabel?.text = "\(noteBox.count())"
53+
cell.detailTextLabel?.text = "\(try! noteBox.count())"
5454
} else if indexPath.row == 1 {
55-
cell.detailTextLabel?.text = "\(authorBox.count())"
55+
cell.detailTextLabel?.text = "\(try! authorBox.count())"
5656
}
5757
}
5858

Example/NotesExample-iOS/NoteEditingViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ extension NoteEditingViewController: UIPickerViewDelegate {
166166
let pickerItems: [String]
167167

168168
init(authorBox: Box<Author>) {
169-
self.authors = authorBox.all().sorted(by: { $0.name < $1.name })
169+
self.authors = try! authorBox.all().sorted(by: { $0.name < $1.name })
170170
self.pickerItems = authors
171171
.map { $0.name }
172172
.prepending("(None)")

Example/NotesExample-iOS/NotesOverviewViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class NotesOverviewViewController: UITableViewController {
2424
self.authorId = authorId
2525

2626
if let authorId = authorId {
27-
query = noteBox.query { Note.author == authorId }.build()
27+
query = try! noteBox.query { Note.author == authorId }.build()
2828
} else {
29-
query = noteBox.query().build()
29+
query = try! noteBox.query().build()
3030
}
3131
}
3232

Example/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ use_frameworks!
22

33
target 'NotesExample-iOS' do
44
platform :ios, :deployment_target => '11.0'
5-
pod 'ObjectBox', '1.0.0-rc.7'
5+
pod 'ObjectBox', '1.0.0-rc.10'
66
end
77

88
target 'NotesExample-macOS' do
99
platform :osx, :deployment_target => '10.10'
10-
pod 'ObjectBox', '1.0.0-rc.7'
10+
pod 'ObjectBox', '1.0.0-rc.10'
1111
end

Example/Shared/Author.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Author {
77
var id: EntityId<Author> // An `EntityId<Author>` is required by ObjectBox
88
var name: String
99
// objectbox: backlink = "author"
10-
var notes: ToMany<Note, Author>
10+
var notes: ToMany<Note>
1111

1212
// An initializer with no parameters is required by ObjectBox
1313
required init() {

0 commit comments

Comments
 (0)