plat/apple_ios_share.rs (Apple)#
Source: lib/plat/apple_ios_share.rs
apple_ios_share -- (share.rs) iOS's share sheet: UIActivityViewController over the scene's window
share(&Share) -> SHARE_PENDING / SHARE_NONE the sheet, presented by the topmost controller (as
the file picker); on an iPad a popover at the anchor (points = px over
the canvas's scale), without one in the view's middle and without an
arrow. SHARE_NONE without UIKit's host or off the main thread.
available() -> bool (any thread) UIKit's host runs the app
ios_share_shown() / ios_share_dismiss() (tests) the sheet on screen, closed again
Items: the text (NSString), the link (NSURL), the files (file URLs). A title goes in as the
subject (Mail's subject line) through an item source (JFShareItem) wrapping the first item. The
completion handler (a global block: one sheet at a time) answers SHARE_DONE when an activity
completed, SHARE_FAILED with an error, SHARE_CANCELLED otherwise (the sheet or the activity closed).