Closed Waynetron closed 9 years ago
Hi, can you provide more information?
How are you calling the init and the share methods? When does it crash? Does it happens on iPad or iPhone? Is this happening on a real device or a simulator?
I can confirm this, perhaps with a little more elaboration. Seeing the same thing (iPhone - iOS 7.1.1)
My initial call was significantly more complex, however I was able to duplicate it with this:
Share.init(Share.TWITTER); Share.share("IM ON THE TWITTERZ!");
Xcode gives me the following:
Also, on a side note, on an iPad ( iOS 8.1.2) The same call give me :
It does not crash, but gives the generic "What do you want to share to" dialog, including twitter/message/email, etc. Supplying a defaultURL and defaultSubject, that just shows the "invalidationHandler calle" message, without all the other stuff... Plus the generic dialog.
Finally got some time to look into this again. I wrapped all the new iPad code in an if statement, and it now appears to work for me on iOS 7 on an iPhone, and iOS 8 on an iPad.
But an objective-c programmer I am not... I am an objective-c hack... so I'll throw that disclaimer in there.
if ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad )
{
// Required for iPad
activityVC.popoverPresentationController.sourceView = [[UIApplication sharedApplication] keyWindow];
// Remove arrow from action sheet.
[activityVC.popoverPresentationController setPermittedArrowDirections:0];
// Set action sheet to middle of view.
activityVC.popoverPresentationController.sourceRect = [[UIApplication sharedApplication] keyWindow].frame;
}
Thank you for the extension!
*edit - formatting
Just caught the same exception on iOS 7, had no such problems with iOS 8. Would be good to update the extension.
Hi, this has been just solved with version 1.2.2 of the extension. Sorry for being disconnected so long.
By the way, you should install and use "extension-share" now (the old openfl-share is now deprecated).
Nice, thank you!
Calling Share.share on iOS 7 causes a crash.