Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Messaging] Fix APS Environment entitlement key on visionOS #13176

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading