Skip to content

Commit 1b56889

Browse files
remove instanceID from abtesting
1 parent 365e436 commit 1b56889

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

abtesting/ABTestingExample/ViewController.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
//
1616

1717
import Firebase
18-
import FirebaseInstanceID
1918
import UIKit
2019

2120
enum ColorScheme {
@@ -55,8 +54,8 @@ class ViewController: UIViewController, UITableViewDataSource {
5554

5655
#if DEBUG
5756
NotificationCenter.default.addObserver(self,
58-
selector: #selector(printInstanceIDToken),
59-
name: .InstanceIDTokenRefresh,
57+
selector: #selector(printInstallationsID),
58+
name: .InstallationIDDidChange,
6059
object: nil)
6160
#endif
6261
}
@@ -91,13 +90,13 @@ class ViewController: UIViewController, UITableViewDataSource {
9190
}
9291
}
9392

94-
@objc func printInstanceIDToken() {
93+
@objc func printInstallationsID() {
9594
#if DEBUG
96-
InstanceID.instanceID().instanceID { (result, error) in
95+
Installations.installations().installationID { (identifier, error) in
9796
if let error = error {
98-
print("Error fetching remote instance ID: \(error)")
99-
} else if let result = result {
100-
print("Remote instance ID token: \(result.token)")
97+
print("Error fetching installations ID: \(error)")
98+
} else if let identifier = identifier {
99+
print("Remote installations ID: \(identifier)")
101100
}
102101
}
103102
#endif

0 commit comments

Comments
 (0)