14

I've read many many blogs and examples of how to open an app from an URL scheme (for example, this blog), and it seems to work great when I call my app from mobile safari. For instance, when I call testapp://some.data.here in mobile safari, it opens my testapp and I can parse out the some.data.here.

However, when I call testapp://some.data.here in iOS-Chrome, it just googles the term instead of calling the app.

Is there a way to have iOS Chrome recognize the URL as a registered app the way mobile safari does?

When I google this topic, I see a lot of comments on how to open a url in chrome from an app, but not the other way around.

Has anyone encountered this?

Thanks!

4

3 に答える 3

3

Chrome アプリが開発されているように見える方法のため現時点では、ジェイルブレイクなしでこれを行うことはできないようです (その場合でも、簡単ではありません)。これを修正するには、Google Chrome iOS チームにバグを報告する必要があります (たとえば、グーグルで検索する前に、登録済みのすべてのアプリで URL スキームを開いてみてください)。申し訳ありませんが、これ以上役に立ちませんでしたが、簡単な方法はないようです。

于 2012-12-17T04:59:57.143 に答える
1

複雑な回避策がありますが、適切なリダイレクトでページを動的に生成するために Web サーバーをホストする必要があるため、おそらくそれを構築することにあまり興奮することはないでしょう. これは、Branchで作成したものを単純化しすぎた表現です。これには、開始するためのコードが含まれていますが、Web サーバーには、ここでは説明されていないセットアップが少し必要です。

  1. testapp://some.data.here の代わりに、http://yoursite.com/hosted-redirect/some.data.hereにリンクします。

  2. サーバーはルート /hosted-redirect でリッスンし、some.data.here を取得して、次のページ (body here) を構築する必要があります。

コード
(ソース: derrrick.com )

したがって、サーバーはこのページを生成して応答し、http: //yoursite.com/hosted-redirect/some.data.hereが要求されるたびに some.data.here に入力する必要があります。

軽量ノード アプリは、1 つのファイルでこれを行うことができます。

アプリの 1 つの静的ファイルをテストしたところ、これは確実に機能します。

于 2015-02-26T21:52:58.413 に答える