Sunil Saini
Sunil Saini

Reputation: 1

Test flight app crash after device is locked for few minutes - After Intune iOS SDK integration

When the app integrated with Intune SDK is locked on an iOS device for around 20-30 minutes and then reopened, the app shows a black screen or Intune lock screen and crashes. A popup appears stating, "[App Name] crashed. Do you want to share additional information with the developer?" This issue occurs despite the app functioning correctly in the foreground or action mode. Facing Test Flight build.

To Reproduce Steps to reproduce the behavior:

-Install a fresh build of the app integrated with Intune SDK. -Login using an Intune-managed account with policies enabled (e.g., block copy-paste, share app data, enforce PIN, etc.). -Lock the iOS device and leave it in the foreground for around 20-30 minutes. -Unlock the device and Wait for 3 seconds to see the crash popup.

Crash Stacks:

Thread 4 Crashed:
0   dyld                            0x00000001b4cba1a8 void dyld3::MultiMapBase<prebuilt_objc::ObjCStringKeyOnDisk, prebuilt_objc::ObjCObjectOnDiskLocation, prebuilt_objc::HashObjCStringKeyOnDisk, prebuilt_objc::EqualObjCStringKeyOnDisk>::forEachEntry<... + 140 (Map.h:612)
1   dyld                            0x00000001b4cb5c04 prebuilt_objc::forEachClass(dyld4::RuntimeState*, dyld3::MultiMapView<prebuilt_objc::ObjCStringKeyOnDisk, prebuilt_objc::ObjCObjectOnDiskLocation, prebuilt_objc::HashObjCStringKeyOnDisk, prebuilt_o... + 120 (PrebuiltObjC.cpp:79)
2   dyld                            0x00000001b4c65e54 dyld4::APIs::_dyld_for_each_objc_class(char const*, void (void*, bool, bool*) block_pointer) + 200 (DyldAPIs.cpp:2502)
3   libobjc.A.dylib                 0x000000018c5b081c getPreoptimizedClass + 132 (objc-opt.mm:361)
4   libobjc.A.dylib                 0x000000018c5b044c getClassExceptSomeSwift(char const*) + 40 (objc-runtime-new.mm:2125)
5   libobjc.A.dylib                 0x000000018c5b02a8 look_up_class + 92 (objc-runtime-new.mm:8563)
6   Foundation                      0x000000018de9abd8 NSClassFromString + 152 (NSObjCRuntime.m:140)
7   BoardServices                   0x00000001a8956800 +[BSXPCServiceConnectionProxy invokeMethod:onTarget:withMessage:forConnection:completion:] + 100 (BSXPCServiceConnectionProxy.m:171)
8   BoardServices                   0x00000001a8939e38 __63-[BSXPCServiceConnectionEventHandler connection:handleMessage:]_block_invoke + 1156 (BSXPCServiceConnectionEventHandler.m:349)
9   BoardServices                   0x00000001a8938f64 BSXPCServiceConnectionExecuteCallOut + 240 (BSXPCServiceConnection.m:1307)
10  BoardServices                   0x00000001a8937d2c -[BSXPCServiceConnectionEventHandler connection:handleMessage:] + 176 (BSXPCServiceConnectionEventHandler.m:313)
11  BoardServices                   0x00000001a893887c -[BSXPCServiceConnection _connection_handleMessage:fromPeer:withHandoff:] + 524 (BSXPCServiceConnection.m:1099)
12  libdispatch.dylib               0x0000000196fa8370 _dispatch_call_block_and_release + 32 (init.c:1549)
13  libdispatch.dylib               0x0000000196faa0d0 _dispatch_client_callout + 20 (object.m:576)
14  libdispatch.dylib               0x0000000196fb16d8 _dispatch_lane_serial_drain + 744 (queue.c:3934)
15  libdispatch.dylib               0x0000000196fb2214 _dispatch_lane_invoke + 432 (queue.c:4025)
16  libdispatch.dylib               0x0000000196fb1560 _dispatch_lane_serial_drain + 368 (queue.c:3934)
17  libdispatch.dylib               0x0000000196fb2214 _dispatch_lane_invoke + 432 (queue.c:4025)
18  libdispatch.dylib               0x0000000196fbd258 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193)
19  libdispatch.dylib               0x0000000196fbcaa4 _dispatch_workloop_worker_thread + 540 (queue.c:6787)
20  libsystem_pthread.dylib         0x00000002177d3c7c _pthread_wqthread + 288 (pthread.c:2696)
21  libsystem_pthread.dylib         0x00000002177d0488 start_wqthread + 8

Smartphone: Device: iPhone 14 OS: 18.1.1

Intune App SDK for iOS : -Intune SDK Version: 20.1.2 -Platform: Flutter(version - 3.24.5)

Additional context: -The issue occurs consistently after the app is left in a locked state for 20-30 minutes. Removing the Intune SDK resolves the crash, but the Intune functionality is required for the app. This is a TestFlight build, and the crash logs were retrieved from TestFlight reports.

Flutter (Channel stable, 3.24.5, on macOS 15.0.1 24A348 darwin-arm64, locale en-US) Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc3) Xcode - develop for iOS and macOS (Xcode 16.0) Chrome - develop for the web Android Studio (version 2023.2) IntelliJ IDEA Community Edition (version 2024.1.4) VS Code (version 1.95.3) Connected device (3 available) ! Error: Browsing on the local area network for Sunil’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27)


These solutions did not work:

\-Upgrade MacOS (version - 15.1.1) and Xcode(version - 16.0).

\-Updated intune SDK with the latest version (20.2.1).

\-Flutter flutter version(3.24.5)

\-https://stackoverflow.com/questions/58215486/debugging-sporadic-app-crashes-with-dylib-in-ios13-ipados-13

Upvotes: 0

Views: 49

Answers (1)

Sunil Saini
Sunil Saini

Reputation: 1

" Hi, can you test it with latest Intune SDK release 20.2.1, also does the app access files at background? if yes then will need to set MaxFileProtectionLevel within the IntuneMAMSettings dictionary to NSFileProtectionCompleteUntilFirstUserAuthentication. https://learn.microsoft.com/en-us/mem/intune/developer/app-sdk-ios-phase3#configure-settings-for-the-intune-app-sdk "

Check here> https://github.com/microsoftconnect/ms-intune-app-sdk-ios/issues/503

Upvotes: 0

Related Questions