Недавно я решил запустить приложение на реальном устройстве и получил приложение cra sh и, ища причину, обнаружил, что оно появляется после метода FirebaseApp.configure ().
Приложение не создает sh при запуске в симуляторе.
Cra sh:
dyld`__abort_with_payload:
0x101b0b2a4 <+0>: mov x16, #0x209
0x101b0b2a8 <+4>: svc #0x80
-> 0x101b0b2ac <+8>: b.lo 0x101b0b2c8 ; <+36>
0x101b0b2b0 <+12>: stp x29, x30, [sp, #-0x10]!
0x101b0b2b4 <+16>: mov x29, sp
0x101b0b2b8 <+20>: bl 0x101b097d8 ; cerror_nocancel
0x101b0b2bc <+24>: mov sp, x29
0x101b0b2c0 <+28>: ldp x29, x30, [sp], #0x10
0x101b0b2c4 <+32>: ret
0x101b0b2c8 <+36>: ret
С этим обратным следом:
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
* frame #0: 0x0000000101b0b2ac dyld`__abort_with_payload + 8
frame #1: 0x0000000101b12914 dyld`abort_with_payload_wrapper_internal + 104
frame #2: 0x0000000101b12948 dyld`abort_with_payload + 16
frame #3: 0x0000000101b0f77c dyld`dyld::halt(char const*) + 380
frame #4: 0x0000000101ac0778 dyld`dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 176
frame #5: 0x00000001b207963c libdyld.dylib`_dyld_fast_stub_entry(void*, long) + 80
frame #6: 0x00000001b2077b80 libdyld.dylib`dyld_stub_binder + 60
frame #7: 0x0000000100b88258 CheeseApp`__44+[UIViewController(APMScreenClassName) load]_block_invoke + 144
frame #8: 0x000000010204327c libdispatch.dylib`_dispatch_client_callout + 20
frame #9: 0x0000000102044c88 libdispatch.dylib`_dispatch_once_callout + 132
frame #10: 0x0000000100b881c4 CheeseApp`+[UIViewController(APMScreenClassName) load] + 76
frame #11: 0x00000001b1fa1500 libobjc.A.dylib`load_images + 1176
frame #12: 0x0000000101abe19c dyld`dyld::notifySingle(dyld_image_states, ImageLoader const*, ImageLoader::InitializerTimingList*) + 480
frame #13: 0x0000000101ace444 dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 556
frame #14: 0x0000000101acd094 dyld`ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 192
frame #15: 0x0000000101acd160 dyld`ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 96
frame #16: 0x0000000101abe4f8 dyld`dyld::initializeMainExecutable() + 220
frame #17: 0x0000000101ac3038 dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 4668
frame #18: 0x0000000101abd22c dyld`dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) + 432
frame #19: 0x0000000101abd038 dyld`_dyld_start + 56
AppDelegate:
import UIKit
import Firebase
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
Что я пробовал:
- Я обновил файл GoogleService-Info.plist в каталоге root
- Я обновил все библиотеки в файле pod
- Я попытался решить проблему, отключив Address Sanitizer в схеме
- Я попытался добавить файл .plist через «Добавить файлы в ...»
- Я попытался запустить метод как это:
override init() {
FirebaseApp.configure()
}
Я обновил библиотеку в 'Связанные двоичные файлы с библиотеками'
Но ничего не помогло.