Crash on iPad when calling findLoginForURLString - invalid presentation of UIActivityViewController

Options
blork
blork
Community Member
edited August 2014 in iOS

Calling findLoginForURLString::: causes the following crash on iPad:

*** Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (<_UIAlertControllerActionSheetRegularPresentationController: 0x14457a8c0>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.'

UIActivityViewController's UIPopoverPresentationController needs to have one of the following set to be properly presented:

sourceView and sourceRect

barButtonItem

Unless I'm missing something there's no way for a caller to set these properties. I suggest 2 new methods to replace findLoginForURLString::: that take the missing variables, or, alternatively, just return the UIActivityViewController and let the caller deal with presentation.

Comments

This discussion has been closed.