I've encountered a strange problem where the FirebaseApp.configure() call causes my app to instantly crash for my unit test target. It runs just fine for my standard builds.
Any ideas why this is happening?
Here's the stack trace:
2018-04-18 11:42:57.252405+0100 Avalanche[14289:124354] 4.8.1 - [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40007000 started
2018-04-18 11:42:57.252454+0100 Avalanche[14289:124361] 4.8.1 - [Firebase/Core][I-COR000005] No app has been configured yet.
2018-04-18 11:42:57.252712+0100 Avalanche[14289:124354] 4.8.1 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://googl/RfcP7r)
2018-04-18 11:42:57.371588+0100 Avalanche[14289:124278] [Crashlytics] Version 3.9.3 (128)
2018-04-18 11:42:57.390507+0100 Avalanche[14289:124278] *** Terminating app due to uncaught exception 'FABException', reason: '[Fabric] Value of Info.plist key "Fabric" must be a NSDictionary.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000113c0a1e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x000000011329f031 objc_exception_throw + 48
2 CoreFoundation 0x0000000113c7f975 +[NSException raise:format:] + 197
3 Avalanche 0x000000010f654dec -[Fabric validFabricConfigFromInfoPlist:] + 353
4 Avalanche 0x000000010f654a16 -[Fabric fabricConfig] + 127
5 Avalanche 0x000000010f654bce -[Fabric APIKey] + 392
6 Avalanche 0x000000010f61e6d7 -[Crashlytics APIKey] + 55
7 Avalanche 0x000000010f62a087 -[CLSCrashReportingController APIKey] + 57
8 Avalanche 0x000000010f62977f -[CLSCrashReportingController startWithProfilingMark:betaToken:] + 257
9 Avalanche 0x000000010f61e088 __20-[Crashlytics start]_block_invoke + 637
10 libdispatch.dylib 0x0000000114b93779 _dispatch_client_callout + 8
11 libdispatch.dylib 0x0000000114b94c0a dispatch_once_f + 55
12 Avalanche 0x000000010f61de05 -[Crashlytics start] + 106
13 Avalanche 0x000000010f61e23a +[Crashlytics initializeIfNeeded] + 48
14 Avalanche Tests 0x0000000129cd440a __15+[Fabric with:]_block_invoke + 538
15 libdispatch.dylib 0x0000000114b93779 _dispatch_client_callout + 8
16 libdispatch.dylib 0x0000000114b94c0a dispatch_once_f + 55
17 Avalanche Tests 0x0000000129cd41ee +[Fabric with:] + 222
18 Avalanche Tests 0x0000000129cd5dea __14+[Fabric load]_block_invoke + 580
19 Foundation 0x0000000112cc0324 -[__NSObserver _doit:] + 298
20 CoreFoundation 0x0000000113ba5b8c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
21 CoreFoundation 0x0000000113ba5a65 _CFXRegistrationPost + 453
22 CoreFoundation 0x0000000113ba57a1 ___CFXNotificationPost_block_invoke + 225
23 CoreFoundation 0x0000000113b67422 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826
24 CoreFoundation 0x0000000113b665a1 _CFXNotificationPost + 609
25 Foundation 0x0000000112c80e57 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
26 Avalanche 0x000000010f6d41a7 +[FIRApp sendNotificationsToSDKs:] + 393
27 Avalanche 0x000000010f6d309e +[FIRApp configureDefaultAppWithOptions:sendingNotifications:] + 302
28 Avalanche 0x000000010f6d2eda +[FIRApp configure] + 380
29 Avalanche 0x000000010f609490 _T09Avalanche11AppDelegateCACycfc + 192
30 Avalanche 0x000000010f6094c3 _T09Avalanche11AppDelegateCACycfcTo + 19
31 UIKit 0x00000001109eb6c4 _UIApplicationMainPreparations + 1491
32 UIKit 0x00000001109eb087 UIApplicationMain + 111
33 Avalanche 0x000000010f60b447 main + 55
34 libdyld.dylib 0x0000000114c08955 start + 1
)
li
bc++abi.dylib: terminating with uncaught exception of type NSException
Before the crash, I also see a large number of log entries like:
objc[14289]: Class RCNKeyValue is implemented in both /Users/sammcneilly/Library/Developer/CoreSimulator/Devices/E62EC87E-0B07-4A83-A165-819E693AEB87/data/Containers/Bundle/Application/6C3F993F-4CEB-462F-9257-0F3C8E088BC0/Avalanche.app/Avalanche (0x10f7bdd50) and /Users/sammcneilly/Library/Developer/Xcode/DerivedData/Avalanche-ewiqmxxekhpknrhhfuyljlekgzat/Build/Products/Development-iphonesimulator/Avalanche.app/PlugIns/Avalanche Tests.xctest/Avalanche Tests (0x129e075d8). One of the two will be used. Which one is undefined.
I've installed Firebase and Firebase/Crashlytics via CocoaPods.
I'm not sure if this is related to Xcode 9.3 - this is happening on two separate projects, and I'm fairly certain it didn't happen previously for the older project.
I've printed out the bundle contents and the GoogleService-Info.plist file appears to be there.
Any help would be much appreciated!
Ok so this turned out to be caused by an incorrectly-configured Pod file.
My main target and unit test target were configured to use the following pods:
pod 'Crashlytics', '~> 3.10.1'
pod 'Fabric', '~> 1.7.6'
pod 'Firebase/Core', '~> 4.8'
pod 'FirebaseRemoteConfig', '~> 2.1'
Removing the additional Firebase pods for the test target ONLY (other than Firebase/Core) and running pod install again helped.
I'm not altogether sure why this worked, so would be very grateful if someone could explain this to me.
The "${PODS_ROOT}/Fabric/run" build phase script was configured on my primary target as detailed in Google's docs here: https://firebase.google.com/docs/crashlytics/get-started, and adding it to the test target didn't help either...
Thanks to everyone for their input, but adding the Fabric details manually to the Info.plist file just caused a build error. I believe this step is automatically handled for Firebase.
We had the same crash when running XCTest. We use the following to get around it.
if NSClassFromString("XCTest") != nil {
return true
} else {
FirebaseApp.configure()
}
Put this code in info.plist
<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>YOUR APIKEY</string>
<key>Kits</key>
<array>
<dict>
<key>KitInfo</key>
<dict/>
<key>KitName</key>
<string>Crashlytics</string>
</dict>
</array>
</dict>
Hope it's helps.!
Related
I have a problem with the IOS part of my ReactNative App. The Android part works fine. When I create an development build (eas build --profile development --platform ios) there is no problem. But the preview and production builds crash directly after opening the App. The EAS build pipelines have no problems except for one message
fatal error: module 'React' in AST file '/Users/expo/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/1XDLP1ZNNJOAB/React-ISQBUSD1JGEA.pcm' (imported by AST file '/Users/expo/Library/Developer/Xcode/DerivedData/MY_APP_NAME-hkvdfgprzzhwypayqwweanuiqofc/Build/Intermediates.noindex/ArchiveIntermediates/MY_APP_NAME/PrecompiledHeaders/MY_APP_NAME-Bridging-Header-swift_3BATV8FO0GBUP-clang_1XDLP1ZNNJOAB.pch') is not defined in any loaded module map file; maybe you need to load '/Users/expo/workingdir/build/ios/Pods/Headers/Public/React-Core/React/React-Core.modulemap'?
I’m not sure if the this is related to my problem because it doesn’t lead to a build failure and the dev Build has the same error message but doesn’t crash.
The App is already published to TestFlight. Therefore, I have the crash reports from the device.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 13
…
Thread 13 name:
Thread 13 Crashed:
0 libsystem_kernel.dylib 0x00000001e5b5a200 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001f5d971ac pthread_kill + 268 (pthread.c:1670)
2 libsystem_c.dylib 0x00000001b0951ca0 abort + 180 (abort.c:118)
3 libsystem_c.dylib 0x00000001b09a8890 __assert_rtn + 272 (assert.c:96)
4 MY_APP_NAME 0x000000010487f8d4 facebook::jsc::JSCRuntime::~JSCRuntime() + 136 (JSCRuntime.cpp:393)
5 MY_APP_NAME 0x000000010487f97c ~JSCRuntime + 4 (JSCRuntime.cpp:383)
6 MY_APP_NAME 0x000000010487f97c facebook::jsc::JSCRuntime::~JSCRuntime() + 12 (JSCRuntime.cpp:383)
7 MY_APP_NAME 0x00000001046d88f0 __release_shared + 40 (shared_ptr.h:177)
8 MY_APP_NAME 0x00000001046d88f0 __release_shared + 40 (shared_ptr.h:219)
9 MY_APP_NAME 0x00000001046d88f0 std::__1::shared_ptrfacebook::react::CallInvoker::~shared_ptr() + 64 (shared_ptr.h:959)
10 MY_APP_NAME 0x000000010488cea4 ~shared_ptr + 4 (shared_ptr.h:957)
11 MY_APP_NAME 0x000000010488cea4 facebook::react::JSIExecutor::~JSIExecutor() + 268 (JSIExecutor.h:71)
12 MY_APP_NAME 0x000000010488cd90 ~JSIExecutor + 4 (JSIExecutor.h:71)
13 MY_APP_NAME 0x000000010488cd90 facebook::react::JSIExecutor::~JSIExecutor() + 12 (JSIExecutor.h:71)
14 MY_APP_NAME 0x00000001047c9d64 operator() + 20 (function.h:505)
15 MY_APP_NAME 0x00000001047c9d64 operator() + 20 (function.h:1182)
16 MY_APP_NAME 0x00000001047c9d64 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 32 (RCTCxxUtils.mm:74)
17 MY_APP_NAME 0x00000001047d61ec facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) + 24 (RCTMessageThread.mm:69)
18 MY_APP_NAME 0x00000001047d694c operator() + 20 (function.h:505)
19 MY_APP_NAME 0x00000001047d694c operator() + 20 (function.h:1182)
20 MY_APP_NAME 0x00000001047d694c operator() + 24 (RCTMessageThread.mm:61)
21 MY_APP_NAME 0x00000001047d694c __invoke<(lambda at /Users/expo/workingdir/build/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:60:12) &> + 24 (type_traits:3918)
22 MY_APP_NAME 0x00000001047d694c __call<(lambda at /Users/expo/workingdir/build/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:60:12) &> + 24 (invoke.h:61)
23 MY_APP_NAME 0x00000001047d694c operator() + 24 (function.h:178)
24 MY_APP_NAME 0x00000001047d694c std::__1::__function::__func<facebook::react::RCTMessageThread::runSync(std::__1::function<void ()>)::$_0, std::__1::allocator<facebook::react::RCTMessageThread::runSync(std::__1::function<void ()>… + 40 (function.h:352)
25 MY_APP_NAME 0x00000001047d5fa0 operator() + 20 (function.h:505)
26 MY_APP_NAME 0x00000001047d5fa0 operator() + 20 (function.h:1182)
27 MY_APP_NAME 0x00000001047d5fa0 invocation function for block in facebook::react::RCTMessageThread::runAsync(std::__1::function<void ()>) + 44 (RCTMessageThread.mm:45)
28 CoreFoundation 0x00000001a94ab924 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 28 (CFRunLoop.c:1822)
29 CoreFoundation 0x00000001a95140ac __CFRunLoopDoBlocks + 368 (CFRunLoop.c:1864)
30 CoreFoundation 0x00000001a94e4508 __CFRunLoopRun + 2452 (CFRunLoop.c:3218)
31 CoreFoundation 0x00000001a94e91e4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3390)
32 MY_APP_NAME 0x00000001047bf398 +[RCTCxxBridge runRunLoop] + 264 (RCTCxxBridge.mm:378)
33 Foundation 0x00000001a3912ce8 NSThread__start + 716 (NSThread.m:968)
34 libsystem_pthread.dylib 0x00000001f5d916cc _pthread_start + 148 (pthread.c:893)
35 libsystem_pthread.dylib 0x00000001f5d90ba4 thread_start + 8
…
Expo: 45
Workflow: bare
eas-cli: 2.5.1
During search I tried to replace a lot of code in the AppDelegate.mm I found for this problem. Also from a freshly created and ejected Expo 45 example project.
When replacing almost the entire code from the App.tsx with a simple Text it works.
Furthermore, expo run:ios and npx expo start --no-dev --minify have also no problems.
I hope some of you have an idea how to solve this. I’m stuck on this Issue for some time now. If you need additional information, ask in the comments.
The problem was solved by enabling hermes in the Podfile with :hermes_enabled => true
I'm trying to get the FlutterFire Database working on the iOS part (it works fine on Android) of my application, but I'm getting some error messages saying that my GoogleService-Info.plist file is no where to be found. But I'm pretty sure it is placed correctly in my project.
This is the console output:
[Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure] to your application initialization. Read more: https://firebase.google.com/docs/ios/setup#initialize_firebase_in_your_app.
[Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
[Firebase/Core][I-COR000005] No app has been configured yet.
*** Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure] could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ccad34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010c70e21e objc_exception_throw + 48
2 CoreFoundation 0x000000010cd16265 +[NSException raise:format:] + 197
3 Runner 0x0000000109bdeb67 +[FIRApp configure] + 353
4 Runner 0x0000000109b79979 -[FirebaseDatabasePlugin init] + 185
5 Runner 0x0000000109b79838 +[FirebaseDatabasePlugin registerWithRegistrar:] + 168
6 Runner 0x0000000109b765e9 +[GeneratedPluginRegistrant registerWithRegistry:] + 121
7 Runner 0x0000000109b76473 -[AppDelegate application:didFinishLaunchingWithOptions:] + 99
8 UIKit 0x000000010d0c70be -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290
9 UIKit 0x000000010d0c8a43 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236
10 UIKit 0x000000010d0cede9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
11 UIKit 0x000000010d0cbf69 -[UIApplication workspaceDidEndTransaction:] + 188
12 FrontBoardServices 0x0000000110fd4723 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
13 FrontBoardServices 0x0000000110fd459c -[FBSSerialQueue _performNext] + 189
14 FrontBoardServices 0x0000000110fd4925 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
15 CoreFoundation 0x000000010cc52311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
16 CoreFoundation 0x000000010cc3759c __CFRunLoopDoSources0 + 556
17 CoreFoundation 0x000000010cc36a86 __CFRunLoopRun + 918
18 CoreFoundation 0x000000010cc36494 CFRunLoopRunSpecific + 420
19 UIKit 0x000000010d0ca7e6 -[UIApplication _run] + 434
20 UIKit 0x000000010d0d0964 UIApplicationMain + 159
21 Runner 0x0000000109b7654f main + 111
22 libdyld.dylib 0x000000010ea9d68d start + 1
23 ??? 0x0000000000000008 0x0 + 8
)
And here is a screenshot of my project tree:
I'm trying this in the GeoFire plugin example folder, which can be found here: https://github.com/bramvbilsen/Flutter-GeoFire/tree/master/example I'd love to hear whether you guys have more luck and a possible solution of course!
Alright, I found the solution!
Apparently Xcode 9 doesn't add the file to your actual project!
This can be fixed be clicking on the GoogleServices-info.plist file
Checking the Runner project in the Target Membership tab
I'm trying to create a basic React Native app. While I can create the project, it will not run inside the simulator.
After the app loads, it immediately quits. If I remove node_modules and do npm install to download all the modules fresh, I will see the app reload the Javascript. Then when it hits 100%, it immediately quits again.
The steps I used to create the app are as follows:
$ react-native init demo1
$ cd demo1
$ react-native run-ios
That's literally it. I'm using the following versions of tools:
$ node --version
v6.11.2
$ npm --version
3.10.10
$ react-native --version
react-native-cli: 2.0.1
react-native: 0.48.0
The full log is here. What am I doing wrong?
Investigating this more, it turns out the Xcode project fails with a stack trace:
2017-09-02 13:03:00.775 [info][tid:main][RCTCxxBridge.mm:188] Initializing <RCTCxxBridge: 0x6080001a2ae0> (parent: <RCTBridge: 0x6000000a1f80>, executor: (null))
2017-09-02 13:03:00.804 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-09-02 13:03:00.825 [info][tid:main][RCTRootView.m:301] Running application r1 ({
initialProps = {
};
rootTag = 1;
})
2017-09-02 13:03:00.960 r1[47802:5600672] -[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa313434323930327
2017-09-02 13:03:00.977 r1[47802:5600672] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa313434323930327'
*** First throw call stack:
(
0 CoreFoundation 0x000000010e094b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010cf4a141 objc_exception_throw + 48
2 CoreFoundation 0x000000010e104134 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010e01b840 ___forwarding___ + 1024
4 CoreFoundation 0x000000010e01b3b8 _CF_forwarding_prep_0 + 120
5 r1 0x000000010c301394 -[RCTMultipartStreamReader emitProgress:contentLength:final:callback:] + 244
6 r1 0x000000010c301b8a -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1610
7 r1 0x000000010c3514bc -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 444
8 CFNetwork 0x000000010daf4c51 __88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke + 51
9 Foundation 0x000000010ca543b7 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
10 Foundation 0x000000010ca540bb -[NSBlockOperation main] + 101
11 Foundation 0x000000010ca52877 -[__NSOperationInternal _start:] + 627
12 Foundation 0x000000010ca4e5fc __NSOQSchedule_f + 198
13 libdispatch.dylib 0x0000000111d7605c _dispatch_client_callout + 8
14 libdispatch.dylib 0x0000000111d5494f _dispatch_queue_serial_drain + 221
15 libdispatch.dylib 0x0000000111d55669 _dispatch_queue_invoke + 1084
16 libdispatch.dylib 0x0000000111d57ec4 _dispatch_root_queue_drain + 634
17 libdispatch.dylib 0x0000000111d57bef _dispatch_worker_thread3 + 123
18 libsystem_pthread.dylib 0x000000011210d5a2 _pthread_wqthread + 1299
19 libsystem_pthread.dylib 0x000000011210d07d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Is this some sort of bug or is this something I did?
This seems to be a 0.48 issue. Try using 0.47.1 and you should be fine.
react-native init demo1 --version react-native#0.47.1
This issue has been fixed in RN 0.48.1. If you create a new project (as of September 4, 2017) you shouldn't run into this issue.
2016-10-28 16:59:42.288 HuaYang[16997:681263] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[HYNewGiftInfoModel id]: unrecognized selector sent to instance 0x6080000f8200'
*** First throw call stack:
(
0 CoreFoundation 0x000000010efa834b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010dfb821e objc_exception_throw + 48
2 CoreFoundation 0x000000010f017f34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010ef2dc15 ___forwarding___ + 1013
4 CoreFoundation 0x000000010ef2d798 _CF_forwarding_prep_0 + 120
5 HuaYang 0x000000010abdecdb HuaYang + 4332763
6 HuaYang 0x000000010ab7a99e HuaYang + 3922334
7 UIKit 0x0000000111d5edd0 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:] + 467
8 UIKit 0x0000000111d5ebf7 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:] + 35
9 UIKit 0x0000000111d640cf -[UICollectionView _updateVisibleCellsNow:] + 4803
10 UIKit 0x0000000111d69d63 -[UICollectionView layoutSubviews] + 313
11 UIKit 0x00000001114e1344 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237
12 QuartzCore 0x000000011115ccdc -[CALayer layoutSublayers] + 146
13 QuartzCore 0x00000001111507a0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
14 QuartzCore 0x000000011115061e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
15 QuartzCore 0x00000001110de62c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 280
16 QuartzCore 0x000000011110b713 _ZN2CA11Transaction6commitEv + 475
17 UIKit 0x0000000111416067 _UIApplicationFlushRunLoopCATransactionIfTooLate + 206
18 UIKit 0x0000000111c25b30 __handleEventQueue + 5672
19 CoreFoundation 0x000000010ef4d311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
20 CoreFoundation 0x000000010ef32517 __CFRunLoopDoSources0 + 423
21 CoreFoundation 0x000000010ef31a86 __CFRunLoopRun + 918
22 CoreFoundation 0x000000010ef31494 CFRunLoopRunSpecific + 420
23 GraphicsServices 0x0000000113b50a6f GSEventRunModal + 161
24 UIKit 0x000000011141cf34 UIApplicationMain + 159
25 HuaYang 0x000000010a9514cf HuaYang + 1656015
26 libdyld.dylib 0x0000000112db968d start + 1
5 HuaYang 0x000000010abdecdb HuaYang + 4332763
My own code has no function name, while the system library has.
Is there any xcode build switch I need to turn on to show the symbol while my app crash?
Steps to analyze crash report from apple:
Copy the release .app file which was pushed to the appstore, the .dSYM file that was created at the time of release and the crash report receive from APPLE into a FOLDER.
OPEN terminal application and go to the folder created above (using cd command)
Run atos -arch armv7 -o APPNAME.app/APPNAME MEMORY_LOCATION_OF_CRASH. The memory location should be the one at which the app crashed as per the report.
Ex: atos -arch armv7 -o 'APPNAME.app'/'APPNAME' 0x0003b508
This would show you the exact line, method name which resulted in crash.
Ex: [classname functionName:]; -510
Symbolicating IPA
if we use IPA for symbolicating - just rename the extention .ipa with .zip , extract it then we can get a Payload Folder which contain app. In this case we don't need .dSYM file.
Note
This can only work if the app binary does not have symbols stripped. By default release builds stripped the symbols. We can change it in project build settings "Strip Debug Symbols During Copy" to NO.
More details see this post
You can choose "Exception Breakpoint..." in Breakpoint panel, and then choose "All exceptions".
I did a manually install of the Firebase SDK to my iOS project. Following the instruction from README.md
I included all the files from the Analytics folder:
FirebaseAnalytics.framework
FirebaseInstanceID.framework
GoogleInterchangeUtilities.framework
GoogleSymbolUtilities.framework
GoogleUtilities.framework
And I included "import FirebaseAnalytics" to my AppDelegate. and then I called:
FIRApp.configure()
But Xcode is still telling me this:
*** Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure] Firebase Analytics is not available.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000104178d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000106761deb objc_exception_throw + 48
2 CoreFoundation 0x0000000104178cbd +[NSException raise:format:] + 205
3 helloworld 0x0000000103f17190 -[FIRApp configureCore] + 325
4 helloworld 0x0000000103f16bb1 +[FIRApp addAppToAppDictionary:] + 100
5 helloworld 0x0000000103f162e2 +[FIRApp configureDefaultAppWithOptions:sendingNotifications:] + 268
6 helloworld 0x0000000103f16027 +[FIRApp configure] + 302
7 helloworld 0x0000000103ee9d81 _TFC6mognet11AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryCSo8NSObjectPs9AnyObject____Sb + 97
8 helloworld 0x0000000103ee9ea4 _TToFC6mognet11AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryCSo8NSObjectPs9AnyObject____Sb + 180
9 UIKit 0x00000001051a49ac -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
10 UIKit 0x00000001051a5c0d -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415
11 UIKit 0x00000001051ac568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
12 UIKit 0x00000001051a9714 -[UIApplication workspaceDidEndTransaction:] + 188
13 FrontBoardServices 0x00000001091bd8c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
14 FrontBoardServices 0x00000001091bd741 -[FBSSerialQueue _performNext] + 178
15 FrontBoardServices 0x00000001091bdaca -[FBSSerialQueue _performNextFromRunLoopSource] + 45
16 CoreFoundation 0x000000010409e301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17 CoreFoundation 0x000000010409422c __CFRunLoopDoSources0 + 556
18 CoreFoundation 0x00000001040936e3 __CFRunLoopRun + 867
19 CoreFoundation 0x00000001040930f8 CFRunLoopRunSpecific + 488
20 UIKit 0x00000001051a8f21 -[UIApplication _run] + 402
21 UIKit 0x00000001051adf09 UIApplicationMain + 171
22 helloworld 0x0000000103eea832 main + 114
23 libdyld.dylib 0x000000010722592d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
What am I doing wrong here? FYI. I am running Xcode Version 7.3.1 and I have the latest SDK.
Did you add the -ObjC flag in "Other Linking Flags" setting? When I did this in my Objective-C project, the app stopped crashing when trying to load Firebase. I also included all the Firebase files, used the Firebase.h header and [FIRApp configure] to call Firebase.
I am running Xcode 8.