firebase-ios-sdk
firebase-ios-sdk copied to clipboard
Firebase SDK Configure not successful
Description
I have a very basic Swift app (it's an Ionic app but it's the native Swift code I'm having issues with). In order to set up push notifications through Firebase I have followed the Firebase docs: https://firebase.google.com/docs/ios/setup https://firebase.google.com/docs/cloud-messaging/ios/client
APNs key is in Firebase and GoogleService-Info.plist is in the appropriate place in the project with target membership set.
When I call Messaging.messaging() in the didRegisterForRemoteNotificationsWithDeviceToken func it comes back as nil, and I get "Default Firebase app has not yet been configured" error message, even though I have the FirebaseApp.configure in my didFinishLaunchingWithOptions func as the docs indicate. The APNs token comes through but the FCM token is never retrieved.
Any help is appreciated.
Reproducing the issue
No response
Firebase SDK Version
11.8.0
Xcode Version
15.2
Installation Method
CocoaPods
Firebase Product(s)
Messaging
Targeted Platforms
iOS
Relevant Log Output
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://firebase.google.com/docs/ios/setup#initalize_firebase_in_your_app
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
PODS:
- ByteowlsCapacitorOauth2 (5.0.0):
- Capacitor
- OAuthSwift (= 2.2.0)
- Capacitor (6.2.0):
- CapacitorCordova
- CapacitorApp (6.0.1):
- Capacitor
- CapacitorBrowser (6.0.3):
- Capacitor
- CapacitorCommunityBackgroundGeolocation (0.0.1):
- Capacitor
- CapacitorCordova (6.2.0)
- CapacitorGeolocation (6.0.1):
- Capacitor
- CapacitorHaptics (6.0.1):
- Capacitor
- CapacitorKeyboard (6.0.2):
- Capacitor
- CapacitorLocalNotifications (6.1.0):
- Capacitor
- CapacitorNetwork (6.0.2):
- Capacitor
- CapacitorPreferences (6.0.2):
- Capacitor
- CapacitorPushNotifications (6.0.4):
- Capacitor
- CapacitorSecureStoragePlugin (0.10.0):
- Capacitor
- SwiftKeychainWrapper
- CapacitorSplashScreen (6.0.2):
- Capacitor
- CapacitorStatusBar (6.0.1):
- Capacitor
- CapawesomeCapacitorAppUpdate (6.0.0):
- Capacitor
- FirebaseCore (11.8.1):
- FirebaseCoreInternal (~> 11.8.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreInternal (11.8.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseInstallations (11.8.0):
- FirebaseCore (~> 11.8.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- PromisesObjC (~> 2.4)
- FirebaseMessaging (11.8.0):
- FirebaseCore (~> 11.8.0)
- FirebaseInstallations (~> 11.0)
- GoogleDataTransport (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Reachability (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- nanopb (~> 3.30910.0)
- GoogleDataTransport (10.1.0):
- nanopb (~> 3.30910.0)
- PromisesObjC (~> 2.4)
- GoogleUtilities/AppDelegateSwizzler (8.0.2):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Privacy
- GoogleUtilities/Environment (8.0.2):
- GoogleUtilities/Privacy
- GoogleUtilities/Logger (8.0.2):
- GoogleUtilities/Environment
- GoogleUtilities/Privacy
- GoogleUtilities/Network (8.0.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Privacy
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (8.0.2)":
- GoogleUtilities/Privacy
- GoogleUtilities/Privacy (8.0.2)
- GoogleUtilities/Reachability (8.0.2):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GoogleUtilities/UserDefaults (8.0.2):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- nanopb (3.30910.0):
- nanopb/decode (= 3.30910.0)
- nanopb/encode (= 3.30910.0)
- nanopb/decode (3.30910.0)
- nanopb/encode (3.30910.0)
- OAuthSwift (2.2.0)
- PromisesObjC (2.4.0)
- SwiftKeychainWrapper (4.0.1)
DEPENDENCIES:
- "ByteowlsCapacitorOauth2 (from `../../node_modules/@byteowls/capacitor-oauth2`)"
- "Capacitor (from `../../node_modules/@capacitor/ios`)"
- "CapacitorApp (from `../../node_modules/@capacitor/app`)"
- "CapacitorBrowser (from `../../node_modules/@capacitor/browser`)"
- "CapacitorCommunityBackgroundGeolocation (from `../../node_modules/@capacitor-community/background-geolocation`)"
- "CapacitorCordova (from `../../node_modules/@capacitor/ios`)"
- "CapacitorGeolocation (from `../../node_modules/@capacitor/geolocation`)"
- "CapacitorHaptics (from `../../node_modules/@capacitor/haptics`)"
- "CapacitorKeyboard (from `../../node_modules/@capacitor/keyboard`)"
- "CapacitorLocalNotifications (from `../../node_modules/@capacitor/local-notifications`)"
- "CapacitorNetwork (from `../../node_modules/@capacitor/network`)"
- "CapacitorPreferences (from `../../node_modules/@capacitor/preferences`)"
- "CapacitorPushNotifications (from `../../node_modules/@capacitor/push-notifications`)"
- CapacitorSecureStoragePlugin (from `../../node_modules/capacitor-secure-storage-plugin`)
- "CapacitorSplashScreen (from `../../node_modules/@capacitor/splash-screen`)"
- "CapacitorStatusBar (from `../../node_modules/@capacitor/status-bar`)"
- "CapawesomeCapacitorAppUpdate (from `../../node_modules/@capawesome/capacitor-app-update`)"
- FirebaseMessaging
SPEC REPOS:
trunk:
- FirebaseCore
- FirebaseCoreInternal
- FirebaseInstallations
- FirebaseMessaging
- GoogleDataTransport
- GoogleUtilities
- nanopb
- OAuthSwift
- PromisesObjC
- SwiftKeychainWrapper
EXTERNAL SOURCES:
ByteowlsCapacitorOauth2:
:path: "../../node_modules/@byteowls/capacitor-oauth2"
Capacitor:
:path: "../../node_modules/@capacitor/ios"
CapacitorApp:
:path: "../../node_modules/@capacitor/app"
CapacitorBrowser:
:path: "../../node_modules/@capacitor/browser"
CapacitorCommunityBackgroundGeolocation:
:path: "../../node_modules/@capacitor-community/background-geolocation"
CapacitorCordova:
:path: "../../node_modules/@capacitor/ios"
CapacitorGeolocation:
:path: "../../node_modules/@capacitor/geolocation"
CapacitorHaptics:
:path: "../../node_modules/@capacitor/haptics"
CapacitorKeyboard:
:path: "../../node_modules/@capacitor/keyboard"
CapacitorLocalNotifications:
:path: "../../node_modules/@capacitor/local-notifications"
CapacitorNetwork:
:path: "../../node_modules/@capacitor/network"
CapacitorPreferences:
:path: "../../node_modules/@capacitor/preferences"
CapacitorPushNotifications:
:path: "../../node_modules/@capacitor/push-notifications"
CapacitorSecureStoragePlugin:
:path: "../../node_modules/capacitor-secure-storage-plugin"
CapacitorSplashScreen:
:path: "../../node_modules/@capacitor/splash-screen"
CapacitorStatusBar:
:path: "../../node_modules/@capacitor/status-bar"
CapawesomeCapacitorAppUpdate:
:path: "../../node_modules/@capawesome/capacitor-app-update"
SPEC CHECKSUMS:
ByteowlsCapacitorOauth2: 9e7cdae2bf251463a6ad89493e27fb288bf694d7
Capacitor: 1f3c7b9802d958cd8c4eb63895fff85dff2e1eea
CapacitorApp: 0bc633b4eae40a1f32cd2834788fad3bc42da6a1
CapacitorBrowser: aab1ed943b01c0365c4810538a8b3477e2d9f72e
CapacitorCommunityBackgroundGeolocation: 6f26f4290377dbd1d6dec21e62cb66f008f61ec7
CapacitorCordova: b33e7f4aa4ed105dd43283acdd940964374a87d9
CapacitorGeolocation: 39dca51d755f08ed1d43e51be55291a402cdc64f
CapacitorHaptics: fe689ade56ef20ec9b041a753c6da70c5d8ec9a9
CapacitorKeyboard: 2700f9b18687be021e28b5a09b59eb151a46d5e0
CapacitorLocalNotifications: 6bac9e948b2b8852506c6d74abb2cde140250f86
CapacitorNetwork: 8796cf1f1104a00b289957b6150b7c60e1c2a8d3
CapacitorPreferences: e8284bf740cf8c6d3f25409af3c01df87dfeb5a1
CapacitorPushNotifications: 1fc22ae360214a0ac0625c348d3aea217085163d
CapacitorSecureStoragePlugin: ced6025438fbbdbfb9fffec4398e748572fc147b
CapacitorSplashScreen: 250df9ef8014fac5c7c1fd231f0f8b1d8f0b5624
CapacitorStatusBar: b81d4fb5d4e0064c712018071b3ab4b810b39a63
CapawesomeCapacitorAppUpdate: 3c05b5c8e42f9c6a88d666093406e9336d9bfdb1
FirebaseCore: 99fe0c4b44a39f37d99e6404e02009d2db5d718d
FirebaseCoreInternal: df24ce5af28864660ecbd13596fc8dd3a8c34629
FirebaseInstallations: 6c963bd2a86aca0481eef4f48f5a4df783ae5917
FirebaseMessaging: 487b634ccdf6f7b7ff180fdcb2a9935490f764e8
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
OAuthSwift: 75efbb5bd9a4b2b71a37bd7e986bf3f55ddd54c6
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
SwiftKeychainWrapper: 807ba1d63c33a7d0613288512399cd1eda1e470c
PODFILE CHECKSUM: b231fbcdef086d152d70f80d8dd1fe0cf3d684b1
COCOAPODS: 1.15.2