Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 7 crash on activityDidFinish #16

Open
cannyboy opened this issue Mar 26, 2015 · 0 comments
Open

iOS 7 crash on activityDidFinish #16

cannyboy opened this issue Mar 26, 2015 · 0 comments

Comments

@cannyboy
Copy link

I got a crash on iOS 7 on this line, when coming back from Instagram (double-tap home and tap original app):

    [super activityDidFinish:completed];

*** Assertion failure in -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:], /SourceCache/UIKit/UIKit-2935.138/UIWindowController.m:223
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempting to begin a modal transition from <DMResizerViewController: 0x14d5752d0> to <UITabBarController: 0x14d610360> while a transition is already in progress. Wait for viewDidAppear/viewDidDisappear to know the current transition has completed'

iOS 8 seems fine with this.

I solved the issue by waiting a bit in documentInteractionController didEndSendingToApplication

- (void)documentInteractionController:(UIDocumentInteractionController *)controller didEndSendingToApplication:(NSString *)application {
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self activityDidFinish:YES];
    });
}
@cannyboy cannyboy changed the title iOS 7 on activityDidFinish iOS 7 crash on activityDidFinish Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant