After upgrading Xcode to version 11.3, popup windows calling in iOS 13 stopped working because keyWindow is deprecated, the code is
UIViewController *qtController = [[UIApplication sharedApplication].keyWindow rootViewController];
UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:sharingItems applicationActivities:nil];
[qtController presentViewController:activityController animated:YES completion:nil];
UIPopoverPresentationController *popController = activityController.popoverPresentationController;
if (popController) popController.sourceView = qtController.view;
In the old Xcode, everything worked fine on iOS 13.