Background: My application has a video conferenceing feature and I have implemented MPVolumeView with an audio routing button. The user can touch the audio routing button to bring up
MPAVRoutingSheet to select between avaiable audio output options. If the user leaves the list open without making a selection and backgrounds the app for a certain amount of time, our app session times out and we prompt the user to log in again. The problem is that the MPAVRoutingSheet remains open on our login screen (because the user never made a selection or chose 'Cancel') and I would like it to be dismissed (the selection is only applicable to our video conference feature and not our login screen). I found a way to detect the action sheet by using a private API/class, but I'm afraid in doing so, Apple may reject my app. Here is the code I'm using:NSArray *windows = [[UIApplication sharedApplication] windows];for (UIWindow *window in windows) { if ([NSStringFromClass([window class]) isEqualToString:@"_MPAVRoutingSheetSecureWindow"]) { UIView *view = [window.subviews firstObject]; if ([NSStringFromClass([view class]) isEqualToString:@"MPAVRoutingSheet"]){ [view performSelector:@selector(dismiss)];
} }}Will Apple reject my app update submission to the app store if I use the above code?