Ошибка выдачи Firebase в сборке iOS CapacitorIOS

Программируем под IOS
Ответить Пред. темаСлед. тема
Anonymous
 Ошибка выдачи Firebase в сборке iOS Capacitor

Сообщение Anonymous »

При запуске моего приложения ионного конденсатора, содержащего Firebase, происходит сбой в iOS при запуске приложения. Приложение успешно собирается и развертывается, а затем сразу же аварийно завершает работу на устройстве при запуске приложения.
Capacitor 6
iOS Build 15
iOS Push Добавлено право на уведомление
Я получаю следующий журнал сбоя из TestFlight:
Модель оборудования: iPad12,1
Процесс: Приложение [930] ]
Путь: /private/var/containers/Bundle/Application/C02673D0-9248-4A9F-84CF-1A9B561376DA/App.app/App
AppStoreTools: 15F31c
AppVariant: 1:iPad12, 1:16
Бета: ДА
Тип кода: ARM-64 (собственный)
Роль: передний план
Родительский процесс: launchd [1]
Версия ОС: iPhone OS 16.2 (20C65)
Тип выпуска: Пользовательский
Версия отчета: 104
Тип исключения: EXC_CRASH (SIGABRT)
Коды исключений: 0x0000000000000000, 0x0000000000000000
Запущено потоком: 0
Последняя трассировка исключения:
0 CoreFoundation 0x1be7a9e48 __ExceptionPreprocess + 164 (NSException.m:202)
1 libobjc.A.dylib 0x1b7af38d8 objc_Exception_throw + 60 (objc-Exception.mm:356)
2 CoreFoundation 0x1be899c38 +[NSException raise:format:] + 112 (NSException.m:0)
3 FirebaseCore 0x105aa8298 +[Настройка FIRApp] + 84 (FIRApp.m:118)
4 App 0x1045280e4 AppDelegate.application(:didFinishLaunchingWithOptions:) + 16 (AppDelegate.swift:12)
5 App 0x1045280e4 @objc AppDelegate.application(:didFinishLaunchingWithOptions:) + 160 (:10)
Итак, он говорит, что выдает ошибку в строке 12 AppDelegate.swift. Но это строка «FirebaseApp.configure()». Все настроено в соответствии с документацией по конденсатору, если только я где-то что-то не упускаю, но я этого не вижу.
Package.json
"dependencies": {
"@angular/common": "^15.1.1",
"@angular/core": "^15.1.1",
"@angular/forms": "^15.1.1",
"@angular/platform-browser": "^15.1.1",
"@angular/platform-browser-dynamic": "^15.1.1",
"@angular/router": "^15.1.1",
"@azure/msal-angular": "2.5.1",
"@azure/msal-browser": "2.32.1",
"@capacitor-community/barcode-scanner": "^4.0.1",
"@capacitor-community/fcm": "^5.0.3",
"@capacitor-community/file-opener": "^1.0.5",
"@capacitor-community/sqlite": "^5.6.1",
"@capacitor-mlkit/barcode-scanning": "^5.4.0",
"@capacitor/android": "^6.0.0",
"@capacitor/app": "^6.0.0",
"@capacitor/app-launcher": "^6.0.0",
"@capacitor/browser": "^6.0.0",
"@capacitor/camera": "^6.0.0",
"@capacitor/core": "^6.0.0",
"@capacitor/device": "^6.0.0",
"@capacitor/filesystem": "^6.0.0",
"@capacitor/geolocation": "^6.0.0",
"@capacitor/haptics": "^6.0.0",
"@capacitor/ios": "^6.0.0",
"@capacitor/keyboard": "^6.0.0",
"@capacitor/network": "^6.0.0",
"@capacitor/preferences": "^6.0.0",
"@capacitor/push-notifications": "^6.0.0",
"@capacitor/splash-screen": "^6.0.0",
"@capacitor/status-bar": "^6.0.0",
"@capacitor/toast": "^6.0.0",
"@fortawesome/angular-fontawesome": "^0.12.1",
"@fortawesome/fontawesome-common-types": "^6.2.1",
"@fortawesome/fontawesome-pro": "^6.2.0",
"@fortawesome/fontawesome-svg-core": "^6.2.0",
"@fortawesome/free-solid-svg-icons": "^6.2.0",
"@fortawesome/pro-light-svg-icons": "^6.2.0",
"@ionic/angular": "^7.2.3",
"@ionic/cordova-builders": "^7.0.0",
"@ionic/pwa-elements": "^3.2.2",
"@ionic/storage-angular": "^3.0.6",
"@proteansoftware/capacitor-start-navigation": "^5.0.0",
"angularx-qrcode": "^15.0.1",
"cordova-android": "12.0.1",
"date-fns": "^2.29.3",
"date-fns-tz": "^1.3.7",
"ionic-msal-native": "^0.1.0",
"ionicons": "^6.0.3",
"jeep-sqlite": "^2.6.1",
"moment": "^2.29.4",
"msal": "1.4.17",
"rxjs": "^7.5.0",
"signature_pad": "^4.0.9",
"sql.js": "^1.10.2",
"tslib": "^2.2.0",
"zone": "^0.3.4",
"zone.js": "~0.11.4"

Подфайл
require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'

platform :ios, '15.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 'CapacitorCommunityBarcodeScanner', :path => '../../node_modules/@capacitor-community/barcode-scanner'
pod 'CapacitorCommunityFcm', :path => '../../node_modules/@capacitor-community/fcm'
pod 'CapacitorCommunityFileOpener', :path => '../../node_modules/@capacitor-community/file-opener'
pod 'CapacitorCommunitySqlite', :path => '../../node_modules/@capacitor-community/sqlite'
pod 'CapacitorMlkitBarcodeScanning', :path => '../../node_modules/@capacitor-mlkit/barcode-scanning'
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
pod 'CapacitorAppLauncher', :path => '../../node_modules/@capacitor/app-launcher'
pod 'CapacitorBrowser', :path => '../../node_modules/@capacitor/browser'
pod 'CapacitorCamera', :path => '../../node_modules/@capacitor/camera'
pod 'CapacitorDevice', :path => '../../node_modules/@capacitor/device'
pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem'
pod 'CapacitorGeolocation', :path => '../../node_modules/@capacitor/geolocation'
pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
pod 'CapacitorNetwork', :path => '../../node_modules/@capacitor/network'
pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences'
pod 'CapacitorPushNotifications', :path => '../../node_modules/@capacitor/push-notifications'
pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen'
pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
pod 'CapacitorToast', :path => '../../node_modules/@capacitor/toast'
pod 'ProteansoftwareCapacitorStartNavigation', :path => '../../node_modules/@proteansoftware/capacitor-start-navigation'
end

target 'App' do
capacitor_pods
# Add your Pods here
pod 'Firebase/Messaging'
end

post_install do |installer|
assertDeploymentTarget(installer)
end

AppDelegate.swift
import UIKit
import Capacitor
import Firebase

@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
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 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)
}

}


Подробнее здесь: https://stackoverflow.com/questions/784 ... itor-build
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «IOS»