firebase-ios-sdk: Push is not coming on Release builds after update from 5.15 to 5.16

Environment

  • Xcode version: 10.1
  • Firebase SDK version: 5.16
  • Firebase Component: Core, Messaging
  • Component version: Core 5.16.0, Messaging 3.3.0

Problem

Recently I’ve updated pods using specs:

  pod 'Firebase/Core', '~> 5.0', :inhibit_warnings => true
  pod 'Firebase/Messaging', '~> 5.0', :inhibit_warnings => true
  pod 'Firebase/DynamicLinks', '~> 5.0', :inhibit_warnings => true
  pod 'Firebase/RemoteConfig', '~> 5.0', :inhibit_warnings => true

which made an upgrade from:

   Firebase/Core (5.15.0) -> 5.16.0
     FirebaseAnalytics (= 5.5.0) -> 5.4.0

   Firebase/Messaging (5.15.0): -> 5.16.0
     FirebaseMessaging (= 3.2.2) -> 3.3.0

   Firebase/DynamicLinks (5.15.0): -> 5.16.0
     FirebaseDynamicLinks (= 3.3.0) -> 3.4.0

   Firebase/CoreOnly (5.15.0): -> 5.16.0
     FirebaseCore (= 5.1.10) -> 5.2.0

 FirebaseInstanceID 3.3.0 -> 3.4.0

The issues is - in DEBUG configuration - I’m receiving Push Notifications. But when exported for Production (AdHoc and AppStore) builds - no Push Notifications.

Steps to reproduce:

  1. Install
pod 'Firebase/Core', '~> 5.16.0', :inhibit_warnings => true
pod 'Firebase/Messaging', '~> 5.16.0', :inhibit_warnings => true
  1. Run App in DEBUG configuration

  2. Send Push notification - Push is delivered to device

  3. Change XCode Scheme settings. For Run : 4.1 select build configuration = Release (or some which is used for AdHoc distribution) 4.2 uncheck ‘Debug executable’ - this is necessary to run release build on device

Alternatively you may distribute AdHoc or AppStore build via any system you use (TestFlight, HockeyApp, AppCenter, Crashlytics).

  1. Send Push notification

Expected - Push is delivered

Actual - Push is not delivered

In console log I see: 5.16.0 - [Firebase/InstanceID][I-IID003009] Failed to fetch default token Error Domain=com.firebase.iid Code=1005 "(null)"

and strange line: 5.16.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure]; (FirebaseApp.configure() in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.

despite the fact it is configured in:

func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    FirebaseApp.configure()
}

Rolling back to 5.15.0 has solved the issue.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Hi @ryanwilson , we still have issues even in 5.20.1 and it all started after updating from 5.15 (we did the update in January and that’s when we started receiving push notifications not working reports). It seems people have been reporting since 5.16 in another closed issue: #2372. Should we reopen either? edit: #2438 seems to be the new place 👍