Firebase App crashed on launch when made active from background - ios

I have a Firebase integrated to my swift app. All the initialisation done is programmatically and the FirebaseApp.config() is called the very first thing in didLaunchWithOptions in the AppDelegate.
But for some random reason, whenever the app is in the background for a long time, the app just crashes on the run, i.e making it's state active.
Interestingly, this crash happens exactly 2 times in the following flow:
1. The App is idle in background
2. You bring it to the active mode(You just tap the icon to open the app. All this while the app isn't killed)
3. Tap 1 ---- The App Crashes----
4. Tap 2 ---- The App Crashes----
5. Tap 3 ---- The App Runs Normally ----
I tried to troubleshoot but all my efforts have gone in vain. I have tried setting up both the storyboards and programmatically launching app. Nothing works.
Following is the stack trace :
SpotMi-Dev[74741:2958059] *** Terminating app due to uncaught exception 'FIRAppNotConfigured', reason: 'Failed to get default Firebase Database instance. Must call `[FIRApp configure]` (`FirebaseApp.configure()` in Swift) before using Firebase Database.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010d3816fb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010c14aac5 objc_exception_throw + 48
2 CoreFoundation 0x000000010d381555 +[NSException raise:format:] + 197
3 SpotMi-Dev 0x0000000101be5ba1 +[FIRDatabase database] + 97
4 SpotMi-Dev 0x0000000101aaba6b $s10SpotMi_Dev13FBDataserviceCACycfc + 59
5 SpotMi-Dev 0x0000000101aac193 $s10SpotMi_Dev13FBDataserviceCACycfcTo + 19
6 SpotMi-Dev 0x0000000101aa696c $s10SpotMi_Dev13FBDataserviceCACycfC + 44
7 SpotMi-Dev 0x0000000101aa692c globalinit_33_8263DB418F9D5BC81149F56895386F46_func0 + 28
8 libdispatch.dylib 0x000000010ecaddb5 _dispatch_client_callout + 8
9 libdispatch.dylib 0x000000010ecaf83d _dispatch_once_callout + 66
10 libswiftCore.dylib 0x000000010e2c6579 swift_once + 25
11 SpotMi-Dev 0x0000000101aa69f4 $s10SpotMi_Dev13FBDataserviceC2dsACvau + 36
12 SpotMi-Dev 0x000000010180b013 $s10SpotMi_Dev9ProfileVCC18initializeUserPostyyF + 179
13 SpotMi-Dev 0x0000000101809278 $s10SpotMi_Dev9ProfileVCC11viewDidLoadyyF + 616
14 SpotMi-Dev 0x00000001018095b4 $s10SpotMi_Dev9ProfileVCC11viewDidLoadyyFTo + 36
15 UIKitCore 0x000000011589443b -[UIViewController loadViewIfRequired] + 1183
16 UIKitCore 0x0000000115894868 -[UIViewController view] + 27
17 UIKitCore 0x0000000115ebd4ad -[UIApplication(StateRestoration) _restoreApplicationPreservationStateWithSessionIdentifier:beginHandler:completionHandler:] + 6413
18 UIKitCore 0x0000000115eb8fdc -[UIApplication(StateRestoration) _doRestorationIfNecessary] + 211
19 UIKitCore 0x0000000115e8e2c9 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 208
20 UIKitCore 0x0000000115e8fcad -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3932
21 UIKitCore 0x0000000115e950c6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1617
22 UIKitCore 0x00000001156da6d6 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 904
23 UIKitCore 0x00000001156e2fce +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
24 UIKitCore 0x00000001156da2ec -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
25 UIKitCore 0x00000001156dac48 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1091
26 UIKitCore 0x00000001156d8fba __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 782
27 UIKitCore 0x00000001156d8c71 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
28 UIKitCore 0x00000001156dd9b6 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 576
29 UIKitCore 0x00000001156de610 _performActionsWithDelayForTransitionContext + 100
30 UIKitCore 0x00000001156dd71d -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
31 UIKitCore 0x00000001156e26d0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
32 UIKitCore 0x0000000115e939a8 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 514
33 UIKitCore 0x0000000115a4adfa -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
34 FrontBoardServices 0x00000001133a4125 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
35 FrontBoardServices 0x00000001133aded6 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 283
36 FrontBoardServices 0x00000001133ad700 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
37 libdispatch.dylib 0x000000010ecaddb5 _dispatch_client_callout + 8
38 libdispatch.dylib 0x000000010ecb12ba _dispatch_block_invoke_direct + 300
39 FrontBoardServices 0x00000001133df146 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
40 FrontBoardServices 0x00000001133dedfe -[FBSSerialQueue _performNext] + 451
41 FrontBoardServices 0x00000001133df393 -[FBSSerialQueue _performNextFromRunLoopSource] + 42
42 CoreFoundation 0x000000010d2e8be1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
43 CoreFoundation 0x000000010d2e8463 __CFRunLoopDoSources0 + 243
44 CoreFoundation 0x000000010d2e2b1f __CFRunLoopRun + 1231
45 CoreFoundation 0x000000010d2e2302 CFRunLoopRunSpecific + 626
46 GraphicsServices 0x000000011034e2fe GSEventRunModal + 65
47 UIKitCore 0x0000000115e96ba2 UIApplicationMain + 140
48 SpotMi-Dev 0x000000010174287b main + 75
49 libdyld.dylib 0x000000010ed22541 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Following is the code from didLaunchWithOptions:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
#if DEVELOPMENT
print("Development Mode Started")
#else
print("Production Mode Started")
#endif
FirebaseApp.configure()
Messaging.messaging().delegate = self
//other app functions
return true
}
I am calling the Firebase API in the viewDidLoad of init controller. And this is the Service through which it gets called and this even contains the crash aswell.
class FBDataservice : NSObject {
static var ds = FBDataservice() //<------ Creates Error here on every single crash related to this issue
let DB_URL: DatabaseReference = Database.database().reference()
let ST_URL: StorageReference = Storage.storage().reference()
private lazy var _REF_BASE = DB_URL
}
And then I just call FBDataservice.ds._REF_BASE.child("something").observe( .Event, with (Datasnapshot)) in the viewDidLoad or viewDidAppear. I am just mostly fetching the data. And then push data like updating app RunCounts on didBecameActive in AppDelegate
Any help will immensely be appreciated. Cheers

Check FirebaseApp.app() if this is nil can you call the FirebaseApp.configure() again? You need to debug if this crashes in appDidBecomeActive: or didEneterInForeground: method.
Also please check where you use FirebaseDatabase at very first time after launching the application except the configuration line? I mean is in any ViewController or anywhere, we need to check the condition here.
Updated Question:
Regarding your updated question FBDataservice() where are you making its instance because as you create its instance it will create DB_URL and ST_URL url instances which are related to Firebase so probably Firebase is not configured before this. You can override its init method to check if Firebase is configured or not.
You took two variables which will be create in constructor whenever you will make an instance of this class.
Try one thing... replace
static var ds = FBDataservice()
with
static var ds: FBDataservice {
if FirebaseApp.app() == nil {
FirebaseApp.configure()
}
return FBDataservice()
}

Related

The service configuration is `nil`. You need to configure `Info.plist` or set `defaultServiceConfiguration` before using this method

I'm trying to connect an existing AppSync API to my iOS app.
To perform this, I followed the instructions on this page: https://docs.amplify.aws/cli/graphql-transformer/codegen#ios-usage, but instead of performing:
amplify add api
amplify push
I added my existing AppSync API:
amplify add codegen --apiId XXXXXXXXXXXXXXX
amplify codegen
After running those commands, I added awsconfiguration.json and API.swift to my project.
After performing the setup, I initialized the AppSync client in the AppDelegate file:
import AWSAppSync
#UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var appSyncClient: AWSAppSyncClient?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
do {
// You can choose your database location if you wish, or use the default
let cacheConfiguration = try AWSAppSyncCacheConfiguration()
// AppSync configuration & client initialization
let appSyncConfig = try AWSAppSyncClientConfiguration(appSyncServiceConfig: AWSAppSyncServiceConfig(), cacheConfiguration: cacheConfiguration)
appSyncClient = try AWSAppSyncClient(appSyncConfig: appSyncConfig)
} catch {
print("Error initializing appsync client. \(error)")
}
}
}
It's worth mentioning that I'm using AWS SDK (for DynamoDB using Object Mapper) in my app (the previous SDK, not Amplify yet)
The problem is that when I'm running the app, it immediately crashes.
This is the log message that comes along with the crash:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The service configuration is `nil`. You need to configure `Info.plist` or set `defaultServiceConfiguration` before using this method.'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c7127e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 AWSDynamoDB 0x000000010be77baa __54+[AWSDynamoDBObjectMapper defaultDynamoDBObjectMapper]_block_invoke + 474
3 libdispatch.dylib 0x000000010cb04d48 _dispatch_client_callout + 8
4 libdispatch.dylib 0x000000010cb06297 _dispatch_once_callout + 66
5 AWSDynamoDB 0x000000010be779a4 +[AWSDynamoDBObjectMapper defaultDynamoDBObjectMapper] + 84
6 App 0x000000010a7d0f9c $s22App10GlobalVarsCACycfc + 140
7 App 0x000000010a7ca97c $s22App10GlobalVarsCACycfC + 60
8 App 0x000000010a7fd7e1 $s22App21LoadingViewControllerC5coderACSgSo7NSCoderC_tcfc + 113
9 App 0x000000010a7fd943 $s22App21LoadingViewControllerC5coderACSgSo7NSCoderC_tcfcTo + 51
10 UIKitCore 0x00007fff47cf7268 -[UIClassSwapper initWithCoder:] + 2427
11 UIFoundation 0x00007fff4753d872 UINibDecoderDecodeObjectForValue + 744
12 UIFoundation 0x00007fff4753db19 UINibDecoderDecodeObjectForValue + 1423
13 UIFoundation 0x00007fff4753d57d -[UINibDecoder decodeObjectForKey:] + 251
14 UIKitCore 0x00007fff47cf6531 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsAndTrackChildViewControllerIndexWithParent:forKey:] + 298
15 UIKitCore 0x00007fff47a0e65d -[UIViewController initWithCoder:] + 1419
16 UIKitCore 0x00007fff4795cc16 -[UINavigationController initWithCoder:] + 65
17 UIKitCore 0x00007fff47cf7268 -[UIClassSwapper initWithCoder:] + 2427
18 UIFoundation 0x00007fff4753d872 UINibDecoderDecodeObjectForValue + 744
19 UIFoundation 0x00007fff4753d57d -[UINibDecoder decodeObjectForKey:] + 251
20 UIKitCore 0x00007fff47cfb56f -[UIRuntimeConnection initWithCoder:] + 125
21 UIFoundation 0x00007fff4753d872 UINibDecoderDecodeObjectForValue + 744
22 UIFoundation 0x00007fff4753db19 UINibDecoderDecodeObjectForValue + 1423
23 UIFoundation 0x00007fff4753d57d -[UINibDecoder decodeObjectForKey:] + 251
24 UIKitCore 0x00007fff47cf6336 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 450
25 UIKitCore 0x00007fff47cf90a5 -[UINib instantiateWithOwner:options:] + 1145
26 UIKitCore 0x00007fff481f8f24 -[UIStoryboard __reallyInstantiateViewControllerWithIdentifier:creator:storyboardSegueTemplate:sender:] + 279
27 UIKitCore 0x00007fff481f8dcf -[UIStoryboard _instantiateViewControllerWithIdentifier:creator:storyboardSegueTemplate:sender:] + 97
28 UIKitCore 0x00007fff48091ebf -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 167
29 UIKitCore 0x00007fff48092473 -[UIApplication _loadMainInterfaceFile] + 274
30 UIKitCore 0x00007fff48090dff -[UIApplication _runWithMainScene:transitionContext:completion:] + 964
31 UIKitCore 0x00007fff477c576d -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
32 UIKitCore 0x00007fff47cb44c1 _UIScenePerformActionsWithLifecycleActionMask + 83
33 UIKitCore 0x00007fff477c627f __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
34 UIKitCore 0x00007fff477c5c8e -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 296
35 UIKitCore 0x00007fff477c60ac -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 818
36 UIKitCore 0x00007fff477c5941 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
37 UIKitCore 0x00007fff477c9f3f __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 178
38 UIKitCore 0x00007fff47bd8c83 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 865
39 UIKitCore 0x00007fff47cd2dff _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
40 UIKitCore 0x00007fff477c9c5a __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153
41 UIKitCore 0x00007fff47cd2d02 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84
42 UIKitCore 0x00007fff477c9ac8 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381
43 UIKitCore 0x00007fff476206e7 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657
44 UIKitCore 0x00007fff4761f26c -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
45 UIKitCore 0x00007fff47620411 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210
46 UIKitCore 0x00007fff4808f599 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 535
47 UIKitCore 0x00007fff47bfa7f5 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
48 FrontBoardServices 0x00007fff365d6165 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 442
49 FrontBoardServices 0x00007fff365fc4d8 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102
50 FrontBoardServices 0x00007fff365e0c45 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
51 FrontBoardServices 0x00007fff365fc169 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355
52 libdispatch.dylib 0x000000010cb04d48 _dispatch_client_callout + 8
53 libdispatch.dylib 0x000000010cb07cb9 _dispatch_block_invoke_direct + 300
54 FrontBoardServices 0x00007fff3662237e __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
55 FrontBoardServices 0x00007fff3662206c -[FBSSerialQueue _queue_performNextIfPossible] + 441
56 FrontBoardServices 0x00007fff3662257b -[FBSSerialQueue _performNextFromRunLoopSource] + 22
57 CoreFoundation 0x00007fff23bd4471 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
58 CoreFoundation 0x00007fff23bd439c __CFRunLoopDoSource0 + 76
59 CoreFoundation 0x00007fff23bd3b74 __CFRunLoopDoSources0 + 180
60 CoreFoundation 0x00007fff23bce87f __CFRunLoopRun + 1263
61 CoreFoundation 0x00007fff23bce066 CFRunLoopRunSpecific + 438
62 GraphicsServices 0x00007fff384c0bb0 GSEventRunModal + 65
63 UIKitCore 0x00007fff48092d4d UIApplicationMain + 1621
64 App 0x000000010a841728 main + 72
65 libdyld.dylib 0x00007fff5227ec25 start + 1
66 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Apparently, because I'm using the old version of AWS SDK for iOS, I couldn't use both awsconfiguration.json file and the AWS section in Info.plist file.
In order to solve it, I removed the awsconfiguration.json file from Build Phases -> Copy Bundle Resources, and added the AppSync API details from that file to the Info.plist file:
<key>AWS</key>
<dict>
<key>AppSync</key>
<dict>
<key>Default</key>
<dict>
<key>ApiUrl</key>
<string>https://XXXXXXXXXXXXX.appsync-api.xx-xxxx-x.amazonaws.com/graphql</string>
<key>Region</key>
<string>xx-xxxx-x</string>
<key>AuthMode</key>
<string>API_KEY</string>
<key>ApiKey</key>
<string>XXXXXXXXXXXXX</string>
<key>ClientDatabasePrefix</key>
<string>XXXXXXXX_API_KEY
</dict>
</dict>
...
</dict>

Flutter iOS App crashes in Xcode, when adding FirebaseApp.configure() to implement Firebase integration

I am trying to follow the steps to connect Firebase to an iOS App generated by Flutter.
In the final step, when adding the line FirebaseApp.configure() into the AppDelegate.swift file, the App builds OK, but then crashes upon execution, indicating a Signal Abortion on Thread 1...
Thread 1: signal SIGABRT
The code in AppDelegate.swift is the following:
import UIKit
import Flutter
import Firebase
#UIApplicationMain
#objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
FirebaseApp.configure()
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
};
}
The full Error log provided by Xcode is the following:
2019-11-18 07:11:34.664822-0500 Runner[82048:876634] - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2019-11-18 07:11:34.849351-0500 Runner[82048:876630] 6.13.0 - [Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
2019-11-18 07:11:34.860414-0500 Runner[82048:876433] *** Terminating app due to uncaught exception 'com.firebase.core', reason: '`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) 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 0x00007fff23c4f02e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50b97b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c4ee6c +[NSException raise:format:] + 188
3 Runner 0x00000001040bf51a +[FIRApp configure] + 138
4 Runner 0x00000001040baea4 $s6Runner11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtF + 212
5 Runner 0x00000001040bb1f4 $s6Runner11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtFTo + 212
6 UIKitCore 0x00007fff47846788 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232
7 UIKitCore 0x00007fff47848197 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3980
8 UIKitCore 0x00007fff4784dce6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1281
9 UIKitCore 0x00007fff46f843c9 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
10 UIKitCore 0x00007fff47471be1 _UIScenePerformActionsWithLifecycleActionMask + 83
11 UIKitCore 0x00007fff46f84edb __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
12 UIKitCore 0x00007fff46f848ea -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 296
13 UIKitCore 0x00007fff46f84d08 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 818
14 UIKitCore 0x00007fff46f8459d -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
15 UIKitCore 0x00007fff46f88bcb __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 178
16 UIKitCore 0x00007fff4739769b +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 865
17 UIKitCore 0x00007fff4749051f _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
18 UIKitCore 0x00007fff46f888e6 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153
19 UIKitCore 0x00007fff47490422 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84
20 UIKitCore 0x00007fff46f88754 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381
21 UIKitCore 0x00007fff46ddf123 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657
22 UIKitCore 0x00007fff46dddca8 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
23 UIKitCore 0x00007fff46ddee4d -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210
24 UIKitCore 0x00007fff4784c343 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 535
25 UIKitCore 0x00007fff473b920d -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
26 FrontBoardServices 0x00007fff36555225 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 442
27 FrontBoardServices 0x00007fff3657b598 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102
28 FrontBoardServices 0x00007fff3655fd05 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
29 FrontBoardServices 0x00007fff3657b229 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355
30 libdispatch.dylib 0x00000001070ebd48 _dispatch_client_callout + 8
31 libdispatch.dylib 0x00000001070eecb9 _dispatch_block_invoke_direct + 300
32 FrontBoardServices 0x00007fff365a143e __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
33 FrontBoardServices 0x00007fff365a112c -[FBSSerialQueue _queue_performNextIfPossible] + 441
34 FrontBoardServices 0x00007fff365a163b -[FBSSerialQueue _performNextFromRunLoopSource] + 22
35 CoreFoundation 0x00007fff23bb2221 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
36 CoreFoundation 0x00007fff23bb214c __CFRunLoopDoSource0 + 76
37 CoreFoundation 0x00007fff23bb1924 __CFRunLoopDoSources0 + 180
38 CoreFoundation 0x00007fff23bac62f __CFRunLoopRun + 1263
39 CoreFoundation 0x00007fff23babe16 CFRunLoopRunSpecific + 438
40 GraphicsServices 0x00007fff38438bb0 GSEventRunModal + 65
41 UIKitCore 0x00007fff4784fb48 UIApplicationMain + 1621
42 Runner 0x00000001040bb45b main + 75
43 libdyld.dylib 0x00007fff51a1dc25 start + 1
44 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
A very interesting line in the above Error log:
Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure]; (FirebaseApp.configure() in Swift) could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.'
So...
That message clearly suggests that there may be some issue with the GoogleService-Info.plist, like if it wasn't present... except that it IS indeed present, freshly downloaded from Firebase, it is located in the correct folder, and I have thoroughly reviewed the contents of the plist to verify the Bundle ID, Team ID and all other info is correct...
May anyone kindly please offer some suggestion to solve this problem?
THANKS
To check that you have included the file in your target do the following
Click on the file that you are checking
Click on the file inspector
Check that the file is included in your required target. Most apps only have one target.
When I attempted to add the FirebaseApp.configure() statement to my AppDelegate.swift file, the project would no longer build. So I removed those statements and continued on with the Firebase/Analytics setup. My app was able to eventually communicate with the Firebase server without that statement. It looks like the firebase plugins must be doing that for us. I added both firebase_core and firebase_analytics to my pubspec.yaml as:
firebase_core: ^0.4.0+9
firebase_analytics:

xcode iOS App Crashes after the renaming of view controller

Outlets Crash at Entry Crash Image Screenshot
I am getting an crash after I renamed my View Controller . Swift file to CalculatorViewController.swift
I also tried refactoring new class name to be mirrored across all ports of entry to the app. I am getting Abort Signal Error. Please do help with this one! This is my error
UPDATE: ERROR IN queue com.apple.mainthread (serial) Thread 1
Crash point in code
class AppDelegate: UIResponder, UIApplicationDelegate {
UPDATE.
2019-03-11 15:36:01.990755+0530 NDv2[4619:144763] Unknown class
CalculatorViewController in Interface Builder file. 2019-03-11
15:36:02.040903+0530 NDv2[4619:144763] * Terminating app due to
uncaught exception 'NSUnknownKeyException', reason:
'[ setValue:forUndefinedKey:]: this
class is not key value coding-compliant for the key TextOutput.'
* First throw call stack: ( 0 CoreFoundation 0x000000010ef3e1bb exceptionPreprocess + 331 1 libobjc.A.dylib
0x000000010cf58735 objc_exception_throw + 48 2 CoreFoundation
0x000000010ef3dd29 -[NSException raise] + 9 3 Foundation
0x000000010c983de4 -[NSObject(NSKeyValueCoding) setValue:forKey:] +
292 4 UIKitCore 0x00000001113a3292
-[UIViewController setValue:forKey:] + 87 5 UIKitCore 0x000000011163a573 -[UIRuntimeOutletConnection connect] + 109 6
CoreFoundation 0x000000010ef29cfd -[NSArray
makeObjectsPerformSelector:] + 317 7 UIKitCore
0x00000001116372b9 -[UINib instantiateWithOwner:options:] + 1814 8
UIKitCore 0x00000001113aa452
-[UIViewController _loadViewFromNibNamed:bundle:] + 383 9 UIKitCore 0x00000001113aaddc -[UIViewController loadView] + 177 10 UIKitCore
0x00000001113ab0ee -[UIViewController loadViewIfRequired] + 175 11
UIKitCore 0x00000001113ab940
-[UIViewController view] + 27 12 UIKitCore 0x0000000111a02c53 -[UIWindow addRootViewControllerViewIfPossible] +
122 13 UIKitCore 0x0000000111a0336e
-[UIWindow _setHidden:forced:] + 294 14 UIKitCore 0x0000000111a165c0 -[UIWindow makeKeyAndVisible] + 42 15 UIKitCore
0x00000001119c3833 -[UIApplication
_callInitializationDelegatesForMainScene:transitionContext:] + 4595 16 UIKitCore 0x00000001119c8c2f
-[UIApplication _runWithMainScene:transitionContext:completion:] + 1623 17 UIKitCore 0x00000001111e74e9
__111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke
+ 866 18 UIKitCore 0x00000001111f029c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153 19 UIKitCore 0x00000001111e7126
-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 233 20 UIKitCore 0x00000001111e7ae0
-[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1085 21 UIKitCore
0x00000001111e5cb5 __82-[_UIApplicationCanvas
_transitionLifecycleStateWithTransitionContext:completion:]_block_invoke
+ 795 22 UIKitCore 0x00000001111e595f -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 435 23 UIKitCore 0x00000001111eaa90
__125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke
+ 584 24 UIKitCore 0x00000001111eb80e _performActionsWithDelayForTransitionContext + 100 25 UIKitCore 0x00000001111ea7ef -[_UICanvasLifecycleSettingsDiffAction
performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]
+ 221 26 UIKitCore 0x00000001111ef93a -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392 27 UIKitCore 0x00000001119c744e
-[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515 28
UIKitCore 0x000000011156bd09
-[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 357 29
FrontBoardServices 0x000000011a0fc2da -[FBSSceneImpl
_didCreateWithTransitionContext:completion:] + 448 30 FrontBoardServices 0x000000011a107443
__56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 271 31
FrontBoardServices 0x000000011a106b3a
__40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53 32 libdispatch.dylib 0x000000011047e602
_dispatch_client_callout + 8 33 libdispatch.dylib 0x0000000110481b78 _dispatch_block_invoke_direct + 301 34
FrontBoardServices 0x000000011a13bba8
__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 30 35 FrontBoardServices 0x000000011a13b860
-[FBSSerialQueue _performNext] + 457 36 FrontBoardServices 0x000000011a13be40 -[FBSSerialQueue _performNextFromRunLoopSource] +
45 37 CoreFoundation 0x000000010eea3721
CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 38 CoreFoundation 0x000000010eea2f93
__CFRunLoopDoSources0 + 243 39 CoreFoundation 0x000000010ee9d63f __CFRunLoopRun + 1263 40 CoreFoundation
0x000000010ee9ce11 CFRunLoopRunSpecific + 625 41 GraphicsServices
0x000000011713b1dd GSEventRunModal + 62 42 UIKitCore
0x00000001119ca81d UIApplicationMain + 140 43 NDv2
0x000000010c6291c7 main + 71 44 libdyld.dylib
0x00000001104f4575 start + 1 ) libc++abi.dylib: terminating with
uncaught exception of type NSException
There is two ways to change the name of ViewController:
1)
Ex.: class LoginViewController: UIViewController - just select the "LoginViewController", then right click -> Refactor -> Rename
This will change the name file name, class name and take care of the storyboard class name.
2) If you not able to use Method 1, then manually rename the file Name(.swift), then you have to go to the storyboard and replace the class name of the view controller. You may have issues with the outlets.
3) After that close the Xcode and then again start your project.
You have a textField or textView Or UILabel in your controller in storyboard,
1- Open your Storyboard
2- click the UIViewController(ViewController with new name of class you have changed)
3- remove outlet with name TextOutput
4- ReConnet if you want and you are ready to go
The error you are getting is because you had an IBOutlet on your storyboard that doesn't exist any more on the class where it was defined, this can be because you manually changed the name of a property on your class or deleted it.
On your storyboard, select the initial view controller and check if there is a reference to an IBOutlet named TextOutput. Delete that reference and link the View again. That should fix it
I solved it by setting the 'module' for 'Custom class' in Identity inspector

App crashing when App is setting delegate of FirebaseMessaging

My app try to use Firebase remote notification, I followed the Firebase guide. Now my app crashes in AppDelegate where I am trying to set the delegate of Firebase messaging.
Here is the code
[FIRApp configure];
[FIRMessaging messaging].delegate = self;
In the second line it crashes with crash message as given below:
+[FIRInstanceIDCheckinPreferences preferencesFromKeychainContents:]: unrecognized selector sent to class 0x10ef2a538
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'+[FIRInstanceIDCheckinPreferences preferencesFromKeychainContents:]:
unrecognized selector sent to class 0x10ef2a538'
* First throw call stack: ( 0 CoreFoundation 0x00000001116671e6 exceptionPreprocess + 294 1 libobjc.A.dylib
0x0000000110cfc031 objc_exception_throw + 48 2 CoreFoundation
0x00000001116e86c4 +[NSObject(NSObject) doesNotRecognizeSelector:] +
132 3 CoreFoundation 0x00000001115e9898
___forwarding_ + 1432 4 CoreFoundation 0x00000001115e9278 _CF_forwarding_prep_0 + 120 5 MobilePro Dev
0x000000010ed09af3 -[FIRInstanceIDCheckinStore
cachedCheckinPreferences] + 407 6 MobilePro Dev
0x000000010ed0d73a -[FIRInstanceIDStore resetCredentialsIfNeeded] +
145 7 MobilePro Dev 0x000000010ed0d230
-[FIRInstanceIDStore initWithCheckinStore:tokenStore:delegate:] + 174 8 MobilePro Dev 0x000000010ed0d154
-[FIRInstanceIDStore initWithDelegate:] + 142 9 MobilePro Dev 0x000000010ed10acc -[FIRInstanceIDTokenManager init] + 105 10
MobilePro Dev 0x000000010ed022ae -[FIRInstanceID
setupTokenManager] + 50 11 MobilePro Dev
0x000000010ed0225c -[FIRInstanceID start] + 90 12 libdispatch.dylib
0x0000000114c4f7ec _dispatch_client_callout + 8 13 libdispatch.dylib
0x0000000114c50d64 dispatch_once_f + 285 14 MobilePro Dev
0x000000010ecfefac +[FIRInstanceID instanceID] + 45 15 MobilePro Dev
0x000000010ed26a6a -[FIRMessaging initPrivately] + 38 16 MobilePro
Dev 0x000000010ed26939 25+[FIRMessaging
messaging]_block_invoke + 41 17 libdispatch.dylib
0x0000000114c4f7ec _dispatch_client_callout + 8 18 libdispatch.dylib
0x0000000114c50d64 dispatch_once_f + 285 19 MobilePro Dev
0x000000010ed2690d +[FIRMessaging messaging] + 45 20 MobilePro Dev
0x000000010eaa9ac3 -[AppDelegate
application:didFinishLaunchingWithOptions:] + 323 21 UIKit
0x00000001128d96fb -[UIApplication
_handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 278 22 UIKit 0x00000001128db172
-[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4123 23 UIKit 0x00000001128e05cb
-[UIApplication _runWithMainScene:transitionContext:completion:] + 1677 24 UIKit 0x0000000112ca2f7e
__111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke
+ 866 25 UIKit 0x0000000113075a39 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153 26 UIKit 0x0000000112ca2bba
-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236 27 UIKit 0x0000000112ca33db
-[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 675 28 UIKit
0x0000000113614614 __82-[_UIApplicationCanvas
_transitionLifecycleStateWithTransitionContext:completion:]_block_invoke
+ 299 29 UIKit 0x00000001136144ae -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433 30 UIKit 0x00000001132f875d
__125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke
+ 221 31 UIKit 0x00000001134f34b7 _performActionsWithDelayForTransitionContext + 100 32 UIKit 0x00000001132f8627 -[_UICanvasLifecycleSettingsDiffAction
performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]
+ 223 33 UIKit 0x00000001130750e0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392 34 UIKit 0x00000001128deeac
-[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515 35
UIKit 0x0000000112eb1bcb
-[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361 36
FrontBoardServices 0x00000001176452f3 -[FBSSceneImpl
_didCreateWithTransitionContext:completion:] + 331 37 FrontBoardServices 0x000000011764dcfa
__56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 225 38
libdispatch.dylib 0x0000000114c4f7ec
_dispatch_client_callout + 8 39 libdispatch.dylib 0x0000000114c54db8 _dispatch_block_invoke_direct + 592 40
FrontBoardServices 0x0000000117679470
__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24 41 FrontBoardServices 0x000000011767912e
-[FBSSerialQueue _performNext] + 439 42 FrontBoardServices 0x000000011767968e -[FBSSerialQueue _performNextFromRunLoopSource] +
45 43 CoreFoundation 0x0000000111609bb1
CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 44 CoreFoundation 0x00000001115ee4af
__CFRunLoopDoSources0 + 271 45 CoreFoundation 0x00000001115eda6f __CFRunLoopRun + 1263 46 CoreFoundation
0x00000001115ed30b CFRunLoopRunSpecific + 635 47 GraphicsServices
0x000000011779ca73 GSEventRunModal + 62 48 UIKit
0x00000001128e2057 UIApplicationMain + 159 49 MobilePro Dev
0x000000010eac56cf main + 111 50 libdyld.dylib
0x0000000114ccc955 start + 1 51 ???
0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with
uncaught exception of type NSException
If you don't use pods, you must to add the objC linker flag for your target.
From the documentation:
"Integrate without CocoaPods
If you don't want to use Cocoapods, you can still take advantage of the Firebase SDKs by importing the frameworks directly.
Download the framework SDK zip. This is a ~1GB file and might take some time to download.
Unzip the file, then review the README for the Frameworks that you want to include in your app.
Add the ObjC linker flag in your Other Linker Settings in your target's build settings."
Link:
https://firebase.google.com/docs/ios/setup
https://developer.apple.com/library/archive/qa/qa1490/_index.html
When you call a delegate, you must ensure that all the required methods of that delegate are written.
Check the following method is called in your Appdelegate.
-(void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken
{
}
Or ensure that FIRMessagingDelegate is written in your Appdelegate
#interface AppDelegate ()<FIRMessagingDelegate>
You need to change the Firebase configure method.
Call it as,
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 42.0), dispatch_get_main_queue(), ^{
[FIRApp configure];
});
It will solve your issue.
import FirebaseMessaging
FirebaseApp.configure()
Messaging.messaging().delegate = self
//MARK:- Messaging Delegate Method ..............................
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
let token = Messaging.messaging().fcmToken
print("FCM token: \(token ?? "")")
}

Firebase: Xcode Could not locate configuration file: 'GoogleService-Info.plist'

3 days ago I try to launch my app, but its crashing on startup, I do all steps mentioned in all other questions's answers.
I'm sure of file name exactly: GoogleService-Info.plist , Target Membership is my app I check it, I add file to Copy Bundle Resources and Compile Resources, I clean app and rebuild it, I recreate app on Firebase Console, I restart PC and Xcode, and same error !!
I use firebase for cloud messaging. I import Firebase on AppDelegate, add FirebaseApp.configure() to didFinishLaunchingWithOptions.
What shall I do other than this to get it work ???
2018-03-29 10:54:33.131476+0300 Ajeelk[72808:20293899] 4.11.0 - [Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
2018-03-29 10:54:33.131712+0300 Ajeelk[72808:20293899] 4.11.0 - [Firebase/Core][I-COR000005] No app has been configured yet.
2018-03-29 10:54:33.170450+0300 Ajeelk[72808:20293848] *** Terminating app due to uncaught exception 'com.firebase.core', reason: '`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) 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 0x0000000103f4812b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001035dcf41 objc_exception_throw + 48
2 CoreFoundation 0x0000000103fbd245 +[NSException raise:format:] + 197
3 Ajeelk 0x0000000101512102 +[FIRApp configure] + 352
4 Ajeelk 0x0000000101451500 _T06Ajeelk11AppDelegateC11applicationSbSo13UIApplicationC_s10DictionaryVySC0E16LaunchOptionsKeyVypGSg022didFinishLaunchingWithH0tF + 240
5 Ajeelk 0x000000010145302a _T06Ajeelk11AppDelegateC11applicationSbSo13UIApplicationC_s10DictionaryVySC0E16LaunchOptionsKeyVypGSg022didFinishLaunchingWithH0tFTo + 186
6 UIKit 0x0000000104fc7bca -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 299
7 UIKit 0x0000000104fc9648 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4113
8 UIKit 0x0000000104fceaeb -[UIApplication _runWithMainScene:transitionContext:completion:] + 1720
9 UIKit 0x00000001053986f8 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 924
10 UIKit 0x000000010576e4c8 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
11 UIKit 0x00000001053982f1 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 249
12 UIKit 0x0000000105398b6b -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 696
13 UIKit 0x0000000105d16a69 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 262
14 UIKit 0x0000000105d16922 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 444
15 UIKit 0x00000001059f39c8 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221
16 UIKit 0x0000000105bf2b06 _performActionsWithDelayForTransitionContext + 100
17 UIKit 0x00000001059f388b -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 231
18 UIKit 0x000000010576db25 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
19 UIKit 0x0000000104fcd36a -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 523
20 UIKit 0x00000001055a8605 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 369
21 FrontBoardServices 0x000000010bd48cc0 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 338
22 FrontBoardServices 0x000000010bd517b5 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 235
23 libdispatch.dylib 0x00000001086151ba _dispatch_client_callout + 8
24 libdispatch.dylib 0x000000010861a468 _dispatch_block_invoke_direct + 324
25 FrontBoardServices 0x000000010bd7d498 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
26 FrontBoardServices 0x000000010bd7d14e -[FBSSerialQueue _performNext] + 464
27 FrontBoardServices 0x000000010bd7d6bd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
28 CoreFoundation 0x0000000103eeb101 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
29 CoreFoundation 0x0000000103f8af71 __CFRunLoopDoSource0 + 81
30 CoreFoundation 0x0000000103ecfa19 __CFRunLoopDoSources0 + 185
31 CoreFoundation 0x0000000103ecefff __CFRunLoopRun + 1279
32 CoreFoundation 0x0000000103ece889 CFRunLoopRunSpecific + 409
33 GraphicsServices 0x000000010995a9c6 GSEventRunModal + 62
34 UIKit 0x0000000104fd05d6 UIApplicationMain + 159
35 Ajeelk 0x00000001014586b7 main + 55
36 libdyld.dylib 0x0000000108689d81 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Your Xcode project is overriding the default Xcode copyPlist function to a no-op. Therefore no plist files get copied in the Copy Resource Files section.
Delete the following from Ajeelk.xcodeproj/project.pbxproj:
/* Begin PBXBuildRule section */
048423361F1F829200C5DC6B /* PBXBuildRule */ = {
isa = PBXBuildRule;
compilerSpec = com.apple.compilers.proxy.script;
fileType = text.plist;
isEditable = 1;
outputFiles = (
);
script = "# builtin-copyPlist\n";
};
/* End PBXBuildRule section */

Resources