Step7. 共有用URL

    Step7. 共有用URL


    記事の要約

    ShopliveのSharing APIを使用して、ブロードキャストのURIスキームまたはURLを簡単に共有できます。


    共有リンクの書式設定

    URI スキーム

    let scheme = "{your host}://{your host}?ak=xxx&ck=yyy"
    ShopLive.setShareScheme(with: scheme, custom: nil)
    

    URL

    let url = "https://www.share_link.com/?ak=xxx&ck=yyy"
    ShopLive.setShareScheme(with: "https://www.share_link.com/?ak=xxx&ck=yyy", custom: nil)
    

    デフォルトのシステム共有 UI の使用

    ShopLive.setShareScheme(scheme, custom: nil)
    

    カスタムシステム共有UIの使用

    ShopLive.setShareScheme(scheme, custom: {
        let customShareVC = CustomShareViewController()
        customShareVC.modalPresentationStyle = .overFullScreen
    
        // カスタムシステム共有UI ViewControllerを作成し、Shoplive Player画面(viewController)に表示します。
        ShopLive.viewController?.present(customShareVC, animated: false, completion: nil)
    })
    

    再生中のライブ放送のリンクをSNSに送信し、リンクをクリックするだけでアプリのインストールや配信の視聴を誘導できます。(ただし、アプリではディープリンクを個別に処理する必要があります。)