6.0.0
I start the App and got warnings like:
objc[66371]: Class _TtC20FirebaseCoreInternal16HeartbeatStorage is implemented in both /Users/MAC/Library/Developer/CoreSimulator/Devices/8D98A354-2473-4486-8BF5-3493D3481439/data/Containers/Bundle/Application/85026241-D4ED-40B3-A36E-68A924BD6BE8/App.app/Frameworks/FirebaseCoreInternal.framework/FirebaseCoreInternal (0x105c716c8) and /Users/MAC/Library/Developer/CoreSimulator/Devices/8D98A354-2473-4486-8BF5-3493D3481439/data/Containers/Bundle/Application/85026241-D4ED-40B3-A36E-68A924BD6BE8/App.app/App.debug.dylib (0x10652d310). One of the two will be used. Which one is undefined.
Then the biggest Problem appears:
10.29.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.
No warnings, no errors and receiving the dcm_token to send push notifications to my iOS device like it works on android.
https://reproductionexampleisfollowing.com
(Android works perfectly)
IOS 16 Pro (18.0.1)
// PodFile
require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
platform :ios, '13.0'
use_frameworks!
# workaround to avoid Xcode caching of Pods that requires
# Product -> Clean Build Folder after new Cordova plugins installed
# Requires CocoaPods 1.6 or newer
install! 'cocoapods', :disable_input_output_paths => true
def capacitor_pods
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCommunityAdmob', :path => '../../node_modules/@capacitor-community/admob'
pod 'CapacitorFirebaseMessaging', :path => '../../node_modules/@capacitor-firebase/messaging'
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
pod 'CapacitorDevice', :path => '../../node_modules/@capacitor/device'
pod 'CapacitorNetwork', :path => '../../node_modules/@capacitor/network'
pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences'
pod 'CapacitorNativeSettings', :path => '../../node_modules/capacitor-native-settings'
end
target 'App' do
capacitor_pods
# Add your Pods here
pod 'FirebaseMessaging'
end
post_install do |installer|
assertDeploymentTarget(installer)
end
{
...
"private": true,
"scripts": {
"lint": "eslint --ext .js,.ts,.vue ./",
"format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
"test": "echo \"No test specified\" && exit 0",
"dev": "quasar dev",
"build": "quasar build"
},
"dependencies": {
"@capacitor-community/admob": "^6.0.0",
"@capacitor-firebase/messaging": "^6.0.0",
"@capacitor/app": "^6.0.0",
"@capacitor/device": "^6.0.0",
"@capacitor/network": "^6.0.1",
"@capacitor/preferences": "^6.0.1",
"@paypal/paypal-js": "^8.0.5",
"@quasar/extras": "^1.16.12",
"axios": "^1.2.1",
"capacitor-native-settings": "^6.0.0",
"firebase": "^10.12.3",
"keycloak-js": "^22.0.5",
"oidc-client-ts": "2.4.0",
"pinia": "^2.0.11",
"pinia-plugin-persistedstate": "^3.2.1",
"quasar": "^2.14.2",
"vue": "^3.4.32",
"vue-advanced-cropper": "^2.8.8",
"vue-i18n": "^9.2.2",
"vue-router": "^4.2.5",
"vue-writer": "^2.0.2"
},
"devDependencies": {
"@intlify/vite-plugin-vue-i18n": "^3.3.1",
"@quasar/app-vite": "^1.9.3",
"@types/node": "^12.20.21",
"@types/vue-writer": "^1.2.0",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"autoprefixer": "^10.4.2",
"eslint": "^8.10.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-vue": "^9.0.0",
"prettier": "^2.5.1",
"typescript": "^4.5.4"
},
"engines": {
"node": "^18 || ^16 || ^14.19",
"npm": ">= 6.13.4",
"yarn": ">= 1.21.1"
}
}
// capacitor package.json
{
...
"private": true,
"dependencies": {
"@capacitor-community/admob": "^6.0.0",
"@capacitor-firebase/messaging": "^6.0.0",
"@capacitor/android": "^6.1.0",
"@capacitor/app": "^6.0.0",
"@capacitor/cli": "^6.1.0",
"@capacitor/core": "^6.1.0",
"@capacitor/device": "^6.0.0",
"@capacitor/ios": "^6.1.2",
"@capacitor/network": "^6.0.1",
"@capacitor/preferences": "^6.0.1",
"capacitor-native-settings": "^6.0.0",
"firebase": "^10.12.3"
}
}
//infoplist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>XXXXXXXX</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>XXXXXXXX</string>
<key>CFBundleURLSchemes</key>
<array>
<string>XXXXXXX</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-XXXXXXXX</string>
<key>GADIsAdManagerApp</key>
<true/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSUserTrackingUsageDescription</key>
<string>[Why you use NSUserTracking. ex: This identifier will be used to deliver personalized ads to you.]</string>
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>cstr6suwn9.skadnetwork</string>
</dict>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen.storyboard</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIRequiresFullScreen</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
<key>GADIsAdManagerApp</key>
<true/>
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-XXXXXX</string>
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>cstr6suwn9.skadnetwork</string>
</dict>
</array>
<key>NSUserTrackingUsageDescription</key>
<string>[Why you use NSUserTracking. ex: This identifier will be used to deliver personalized ads to you.]</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
</dict>
</plist>
AppDelegate
import UIKit
import Capacitor
import FirebaseCore
import FirebaseMessaging
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
FirebaseApp.configure()
return true
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Messaging.messaging().apnsToken = deviceToken
print(deviceToken)
Messaging.messaging().token(completion: { (token, error) in
if let error = error {
NotificationCenter.default.post(name: .capacitorDidFailToRegisterForRemoteNotifications, object: error)
} else if let token = token {
NotificationCenter.default.post(name: .capacitorDidRegisterForRemoteNotifications, object: token)
}
})
}
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
NotificationCenter.default.post(name: .capacitorDidFailToRegisterForRemoteNotifications, object: error)
}
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
NotificationCenter.default.post(name: Notification.Name.init("didReceiveRemoteNotification"), object: completionHandler, userInfo: userInfo)
}
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
// Called when the app was launched with a url. Feel free to add additional processing here,
// but if you want the App API to support tracking app url opens, make sure to keep this call
return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
}
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
// Called when the app was launched with an activity, including Universal Links.
// Feel free to add additional processing here, but if you want the App API to support
// tracking app url opens, make sure to keep this call
return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
}
}
Before asked: I imported my google info by using Xcode.
(I don't used ionic)
Operating System - Darwin(24.0.0) - darwin/arm64
NodeJs - 18.18.2
Global packages
NPM - 9.8.1
yarn - Not installed
@quasar/cli - undefined
@quasar/icongenie - 4.0.0
cordova - Not installed
Important local packages
quasar - 2.17.0 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
@quasar/app-vite - 1.10.0 -- Quasar Framework App CLI with Vite
@quasar/extras - 1.16.12 -- Quasar Framework fonts, icons and animations
eslint-plugin-quasar - Not installed
vue - 3.5.11 -- The progressive JavaScript framework for building modern web UI.
vue-router - 4.4.5
pinia - 2.2.4 -- Intuitive, type safe and flexible Store for Vue
vuex - Not installed
vite - 2.9.18 -- Native-ESM powered web dev build tool
eslint - 8.57.1 -- An AST-based pattern checker for JavaScript.
electron - Not installed
electron-packager - Not installed
@electron/packager - Not installed
electron-builder - Not installed
register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
@capacitor/core - 6.1.0 -- Capacitor: Cross-platform apps with JavaScript and the web
@capacitor/cli - 6.1.0 -- Capacitor: Cross-platform apps with JavaScript and the web
@capacitor/android - 6.1.0 -- Capacitor: Cross-platform apps with JavaScript and the web
@capacitor/ios - 6.1.2 -- Capacitor: Cross-platform apps with JavaScript and the web
Quasar App Extensions
None installed
Networking
Host - MacBookPro.fritz.box
en0 - 192.168.179.3
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too