-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Firebase Cloud Messaging not working with visionOS #13173
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Thank you for the detailed issue report, @mark-kinoshita! Your mention of firebase-ios-sdk/FirebaseMessaging/Sources/FIRMessagingUtilities.m Lines 31 to 36 in 04f0491
TARGET_OS_VISION wasn't listed (TARGET_OS_IOS used to cover visionOS too). I don't have a Vision Pro to test this on myself but I think #13176 will fix the issue. Once this gets merged to main , would you be willing to try it out by temporarily setting your firebase-ios-sdk Swift Package Dependency rule to the main branch?
|
@andrewheard appreciate you looking into this so quickly! I can definitely do that👍🏽 |
Thanks, @mark-kinoshita! This is merged into |
@andrewheard switched to main, unfortunately I'm still seeing the same 'No aps-environment set.' error |
Sorry to hear that @mark-kinoshita, any chance you get any useful debugging information with |
@andrewheard it looks like I'm getting this error: Not sure if its related to FCM |
@mark-kinoshita Unfortunately I think this is unrelated to FCM (but can be safely ignored). |
@andrewheard If you haven't already, it looks like a full review of all the |
@mark-kinoshita, just wanted to let you know that I added some possible fixes in #13184 (still just in A couple other random things to double check would be that your entitlements are added if you have a separate target for the visionOS version of your app and that the provisioning profile set in Signing & Capabilities is reasonable for visionOS. |
@andrewheard just switched back to main and its working! I really appreciate your help on this and how quickly this was resolved 👏🏽 |
Thanks for letting me know, @mark-kinoshita! Glad to hear it worked. These fixes will go out in the next Firebase release ( |
Description
I have configured remote notifications for my cross-platform SwiftUI app, everything functions correctly and I'm receiving notifications on iOS devices but receive apns errors when launching on visionOS.
ERROR:
10.28.0 - [FirebaseMessaging][I-FCM023014] No aps-environment set. If testing on a device APNS is not correctly configured. Please recheck your provisioning profiles. If testing on a simulator this is fine since APNS doesn't work on the simulator.
I do successfully received the device token from fcm. These errors do not occur on iOS. I have also tested this on a clean project and had the same results.
Reproducing the issue
Using standing setup for a SwiftUI app will produce the errors when targeting visionOS
`import SwiftUI
import FirebaseCore
import FirebaseMessaging
class AppDelegate: NSObject, UIApplicationDelegate, MessagingDelegate, UNUserNotificationCenterDelegate {
}
@main
struct NotificationsApp: App {
}`
Firebase SDK Version
10.28.0
Xcode Version
15.2
Installation Method
Swift Package Manager
Firebase Product(s)
Messaging
Targeted Platforms
iOS, visionOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippetReplace this line with the contents of your Package.resolved.
If using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippetReplace this line with the contents of your Podfile.lock!
The text was updated successfully, but these errors were encountered: