File tree Expand file tree Collapse file tree
libs/SalesforceSDKCore/SalesforceSDKCore/Classes/Common Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141#import " SFSDKMacDetectUtil.h"
4242#import " SFSDKSalesforceSDKUpgradeManager.h"
4343#import < SalesforceSDKCommon/NSUserDefaults+SFAdditions.h>
44+ #import " SFSDKWindowManager+Internal.h"
4445
4546static NSString * const kSFAppFeatureSwiftApp = @" SW" ;
4647static NSString * const kSFAppFeatureMultiUser = @" MU" ;
@@ -665,12 +666,14 @@ - (void)handleSceneDidDisconnect:(NSNotification *)notification {
665666 [self .snapshotViewControllers removeObject: scene.session.persistentIdentifier];
666667}
667668
668- - (nullable UIScene *)sceneFromNotification : (NSNotification *)notification {
669+ - (UIScene *)sceneFromNotification : (NSNotification *)notification {
669670 id object = notification.object ;
670671 if ([object isKindOfClass: [UIScene class ]]) {
671672 return object;
673+ } else {
674+ [SFSDKCoreLogger w: [self class ] message: @" Unable to derive scene from notification, using default" ];
675+ return [[SFSDKWindowManager sharedManager ] defaultScene ];
672676 }
673- return nil ;
674677}
675678
676679- (void )handleAuthCompleted : (NSNotification *)notification { }
You can’t perform that action at this time.
0 commit comments