Closed mark-kinoshita closed 2 days ago
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 aps-environment
got me looking at https://github.com/firebase/firebase-ios-sdk/blob/04f04917927da92f8f09e51df89328271def076c/FirebaseMessaging/Sources/FIRMessagingUtilities.m#L31-L36 and I noticed 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 main
now. Please re-open if you're still running into the issue.
@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 -FIRDebugEnabled
passed as a launch argument in Xcode?
@andrewheard it looks like I'm getting this error: 10.29.0 - [FirebaseSessions][I-SES000000] Found unknown OSName: "visionos" while converting
Not sure if its related to FCM
@andrewheard it looks like I'm getting this error: 10.29.0 - [FirebaseSessions][I-SES000000] Found unknown OSName: "visionos" while converting
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 #if TARGET_OS_ ...
checks are needed in Messaging. For example, handleIncomingLinkIfNeededFromMessage
looks suspicious.
@mark-kinoshita, just wanted to let you know that I added some possible fixes in #13184 (still just in main
) that you might be interested in trying out.
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 (10.29
-- around 2 weeks from now).
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
snippet```json Replace this line with the contents of your Package.resolved. ```
If using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippet```yml Replace this line with the contents of your Podfile.lock! ```