New Watch App project configuration from Xcode14 does not receive push notifications using Firebase Cloud Messaging #10147
Labels
api: messaging
watchOS
Xcode 14 - iOS 16
Issues and PRs related to Xcode 14, iOS 16, and associated OSes
Milestone
Description
Xcode14 also eliminates the WatchKit Extension and allows everything to be integrated into the WatchKit App, as shown in the following Apple document.
https://developer.apple.com/documentation/watchkit/wkapplication
This will also affect the processing of bundle identifiers, and there will be cases where the bundle identifier that can be retrieved programmatically will no longer have the watchkitextension.
Example: [[NSBundle mainBundle] bundleIdentifier]
Xcode13:com.sample.bundle.app.watchkitapp.watchkitextension
Xcode14:com.sample.bundle.app.watchkitapp
There is some functions in the Firebase Cloud Messaging framework that falls under this issue. It is FIRMessagingAppIdentifier and FIRMessagingBundleIDByRemovingLastPartFrom.
This functions handles removing the last element of the bundleID. (I understand the purpose is to remove ".watchkitextension").
As noted in the source code comments, this is done in the watchKitExtension, so the
This processing is performed to obtain the bundleId of watchKitApp.
However, starting with Xcode14, there will be cases where this process itself will no longer be necessary.
If you adopt the new WatchApp project structure from Xcode14, you will need to use
Messaging may not be able to send push notifications to the Apple Watch app.
We would appreciate your consideration to address this issue as soon as possible.
Reproducing the issue
Create a new Watch App project in Xcode14.
Develop a Watch App to use and receive Firebadse Cloud messaging.
Attempt to send messages through Firebase console or API, etc.
Firebase SDK Version
9.5.0
Xcode Version
14.0
Installation Method
Swift Package Manager
Firebase Product(s)
Messaging
Targeted Platforms
watchOS
Relevant Log Output
No response
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: