2017-08-02 28 views
0

私の質問は、カスタムURLスキームをアプリを開くことができるQRコードに変換するために何ができるのですか?カスタムURLスキームをQRコード(IOS)に変換

私はカスタムURL(myScheme://)を持っているとします。それは私の携帯電話のブラウザに入力すると機能します。 しかし、私はそれをいくつかのオンラインqrコードジェネレーターに変換するだけで、qrコードリーダーはブラウザでURLを開かずにプレーンテキストを返します。

私はそれを処理するために独自のQRコードリーダーを構築する必要があるのですか?

+0

urlスキームがブラウザ/ webviewで開かれているか、あなたのWeb上の実際のURLであり、あなたのappスキームにリダイレクトされていれば、それは正常に機能します。 – Tj3n

+0

あなたは必要ですappスキームをリダイレクトする実際のURLを作成するには? – starf15h

答えて

0

私はそれがQRコードリーダーのアプリに依存すると思います。私の状況で私はカスタムURL(itms-services://?action=download-manifest&url=xxxQR Reader for iPhoneがあります。しかし、顧客の中には「アプリをインストールできない.QRはSafariを開くだけだ」非常に多くのQR Readerアプリがあり、私たちはどちらが使用されているのかわかりません。

しかし、あなたはthisのようなあなた自身のウェブサイトの何かを使用することができます。そして、あなたがウェブサイトのURLとQRを生成する必要があります

<!doctype html> 
<html> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    <meta name="viewport" content="width=device-width,minimum-scale=1.0, maximum-scale=1.0" /> 
    <title>Site Name</title> 
    <style>@media screen and (max-device-width:480px){body{-webkit-text-size-adjust:none}}</style> 

    <!-- implement javascript on web page that first first tries to open the deep link 
     1. if user has app installed, then they would be redirected to open the app to specified screen 
     2. if user doesn't have app installed, then their browser wouldn't recognize the URL scheme 
     and app wouldn't open since it's not installed. In 1 second (1000 milliseconds) user is redirected 
     to download app from app store. 
    --> 
    <script> 
    window.onload = function() { 
    <!-- Deep link URL for existing users with app already installed on their device --> 
     window.location = 'yourapp://app.com/?screen=xxxxx'; 
    <!-- Download URL (MAT link) for new users to download the app --> 
     setTimeout("window.location = 'http://hastrk.com/serve?action=click&publisher_id=1&site_id=2';", 1000); 
    } 
    </script> 
</head> 
<body> 

    <!-- button to Download App for new app users --> 
    <form action="http://hastrk.com/serve?action=click&publisher_id=1&site_id=2" target="_blank"> 
     <input type="submit" value="Download" /> 
    </form> 

    <!-- button to Open App to specific screen for existing app users --> 
    <form action="yourapp://app.com/?screen=xxxxx" target="_blank"> 
     <input type="submit" value="Open App" /> 
    </form> 

</body> 
</html> 

を。 Safariで開き、アプリをリダイレクトします。 (私が願っています)

+0

私はC#.netを使ってWebページを作成し、それを公開する必要があるかもしれません。 – starf15h

+0

htmlページを作成して公開するだけです。 –

関連する問題