NsRunloop block ios 15 iPhone 12

Hello, currently, Our App si blocking while we call a another view controller or SDK or Camera System and before we execute the next code.

while (procesando)
   {
    NSDate* loopUntil = [NSDate dateWithTimeIntervalSinceNow: 0.1];
    [[NSRunLoop currentRunLoop] runUntilDate: loopUntil];
   }

This code, allow us to wait the result of the second view controller or sdk or process.

Our production App run this code for some process of the App, we know that is no the best solution, instead we should use completions or another approach but was working as normal long time. The big problem is that just generates problem with an iPhone 12 with ios15, with other devices with iOS 15 doesnt have problems

It looks a problem with iOS 15 for iPhone 12.

Im waiting for a workaround or maybe for a solution with a new vertion of iOS Greetings

I'm seeing this on iPad Mini 6th Gen iOS 15.0 & 15.1 Very frustrating. We're using it to block UIAlertController dialogues until the user taps a response.

Are there any new findings here? I have the same problem with ios15 and the iphones12/13. It works on all older devices such as iphone7,8, ipad7 etc.

For me, the view is not loaded for the Camera QR Code... I am aware that certain things are not allowed to happen in the main thread and the native parts are also started here by me in the background thread. Unfortunately, my company wrote the app in Qt with native iOS parts...which also work wonderfully, but the method is just kicked out of the Qt main thread and as soon as a while loop or a timer or for loop is started and the Stopping the app for a short time until the QR code is scanned will not display the view or the UI / window.

Example

 [qrCodeController performSelectorOnMainThread:@selector(initializeQRViewNative) withObject:nil waitUntilDone:NO];

 [qrCodeController performSelectorOnMainThread:@selector(startCamQR) withObject:nil waitUntilDone:YES];



        // here waiting for QRCode if method startCamQR is finished

                *((QString*)data) = qrCode;
                qrCode = "";

                imageControllerCanceled = false;

                NSLog(@"wait for QrCode....");


here is the content of the method startCamQR

  while (qrCode.isEmpty() && !imageControllerCanceled)

        {
            NSLog(@"Starting QRCodeHandler");
            qApp->processEvents(QEventLoop::AllEvents,100);


        }

        NSLog(@"QRSelectorIsFinished = %d with code %@",QRSelectorIsFinished ,qrCode.toNSString());

In principle, as soon as a while loop or an NSRunloop etc. is entered there, the QR View camera does not load.

If I set waitUntilDone:YES to NO then of course the

Camera QR View

but at the bottom of the code it just smokes through and the Qrcode string can no longer be passed on to the Qstring... unfortunately I can't rebuild the entire QT main code... maybe someone else has an idea... I've already tried everything with Completion handler or async nothing... works... as soon as a NSTimer loop or something else is installed... you can't see the UI anymore

As I said with all other devices it works perfectly just not in connection with ios15/16 and the iphone12 and newer

NsRunloop block ios 15 iPhone 12
 
 
Q