ios - UIDocumentInteractionController presentOptionsMenuFromBarButtonItem error in ios8- Unknown activity items supplied -
uidocumentinteractioncontroller
presentoptionsmenufrombarbuttonitem
gives me console error in ios8 hardware (and not on 7.1 hardware or earlier):
in official app store version of app, app crashes @ point. when compile , run on ipad gives error not crash.
my code:
in .h:
uidocumentinteractioncontroller *docinteractioncontroller;
in .m:
self.docinteractioncontroller = [uidocumentinteractioncontroller interactioncontrollerwithurl:fileurl]; self.docinteractioncontroller.delegate = self; //uibarbuttonitem *element element in toolbar [self.docinteractioncontroller presentoptionsmenufrombarbuttonitem:element animated:yes];
if nslog
of docinteractioncontroller.uti see "com.adobe.pdf" @ console, uti beingness recognized properly.
i can around "unknown activity items" using presentopeninmenufrombarbuttonitem instead of presentoptionsmenufrombarbuttonitem uidocumentinteractioncontroller call, want show user print , email options well, not external app opening options.
tested on ipad version 8.0.2. xcode version 6.0.1, deployment target 6.0 (also tested deployment target 8.0). objective-c. running on ipad version 7.1 not produce error.
see radar: http://openradar.appspot.com/radar?id=5800473659441152
as noted can utilize presentopeninmenu instead of presentoptionsmenu. loose mail service alternative can mfmailcomposeviewcontroller dedicated mail service button. or utilize uiactivityviewcontroller "open in" activity item. or uiactivityviewcontroller without "open in" activity item if enough or presentoptionsmenu on ios7 runtime , uiactivityviewcontroller on ios8+ runtime (where share extensions exist) ios objective-c ipad
No comments:
Post a Comment