TKShareURLProvider

public class TKShareURLProvider : UIActivityItemProvider
  • Declaration

    Swift

    @objc(getShareURLForShareable:allowLongURL:success:failure:)
    public class func getShareURL(for shareable: TKURLShareable, allowLongURL: Bool, success: @escaping (URL) -> Void, failure: (() -> Void)?)
  • Gets and optionally fetches the share URL for the provided object.

    If the object didn’t yet have a share URL, it is fetched and the object conforms to TKURLSavable, the URL is also persisted in the object’s shareURL.

    Declaration

    Swift

    @discardableResult
    @objc(getShareURLForShareable:allowLongURL:allowBlocking:)
    public class func getShareURL(for shareable: TKURLShareable, allowLongURL: Bool, allowBlocking: Bool) -> URL?

    Parameters

    shareable

    Object for which to get a URL for sharing

    allowLongURL

    If long URL is allowed (e.g., long UUID rather than a short identifier)

    allowBlocking

    If method call is allowed to block and fetch the URL from a server

    Return Value

    The URL for sharing. Is discardable as for TKURLSavable you can get it from the object’s shareURL

UIActivityItemProvider

  • Declaration

    Swift

    public override var item: Any { get }
  • Declaration

    Swift

    public override func activityViewControllerPlaceholderItem(_ activityViewController: UIActivityViewController) -> Any