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

New Watch App project configuration from Xcode14 does not receive push notifications using Firebase Cloud Messaging #10147

Closed
AkiraHayakawaJMAS opened this issue Aug 27, 2022 · 3 comments · Fixed by #10324
Assignees
Labels
api: messaging watchOS Xcode 14 - iOS 16 Issues and PRs related to Xcode 14, iOS 16, and associated OSes
Milestone

Comments

@AkiraHayakawaJMAS
Copy link

AkiraHayakawaJMAS commented Aug 27, 2022

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 snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@paulb777 paulb777 added watchOS api: messaging Xcode 14 - iOS 16 Issues and PRs related to Xcode 14, iOS 16, and associated OSes and removed needs-triage labels Aug 27, 2022
@paulb777 paulb777 added this to the Firebase 10 - M122 milestone Sep 8, 2022
@charlotteliang charlotteliang self-assigned this Sep 8, 2022
@paulb777 paulb777 removed this from the Firebase 10 - M122 milestone Sep 27, 2022
@aashishpatil-g
Copy link
Contributor

This should be fixed with #10324.

@paulb777 paulb777 added this to the 10.1.0 - M123 milestone Nov 5, 2022
@firebase firebase locked and limited conversation to collaborators Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: messaging watchOS Xcode 14 - iOS 16 Issues and PRs related to Xcode 14, iOS 16, and associated OSes
5 participants