microsoftconnect / ms-intune-app-sdk-ios

Intune App SDK for iOS enables data protection and mobile app management features in iOS mobile apps with Microsoft Intune
92 stars 27 forks source link

App has been crashing in background mode - Intune SDK #480

Open shivcelumula opened 1 day ago

shivcelumula commented 1 day ago

Describe the bug: App has been crashing, whenever app goes to background mode, aster successful Intune authentication.

To Reproduce Steps to reproduce the behavior:

  1. Login to the app with organizational credentials
  2. Login with Salesforce credentials
  3. After successful login, go to background mode
  4. App crashes

Expected behavior: App shouldn't crash and functional normal

Screenshots and logs: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIApplication session]: unrecognized selector sent to instance 0x109d0c0d0' First throw call stack: ( 0 CoreFoundation 0x00007ff80049b761 exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff800063904 objc_exception_throw + 48 2 CoreFoundation 0x00007ff8004b0873 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0 3 UIKitCore 0x00007ff805bf2efc -[UIResponder doesNotRecognizeSelector:] + 266 4 CoreFoundation 0x00007ff80049fef4 __forwarding + 1459 5 CoreFoundation 0x00007ff8004a20f8 _CF_forwarding_prep_0 + 120 6 SalesforceSDKCore 0x00000001093e8a8f -[SalesforceSDKManager handleSceneDidEnterBackground:] + 111 7 TruView-QA 0x0000000106f9dbf8 cmarDeviceComplianceEnabled + 527980 8 TruView-QA 0x0000000106f9ddd9 cmarDeviceComplianceEnabled + 528461 9 TruView-QA 0x0000000106f17f86 $s14IntuneMAMSwift0aB5ErrorOMa + 71718 10 TruView-QA 0x00000001070f8d9c cmarDeviceComplianceEnabled + 1949712 11 TruView-QA 0x0000000107196430 cmarDeviceComplianceEnabled + 2594468 12 UIKitCore 0x00007ff805bc683e 47-[UIApplication _applicationDidEnterBackground]_block_invoke + 126 13 UIKitCore 0x00007ff8051f36b1 +[UIViewController _performWithoutDeferringTransitionsAllowingAnimation:actions:] + 153 14 UIKitCore 0x00007ff805bc6760 -[UIApplication _applicationDidEnterBackground] + 94 15 UIKitCore 0x00007ff804ef2ea5 101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 763 16 UIKitCore 0x00007ff8055d8f44 _UIScenePerformActionsWithLifecycleActionMask + 87 17 UIKitCore 0x00007ff804ef2b1f 101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198 18 UIKitCore 0x00007ff804ef2580 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 249 19 UIKitCore 0x00007ff804ef2968 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 813 20 UIKitCore 0x00007ff804ef2194 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 341 21 UIKitCore 0x00007ff804eff6fb 186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_blo 22 UIKitCore 0x00007ff805488b08 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 865 23 UIKitCore 0x00007ff8055f7563 _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 261 24 UIKitCore 0x00007ff804eff38a -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 347 25 UIKitCore 0x00007ff804cd1caa 64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.610 + 877 26 UIKitCore 0x00007ff804cd065f -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 245 27 UIKitCore 0x00007ff804cd1812 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 252 28 UIKitCore 0x00007ff8054be182 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 466 29 FrontBoardServices 0x00007ff8078d43f4 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 850 30 FrontBoardServices 0x00007ff8079070ef __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 149 31 FrontBoardServices 0x00007ff8078e2353 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 213 32 FrontBoardServices 0x00007ff807907027 94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 381 33 libdispatch.dylib 0x00000001089759f7 _dispatch_client_callout + 8 34 libdispatch.dylib 0x0000000108979389 _dispatch_block_invoke_direct + 507 35 FrontBoardServices 0x00007ff8079309a7 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 30 36 FrontBoardServices 0x00007ff807930881 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 188 37 FrontBoardServices 0x00007ff8079309cf -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 19 38 CoreFoundation 0x00007ff8003f8283 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 39 CoreFoundation 0x00007ff8003f81c5 CFRunLoopDoSource0 + 157 40 CoreFoundation 0x00007ff8003f79c2 CFRunLoopDoSources0 + 215 41 CoreFoundation 0x00007ff8003f20f7 __CFRunLoopRun + 919 42 CoreFoundation 0x00007ff8003f197d CFRunLoopRunSpecific + 557 43 GraphicsServices 0x00007ff80fe9d08f GSEventRunModal + 137 44 UIKitCore 0x00007ff805bbb53d -[UIApplication _run] + 972 45 UIKitCore 0x00007ff805bbffab UIApplicationMain + 123 46 TruView-QA 0x000000010717c958 cmarDeviceComplianceEnabled + 2489292 47 TruView-QA 0x0000000106cc4012 main + 146 48 dyld 0x00000001082a13e0 start_sim + 10 49 ??? 0x00000001169c0418 0x0 + 4674290712 ) libc++abi: terminating due to uncaught exception of type NSException

Smartphone (please complete the following information):

Intune App SDK for iOS (please complete the following information):

Additional context:

wangxiaoms commented 12 hours ago

Crash is related to SalesforceSDKManager, will need Salesforce team to have a look.