Firebase-ios-sdk: GoogleUtilities Swizzler, Missing Push Notification Entitlement

Created on 11 Apr 2019  路  11Comments  路  Source: firebase/firebase-ios-sdk

Hi guys,

I just updated the Firebase/Core pod in my app and submitted the app to the app store. I got an email from Apple about Missing Push Notification Entitlement even though I'm not using push notifications and I didn't have any issues with the previous version of my app released a week ago.

I did some investigation and looks like the GULAppDelegateSwizzler class in GoogleUtilities now contains some code to swizzle push notification methods which I guess are being picked up by Apple. I had GoogleUtilities 5.5.0 before and didn't have this issue. Now I'm using version 5.6.0. I would rather avoid adding push notification entitlement if I'm not using this feature. Is there anything that can be done about it?

Here's an email from Apple:

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.

GoogleUtilities auth

All 11 comments

@peterstojanowski Thanks for the report. We'll investigate.

In the meantime, a workaround would be adding

pod 'GoogleUtilities' , '~> 5.5.0' to the Podfile.

We published GoogleUtilities 5.7.0 that is an exact match of 5.5.0 (their tags uses the same github hash). The Podfile workaround is no longer necessary.

We'll continue to investigate issue for the right roll forward fix.

I have the same problem after I added GoogleSignIn.

When you add pod 'Firebase/Auth' you also get the same issue.

Yeah, I actually have the following:

  pod 'Firebase/Core'
  pod 'Firebase/Firestore'
  pod 'Firebase/Analytics'
  pod 'Firebase/Auth'
  pod 'GoogleSignIn'

so maybe Auth causes the problem.

GoogleSignIn did a major update to 5.0.0 last week so it's possibly related to that. Does keeping GoogleSignIn at version 4.4.0 make a difference?

@paulb777 I'm using GoogleSignIn 4.4.0 right now

@renkelvin Any ideas?

Phone number auth depends on APNS. When you add the dependency of Fireabase/Auth without using phone auth, you might receive the warning of "missing push notification entitlements".
We'll keep an eye on Apple's policy and currently this won't affect the App Store review.

@renkelvin thanks, that makes sense. It would be nice though to be able to turn it off while initializing Firebase Auth. Or even enable it only when phone auth is used (it that's possible).

@algrid We would likely need to make a separate pod to do that, so unlikely to be feasible now. As @renkelvin said, we'll keep an eye on it and reevaluate if Apple's policy changes.

Was this page helpful?
0 / 5 - 0 ratings