firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.53k stars 1.44k forks source link

Missing Push Notification Entitlement #10558

Closed Okluckej closed 1 year ago

Okluckej commented 1 year ago

Description

Current result: Submission to Apple triggers APNs warning ITMS-90078 even if FirebaseAppDelegateProxyEnabled NO in Info.plist

Expected result: Apple submission won't return warning ITMS-90078 when FirebaseAppDelegateProxyEnabled NO in Info.plist

ITMS-90078: Missing Push Notification Entitlement - Your app appears to register with the Apple Push Notification service, but the app signature's entitlements do not include the 'aps-environment' entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the 'aps-environment' entitlement. Xcode does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor's Capabilities pane, or manually add the entitlement to your entitlements file. For more information, see https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1.

Reproducing the issue

https://drive.google.com/file/d/1mROaeifJkH7--BNuxTcbzJByx-NeUEFu/view?usp=sharing

Firebase SDK Version

10.1.0

Xcode Version

14.1

Installation Method

CocoaPods

Firebase Product(s)

Analytics

Targeted Platforms

iOS

Relevant Log Output

2022-12-06 14:05:30.683855+0100 Ylands[2059:326219] 10.1.0 - [FirebaseCore][I-COR000005] No app has been configured yet.
2022-12-06 14:05:30.727617+0100 Ylands[2059:326219] 10.1.0 - [FirebaseCore][I-COR000005] No app has been configured yet.
2022-12-06 14:05:30.729790+0100 Ylands[2059:326219] 10.1.0 - [FirebaseCore][I-COR000003] The default Firebase app has not yet been configured. Add `FirebaseApp.configure()` to your application initialization. This can be done in in the App Delegate's application(_:didFinishLaunchingWithOptions:)` (or the `@main` struct's initializer in SwiftUI). Read more: https://goo.gl/ctyzm8.
2022-12-06 14:05:30.730481+0100 Ylands[2059:326219] 10.1.0 - [FirebaseCore][I-COR000005] No app has been configured yet.
2022-12-06 14:05:31.072404+0100 Ylands[2059:326215] 10.1.0 - [FirebaseCore][I-COR000001] Configuring the default app.
2022-12-06 14:06:43.145978+0100 Ylands[2059:326217] 10.1.0 - [FirebaseInstallations][I-FIS002000] -[FIRInstallationsIDController createGetInstallationItemPromise], appName: __FIRAPP_DEFAULT
2022-12-06 14:06:43.178899+0100 Ylands[2059:326217] 10.1.0 - [FirebaseInstallations][I-FIS002001] -[FIRInstallationsIDController installationWithValidAuthTokenForcingRefresh:0], appName: __FIRAPP_DEFAULT
2022-12-06 14:06:44.774427+0100 Ylands[2059:326337] 10.1.0 - [FirebaseAnalytics][I-ACS023007] Analytics v.10.1.0 started
2022-12-06 14:06:44.776360+0100 Ylands[2059:326337] 10.1.0 - [FirebaseAnalytics][I-ACS023008] To disable debug logging set the following application argument: -noFIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2022-12-06 14:06:44.778243+0100 Ylands[2059:326337] 10.1.0 - [FirebaseAnalytics][I-ACS023009] Debug logging enabled
2022-12-06 14:06:44.778949+0100 Ylands[2059:326337] 10.1.0 - [FirebaseAnalytics][I-ACS023207] To enable verbose logging set the following application argument: -FIRAnalyticsVerboseLoggingEnabled (see http://goo.gl/RfcP7r)
2022-12-06 14:06:44.788465+0100 Ylands[2059:326337] 10.1.0 - [FirebaseAnalytics][I-ACS025036] App Delegate Proxy is disabled
2022-12-06 14:06:44.862914+0100 Ylands[2059:326217] 10.1.0 - [FirebaseAnalytics][I-ACS002002] APMExperimentAlarm scheduled to fire in approx. (s): 14074.01337003708
2022-12-06 14:06:45.278107+0100 Ylands[2059:326339] 10.1.0 - [FirebaseAnalytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2022-12-06 14:06:45.289776+0100 Ylands[2059:326215] 10.1.0 - [FirebaseAnalytics][I-ACS029014] Successfully parsed a configuration. Version: 1667559070444050
2022-12-06 14:06:45.293922+0100 Ylands[2059:326339] 10.1.0 - [FirebaseAnalytics][I-ACS023016] Analytics is ready to receive events
2022-12-06 14:06:45.939982+0100 Ylands[2059:326339] 10.1.0 - [FirebaseAnalytics][I-ACS032006] Scheduling Search Ad Report timer
2022-12-06 14:06:45.940697+0100 Ylands[2059:326339] 10.1.0 - [FirebaseAnalytics][I-ACS002002] Search Ad campaign report alarm scheduled to fire in approx. (s): 86066.35713505745
2022-12-06 14:06:45.961100+0100 Ylands[2059:326217] 10.1.0 - [FirebaseAnalytics][I-ACS002002] Engagement timer scheduled to fire in approx. (s): 3600
2022-12-06 14:06:45.961811+0100 Ylands[2059:326217] 10.1.0 - [FirebaseAnalytics][I-ACS023012] Analytics collection enabled
2022-12-06 14:06:45.962445+0100 Ylands[2059:326217] 10.1.0 - [FirebaseAnalytics][I-ACS023220] Analytics screen reporting is enabled. Call Analytics.logEvent(AnalyticsEventScreenView, parameters: [...]) to log a screen view event. To disable automatic screen reporting, set the flag FirebaseAutomaticScreenReportingEnabled to NO (boolean) in the Info.plist
2022-12-06 14:06:46.237218+0100 Ylands[2059:326215] 10.1.0 - [FirebaseAnalytics][I-ACS023051] Logging event: origin, name, params: auto, screen_view (_vs), {
2022-12-06 14:06:46.255266+0100 Ylands[2059:326217] 10.1.0 - [FirebaseAnalytics][I-ACS023073] Debug mode is enabled. Marking event as debug and real-time. Event name, parameters: screen_view (_vs), {
2022-12-06 14:06:46.411227+0100 Ylands[2059:326339] 10.1.0 - [FirebaseAnalytics][I-ACS023072] Event logged. Event name, event params: screen_view (_vs), {
2022-12-06 14:06:46.445429+0100 Ylands[2059:326339] 10.1.0 - [FirebaseAnalytics][I-ACS002002] Measurement timer scheduled to fire in approx. (s): -74.2098081111908
2022-12-06 14:06:46.455995+0100 Ylands[2059:326339] 10.1.0 - [FirebaseAnalytics][I-ACS002001] Measurement timer fired
2022-12-06 14:06:46.456576+0100 Ylands[2059:326339] 10.1.0 - [FirebaseAnalytics][I-ACS002003] Measurement timer canceled
2022-12-06 14:06:46.477602+0100 Ylands[2059:326215] 10.1.0 - [FirebaseAnalytics][I-ACS023105] Event is not subject to real-time event count daily limit. Marking an event as real-time. Event name, parameters: screen_view (_vs), {
2022-12-06 14:06:46.523931+0100 Ylands[2059:326343] 10.1.0 - [FirebaseAnalytics][I-ACS800014] Cannot get flag for unregistered flag. SDK name, flag name: app_measurement, session_stitching_token_feature_enabled
2022-12-06 14:06:46.626368+0100 Ylands[2059:326215] 10.1.0 - [FirebaseAnalytics][I-ACS012018] Saving bundle. size (bytes): 477
2022-12-06 14:06:46.626924+0100 Ylands[2059:326215] 10.1.0 - [FirebaseAnalytics][I-ACS023116] Bundle added to the upload queue. BundleID, timestamp (ms): 6, 1670331931234
2022-12-06 14:06:46.673714+0100 Ylands[2059:326215] 10.1.0 - [FirebaseAnalytics][I-ACS023039] Measurement data sent to network. Timestamp (ms), data: 1670332006672, <APMPBMeasurementBatch: 0x28267e710>
2022-12-06 14:06:46.689029+0100 Ylands[2059:326337] 10.1.0 - [FirebaseAnalytics][I-ACS900000] Uploading data. Host: https://region1.app-measurement.com/a
2022-12-06 14:06:46.807789+0100 Ylands[2059:326337] 10.1.0 - [FirebaseAnalytics][I-ACS901006] Received SSL challenge for host. Host: https://region1.app-measurement.com/a
2022-12-06 14:06:46.940290+0100 Ylands[2059:326215] 10.1.0 - [FirebaseAnalytics][I-ACS023044] Successful upload. Got network response. Code, size: 204, 0
2022-12-06 14:06:46.952332+0100 Ylands[2059:326337] 10.1.0 - [FirebaseAnalytics][I-ACS002002] Measurement timer scheduled to fire in approx. (s): -74.71241497993469
2022-12-06 14:06:46.973958+0100 Ylands[2059:326215] 10.1.0 - [FirebaseAnalytics][I-ACS002003] Measurement timer canceled

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

PODS:

DEPENDENCIES:

SPEC REPOS: trunk:

SPEC CHECKSUMS: Firebase: 444b35a9c568a516666213c2f6cccd10cb12559f FirebaseAnalytics: 24cb27b52b2e11ad5013528195b4ca0755dec960 FirebaseCore: 55e7ae35991ccca4db03ff8d8df6ed5f17a3e4c7 FirebaseCoreInternal: 96d75228e10fd369564da51bd898414eb0f54df5 FirebaseInstallations: 99d24bac0243cf8b0e96cf5426340d211f0bcc80 GoogleAppMeasurement: e490e248af3da95afe8fa8e7baac232dc8d020b7 GoogleUtilities: 1d20a6ad97ef46f67bbdec158ce00563a671ebb7 nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb

PODFILE CHECKSUM: 6845254f8ee1fb2e3849b616f63267fe712ed7e2

COCOAPODS: 1.11.3

google-oss-bot commented 1 year ago

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

rizafran commented 1 year ago

Thanks for reporting, @Okluckej. It seems like your issue is related to #8741.

Okluckej commented 1 year ago

I've done some experiments and maybe the usual suspect GULAppDelegateSwizzler may not be the source of the problem. It looks like libFirebaseCppAnalytics.a, libFireabaseCppApp.a could be the source of the problem IMHO.

paulb777 commented 1 year ago

Where does libFirebaseCppAnalytics.a come from? It's not related to this repo or associated products.

Okluckej commented 1 year ago

Hi, they came up as native plugin in Unity package (FirebaseAnalytics.unitypackage).

https://firebase.google.com/docs/unity/setup https://firebase.google.com/download/unity

rizafran commented 1 year ago

Hi @Okluckej, I found this Unity SDK ticket which may be related to your issue.

paulb777 commented 1 year ago

Closing. Please follow up on the Unity repo issue.