Skip to content

Commit

Permalink
[Messaging] Fix APS Environment entitlement key on visionOS (#13176)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheard committed Jun 24, 2024
1 parent 04f0491 commit 5ef8265
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions FirebaseMessaging/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Unreleased
- [fixed] Fixed the APS Environment key on visionOS. (#13173)

# 10.29.0
- [fixed] Renamed "initWithFileName" internal method that was causing submission issues for some
users. (#13134).
Expand Down
12 changes: 8 additions & 4 deletions FirebaseMessaging/Sources/FIRMessagingUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@

static NSString *const kFIRMessagingWatchKitExtensionPoint = @"com.apple.watchkit";

#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
static NSString *const kEntitlementsAPSEnvironmentKey = @"Entitlements.aps-environment";
#else
#if TARGET_OS_OSX
// macOS uses a different entitlement key than the rest of Apple's platforms:
// https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_aps-environment
static NSString *const kEntitlementsAPSEnvironmentKey =
@"Entitlements.com.apple.developer.aps-environment";
#endif
#else
// Entitlement key for all non-macOS platforms:
// https://developer.apple.com/documentation/bundleresources/entitlements/aps-environment
static NSString *const kEntitlementsAPSEnvironmentKey = @"Entitlements.aps-environment";
#endif // TARGET_OS_OSX
static NSString *const kAPSEnvironmentDevelopmentValue = @"development";

#pragma mark - URL Helpers
Expand Down

0 comments on commit 5ef8265

Please sign in to comment.