Skip to content

Commit a2376b9

Browse files
ryanwilsonpaulb777
authored andcommitted
Remove the FIR prefix from notification constants.
1 parent 503018a commit a2376b9

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

FirebaseInstallations/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
- [changed] Throw an exception if `FIROptions.projectID` is missing or
55
`FIROptions.APIKey` has incorrect format to catch critical configuration
66
issues earlier. (#4692)
7+
- [changed] Removed the `FIR` prefix from `FIRInstallationIDDidChange` and renamed
8+
`kFIRInstallationIDDidChangeNotificationAppNameKey` to `InstallationIDDidChangeAppNameKey`
9+
in Swift.
710

811
# v1.7.1 -- M81
912
- [changed] Additional `FIRInstallationsItem` validation to catch potential storage issues. (#6570)
@@ -38,4 +41,4 @@
3841
# v1.0.0 -- M62
3942

4043
- [added] The Firebase Installations Service is an infrastructure service for Firebase services that creates unique identifiers and authentication tokens for Firebase clients (called "Firebase Installations") enabling Firebase Targeting, i.e. interoperation between Firebase services.
41-
- [added] The Firebase Installations SDK introduces the Firebase Installations API. Developers that use API-restrictions for their API-Key may experience blocked requests (https://stackoverflow.com/questions/58495985/). This problem can be mitigated by following the instructions found [here](API_KEY_RESTRICTIONS.md).
44+
- [added] The Firebase Installations SDK introduces the Firebase Installations API. Developers that use API-restrictions for their API-Key may experience blocked requests (https://stackoverflow.com/questions/58495985/). This problem can be mitigated by following the instructions found [here](API_KEY_RESTRICTIONS.md).

FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallations.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
NS_ASSUME_NONNULL_BEGIN
2323

2424
/** A notification with this name is sent each time an installation is created or deleted. */
25-
FOUNDATION_EXPORT const NSNotificationName FIRInstallationIDDidChangeNotification;
25+
FOUNDATION_EXPORT const NSNotificationName FIRInstallationIDDidChangeNotification
26+
NS_SWIFT_NAME(InstallationIDDidChange);
2627
/** `userInfo` key for the `FirebaseApp.name` in `FIRInstallationIDDidChangeNotification`. */
27-
FOUNDATION_EXPORT NSString *const kFIRInstallationIDDidChangeNotificationAppNameKey;
28+
FOUNDATION_EXPORT NSString *const kFIRInstallationIDDidChangeNotificationAppNameKey
29+
NS_SWIFT_NAME(InstallationIDDidChangeAppNameKey);
2830

2931
/**
3032
* An installation ID handler block.

FirebaseMessaging/Apps/Sample/Sample/SceneDelegate.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, MessagingDelegate {
5757

5858
// Subscribe to fid changes
5959
NotificationCenter.default
60-
.publisher(for: Notification.Name.FIRInstallationIDDidChange)
61-
.map { _ in }
60+
.publisher(for: Notification.Name.InstallationIDDidChange)
6261
.receive(on: RunLoop.main)
63-
.sink(receiveValue: {
62+
.sink(receiveValue: { _ in
6463
Installations.installations().installationID(completion: { fid, error in
6564
if let error = error as NSError? {
6665
print("Failed to get FID: ", error)

0 commit comments

Comments
 (0)