Skip to content

Commit 79b14c0

Browse files
committed
Update iOS to rc1
1 parent 1dc7b46 commit 79b14c0

14 files changed

+30
-30
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
func addTeamMember(email: String) {
22
print("Adding member: \(email)")
33
activityIndicator.startAnimating()
4-
app.currentUser()!.functions.addTeamMember([AnyBSON(email)!], self.onTeamMemberOperationComplete)
4+
app.currentUser!.functions.addTeamMember([AnyBSON(email)!], self.onTeamMemberOperationComplete)
55
}

source/tutorial/generated/code/final/ManageTeamViewController.codeblock.fetch-team-members.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
func fetchTeamMembers() {
33
// Start loading indicator
44
activityIndicator.startAnimating()
5-
app.currentUser()!.functions.getMyTeamMembers([]) { [weak self](result, error) in
5+
app.currentUser!.functions.getMyTeamMembers([]) { [weak self](result, error) in
66
DispatchQueue.main.sync {
77
guard self != nil else {
88
// This can happen if the view is dismissed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
func removeTeamMember(email: String) {
22
print("Removing member: \(email)")
33
activityIndicator.startAnimating()
4-
app.currentUser()!.functions.removeTeamMember([AnyBSON(email)!], self.onTeamMemberOperationComplete)
4+
app.currentUser!.functions.removeTeamMember([AnyBSON(email)!], self.onTeamMemberOperationComplete)
55
}

source/tutorial/generated/code/final/ProjectsViewController.codeblock.did-select-row-at.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
2-
let user = app.currentUser()!
3-
let project = userData?.memberOf[indexPath.row] ?? Project(partition: "project=\(user.id!)", name: "My Project")
2+
let user = app.currentUser!
3+
let project = userData?.memberOf[indexPath.row] ?? Project(partition: "project=\(user.id)", name: "My Project")
44

55
Realm.asyncOpen(configuration: user.configuration(partitionValue: project.partition!)) { [weak self] (realm, error) in
66
guard error == nil else {

source/tutorial/generated/code/final/ProjectsViewController.codeblock.log-out-button-did-click.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
alertController.addAction(UIAlertAction(title: "Yes, Log Out", style: .destructive, handler: {
44
alert -> Void in
55
print("Logging out...");
6-
app.currentUser()?.logOut() { (error) in
6+
app.currentUser?.logOut() { (error) in
77
DispatchQueue.main.sync {
88
print("Logged out!");
99
self.navigationController?.popViewController(animated: true)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Returns true if these are the user's own tasks.
22
func isOwnTasks() -> Bool {
3-
return partitionValue == "project=\(app.currentUser()!.id!)"
3+
return partitionValue == "project=\(app.currentUser!.id)"
44
}

source/tutorial/generated/code/final/WelcomeViewController.codeblock.sign-in.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
print("Log in as user: \(email!)");
33
setLoading(true);
44

5-
app.login(credentials: Credentials(email: email!, password: password!)) { [weak self](maybeUser, error) in
5+
app.login(credentials: Credentials.emailPassword(email: email!, password: password!)) { [weak self](maybeUser, error) in
66
// Completion handlers are not necessarily called on the UI thread.
77
// This call to DispatchQueue.main.sync ensures that any changes to the UI,
88
// namely disabling the loading indicator and navigating to the next page,
@@ -25,7 +25,7 @@
2525
self!.setLoading(true);
2626

2727
// Get a configuration to open the synced realm.
28-
var configuration = user.configuration(partitionValue: "user=\(user.id!)")
28+
var configuration = user.configuration(partitionValue: "user=\(user.id)")
2929
// Only allow User objects in this partition.
3030
configuration.objectTypes = [User.self, Project.self]
3131
// Open the realm asynchronously so that it downloads the remote copy before

source/tutorial/generated/code/final/WelcomeViewController.codeblock.sign-up.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@objc func signUp() {
22
setLoading(true);
3-
app.emailPasswordAuth().registerUser(email: email!, password: password!, completion: { [weak self](error) in
3+
app.emailPasswordAuth.registerUser(email: email!, password: password!, completion: { [weak self](error) in
44
// Completion handlers are not necessarily called on the UI thread.
55
// This call to DispatchQueue.main.sync ensures that any changes to the UI,
66
// namely disabling the loading indicator and navigating to the next page,

tutorial/swift-ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ target 'Task Tracker' do
66
use_frameworks!
77

88
# Pods for Task Tracker
9-
pod 'RealmSwift', '=10.0.0-beta.5'
9+
pod 'RealmSwift', '=10.0.0-rc.1'
1010
end

tutorial/swift-ios/Podfile.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
PODS:
2-
- Realm (10.0.0-beta.5):
3-
- Realm/Headers (= 10.0.0-beta.5)
4-
- Realm/Headers (10.0.0-beta.5)
5-
- RealmSwift (10.0.0-beta.5):
6-
- Realm (= 10.0.0-beta.5)
2+
- Realm (10.0.0-rc.1):
3+
- Realm/Headers (= 10.0.0-rc.1)
4+
- Realm/Headers (10.0.0-rc.1)
5+
- RealmSwift (10.0.0-rc.1):
6+
- Realm (= 10.0.0-rc.1)
77

88
DEPENDENCIES:
9-
- RealmSwift (= 10.0.0-beta.5)
9+
- RealmSwift (= 10.0.0-rc.1)
1010

1111
SPEC REPOS:
1212
trunk:
1313
- Realm
1414
- RealmSwift
1515

1616
SPEC CHECKSUMS:
17-
Realm: e30d3a77421b1b64932ce5843ba7d08afad749fd
18-
RealmSwift: 80488a4f1388b2c5681066f0f26757989034edfb
17+
Realm: b8faac708a4b5a9e98667ccd58404fcf60b354b7
18+
RealmSwift: 7f3831445e6f03dfb9312c4befba0f91fe7ccf3d
1919

20-
PODFILE CHECKSUM: 3644fa6ee99421f58a8dbba6a48b678d22974695
20+
PODFILE CHECKSUM: 9a390857dbb3bd806640349003f4cd7938f914e4
2121

2222
COCOAPODS: 1.9.1

tutorial/swift-ios/Task Tracker/ManageTeamViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class ManageTeamViewController: UIViewController, UITableViewDelegate, UITableVi
7979
// Start loading indicator
8080
activityIndicator.startAnimating()
8181
// :hide-start:
82-
app.currentUser()!.functions.getMyTeamMembers([]) { [weak self](result, error) in
82+
app.currentUser!.functions.getMyTeamMembers([]) { [weak self](result, error) in
8383
DispatchQueue.main.sync {
8484
guard self != nil else {
8585
// This can happen if the view is dismissed
@@ -117,7 +117,7 @@ class ManageTeamViewController: UIViewController, UITableViewDelegate, UITableVi
117117
print("Adding member: \(email)")
118118
activityIndicator.startAnimating()
119119
// :hide-start:
120-
app.currentUser()!.functions.addTeamMember([AnyBSON(email)!], self.onTeamMemberOperationComplete)
120+
app.currentUser!.functions.addTeamMember([AnyBSON(email)!], self.onTeamMemberOperationComplete)
121121
// :replace-with:
122122
// // TODO: use the app's current user's functions object to call the addTeamMember function
123123
// // on the backend with the given email converted to AnyBSON. Use `self.onTeamMemberOperationComplete`
@@ -131,7 +131,7 @@ class ManageTeamViewController: UIViewController, UITableViewDelegate, UITableVi
131131
print("Removing member: \(email)")
132132
activityIndicator.startAnimating()
133133
// :hide-start:
134-
app.currentUser()!.functions.removeTeamMember([AnyBSON(email)!], self.onTeamMemberOperationComplete)
134+
app.currentUser!.functions.removeTeamMember([AnyBSON(email)!], self.onTeamMemberOperationComplete)
135135
// :replace-with:
136136
// // TODO: use the app's current user's functions object to call the removeTeamMember function
137137
// // on the backend with the given email converted to AnyBSON. Use `self.onTeamMemberOperationComplete`

tutorial/swift-ios/Task Tracker/ProjectsViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class ProjectsViewController: UIViewController, UITableViewDelegate, UITableView
7272
alert -> Void in
7373
print("Logging out...");
7474
// :hide-start:
75-
app.currentUser()?.logOut() { (error) in
75+
app.currentUser?.logOut() { (error) in
7676
DispatchQueue.main.sync {
7777
print("Logged out!");
7878
self.navigationController?.popViewController(animated: true)
@@ -127,8 +127,8 @@ class ProjectsViewController: UIViewController, UITableViewDelegate, UITableView
127127
// :code-block-start: did-select-row-at
128128
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
129129
// :hide-start:
130-
let user = app.currentUser()!
131-
let project = userData?.memberOf[indexPath.row] ?? Project(partition: "project=\(user.id!)", name: "My Project")
130+
let user = app.currentUser!
131+
let project = userData?.memberOf[indexPath.row] ?? Project(partition: "project=\(user.id)", name: "My Project")
132132

133133
Realm.asyncOpen(configuration: user.configuration(partitionValue: project.partition!)) { [weak self] (realm, error) in
134134
guard error == nil else {

tutorial/swift-ios/Task Tracker/TasksViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ class TasksViewController: UIViewController, UITableViewDelegate, UITableViewDat
253253
// Returns true if these are the user's own tasks.
254254
func isOwnTasks() -> Bool {
255255
// :hide-start:
256-
return partitionValue == "project=\(app.currentUser()!.id!)"
256+
return partitionValue == "project=\(app.currentUser!.id)"
257257
// :replace-with:
258258
// // TODO: Check if the partition value matches the user's project's partition value,
259259
// // which should look like "project=\(app.currentUser()!.id!)"

tutorial/swift-ios/Task Tracker/WelcomeViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class WelcomeViewController: UIViewController {
110110
@objc func signUp() {
111111
// :hide-start:
112112
setLoading(true);
113-
app.emailPasswordAuth().registerUser(email: email!, password: password!, completion: { [weak self](error) in
113+
app.emailPasswordAuth.registerUser(email: email!, password: password!, completion: { [weak self](error) in
114114
// Completion handlers are not necessarily called on the UI thread.
115115
// This call to DispatchQueue.main.sync ensures that any changes to the UI,
116116
// namely disabling the loading indicator and navigating to the next page,
@@ -142,7 +142,7 @@ class WelcomeViewController: UIViewController {
142142
print("Log in as user: \(email!)");
143143
setLoading(true);
144144

145-
app.login(credentials: Credentials(email: email!, password: password!)) { [weak self](maybeUser, error) in
145+
app.login(credentials: Credentials.emailPassword(email: email!, password: password!)) { [weak self](maybeUser, error) in
146146
// Completion handlers are not necessarily called on the UI thread.
147147
// This call to DispatchQueue.main.sync ensures that any changes to the UI,
148148
// namely disabling the loading indicator and navigating to the next page,
@@ -165,7 +165,7 @@ class WelcomeViewController: UIViewController {
165165
self!.setLoading(true);
166166

167167
// Get a configuration to open the synced realm.
168-
var configuration = user.configuration(partitionValue: "user=\(user.id!)")
168+
var configuration = user.configuration(partitionValue: "user=\(user.id)")
169169
// Only allow User objects in this partition.
170170
configuration.objectTypes = [User.self, Project.self]
171171
// Open the realm asynchronously so that it downloads the remote copy before

0 commit comments

Comments
 (0)