21.7 C
New York
Thursday, November 7, 2024

ios – Fundamental Thread Checker: UI API known as on a background thread: -[UIImagePickerController didDisplayPhotoPickerSourceType:]


Upon clicking on the navigationItem which opens a UIImagePickerController, I get the under log within the debugger, and can’t discover any documentation that speaks about didDisplayPhotoPickerSourceType. Be aware I’m presenting the picker from the primary thread and nonetheless getting this important thread situation.

partial code:

 ...
 override func viewDidLoad() {
    tremendous.viewDidLoad()
    collectionView.backgroundColor = .blue
    register()
    setUp()
    collectionView.reloadData()
}

personal func setUp() {
    navigationController?.isNavigationBarHidden = false
    let structure = collectionView.collectionViewLayout as! UICollectionViewFlowLayout
    structure.minimumInteritemSpacing = 2
    structure.minimumLineSpacing = 2
    collectionView.collectionViewLayout = structure
    
    navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, goal: self, motion: #selector(addNewPerson))
}

@objc personal func addNewPerson() {
    DispatchQueue.important.async { [weak self] in
        let picker = UIImagePickerController()
        picker.allowsEditing = true
        picker.delegate = self
        self?.current(picker, animated: false)
    }
}
...

Debugger Log:

Fundamental Thread Checker: UI API known as on a background thread: -[UIImagePickerController didDisplayPhotoPickerSourceType:]
PID: 85527, TID: 2803975, Thread title: (none), Queue title: com.apple.NSXPCConnection.person.nameless.85796, QoS: 0
Backtrace:
4   PhotosUI                            0x00000001ad0380c8 -[PUPhotoPickerExtensionHostContext didDisplayPhotoPickerSourceType:] + 96
5   Basis                          0x0000000180fb6c10 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 12
6   Basis                          0x0000000180fb59e0 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:reply:flags:] + 1664
7   Basis                          0x0000000180fb79ec message_handler_message + 84
8   Basis                          0x0000000180fb6f80 message_handler + 148
9   libxpc.dylib                        0x00000001800cca0c _xpc_connection_call_event_handler + 68
10  libxpc.dylib                        0x00000001800ce10c _xpc_connection_mach_event + 1048
11  libdispatch.dylib                   0x0000000105b3f904 _dispatch_client_callout4 + 12
12  libdispatch.dylib                   0x0000000105b42a90 _dispatch_mach_msg_invoke + 672
13  libdispatch.dylib                   0x0000000105b2d75c _dispatch_lane_serial_drain + 324
14  libdispatch.dylib                   0x0000000105b43d50 _dispatch_mach_invoke + 504
15  libdispatch.dylib                   0x0000000105b2d75c _dispatch_lane_serial_drain + 324
16  libdispatch.dylib                   0x0000000105b2e708 _dispatch_lane_invoke + 420
17  libdispatch.dylib                   0x0000000105b3b3ac _dispatch_root_queue_drain_deferred_wlh + 324
18  libdispatch.dylib                   0x0000000105b3a918 _dispatch_workloop_worker_thread + 732
19  libsystem_pthread.dylib             0x0000000247927b74 _pthread_wqthread + 284
20  libsystem_pthread.dylib             0x0000000247926934 start_wqthread + 8
Fundamental Thread Checker: UI API known as on a background thread: -[UIImagePickerController didDisplayPhotoPickerSourceType:]
PID: 85527, TID: 2803975, Thread title: (none), Queue title: com.apple.NSXPCConnection.person.nameless.85796, QoS: 0
Backtrace:
4   PhotosUI                            0x00000001ad0380c8 -[PUPhotoPickerExtensionHostContext didDisplayPhotoPickerSourceType:] + 96
5   Basis                          0x0000000180fb6c10 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 12
6   Basis                          0x0000000180fb59e0 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:reply:flags:] + 1664
7   Basis                          0x0000000180fb79ec message_handler_message + 84
8   Basis                          0x0000000180fb6f80 message_handler + 148
9   libxpc.dylib                        0x00000001800cca0c _xpc_connection_call_event_handler + 68
10  libxpc.dylib                        0x00000001800ce10c _xpc_connection_mach_event + 1048
11  libdispatch.dylib                   0x0000000105b3f904 _dispatch_client_callout4 + 12
12  libdispatch.dylib                   0x0000000105b42a90 _dispatch_mach_msg_invoke + 672
13  libdispatch.dylib                   0x0000000105b2d75c _dispatch_lane_serial_drain + 324
14  libdispatch.dylib                   0x0000000105b43d50 _dispatch_mach_invoke + 504
15  libdispatch.dylib                   0x0000000105b2d75c _dispatch_lane_serial_drain + 324
16  libdispatch.dylib                   0x0000000105b2e708 _dispatch_lane_invoke + 420
17  libdispatch.dylib                   0x0000000105b3b3ac _dispatch_root_queue_drain_deferred_wlh + 324
18  libdispatch.dylib                   0x0000000105b3a918 _dispatch_workloop_worker_thread + 732
19  libsystem_pthread.dylib             0x0000000247927b74 _pthread_wqthread + 284
20  libsystem_pthread.dylib             0x0000000247926934 start_wqthread + 8

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles