2016-06-01 31 views
2

ユーザー確認メールがユーザーのメールに送信されたアプリで作業しています。 "http://www.sample.com//Register.aspx?xxx(with parameters"という形式でメールを受信できます。 このメールをクリックすると、iOS9で登録ページを起動する必要があります。URLスキームがiOS9で動作しない

ノート:Safariアプリに「Register.aspx://」と入力しても、電子メールURLからは入力しないでください。

私は

<key>CFBundleURLTypes</key> 
    <array> 
     <dict> 
      <key>CFBundleURLSchemes</key> 
      <array> 
       <string>Register.aspx</string> 
      </array> 
     </dict> 
    </array> 
<key>LSApplicationQueriesSchemes</key> 
    <array> 
     <string>Register.aspx</string> 
    </array> 

2.in 1.info.plistのInfo.plistに、コードで私が使用したアプリのデリゲート次のことを行っている:あなたは間違って登録されている

- (BOOL)application:(UIApplication *)application 
      openURL:(NSURL *)url 
    sourceApplication:(NSString *)sourceApplication 
     annotation:(id)annotation { 

    BOOL canBeOpened = [[UIApplication sharedApplication] 
         canOpenURL:[NSURL URLWithString:@"Register.aspx://"]]; 

    if (canBeOpened) { 
     UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Test Message" 
                 message:@"This is a url scheme" 
                 delegate:nil 
               cancelButtonTitle:@"OK" 
               otherButtonTitles:nil]; 
     [alert show]; 

    } 
    else{ 
     UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Test Message" 
                 message:@"This is not a url scheme" 
                 delegate:nil 
               cancelButtonTitle:@"OK" 
               otherButtonTitles:nil]; 
     [alert show]; 

    } 
} 

答えて

3

をスキームとしてのURLの一部。提供する例は標準URLスキームhttpです。

最初のコロンの前のURLのビットは、スキーム(通常httpまたはhttps)です。

mycoolapp://www.sample.com/Register.aspx 
2

のiOS 9は、があります。

<key>CFBundleURLTypes</key> 
<array> 
    <dict> 
     <key>CFBundleURLSchemes</key> 
     <array> 
      <string>mycoolapp</string> 
     </array> 
    </dict> 
</array> 
<key>LSApplicationQueriesSchemes</key> 
<array> 
    <string>mycoolapp</string> 
</array> 

のようなURLを電子メールでニーズ:あなたは、電子メールなどでURL URLおよび出力のための新たな仕組みを作る必要があるカスタムスキームを使用するにはURLスキームの処理に小さな変更を加えました。あなたのアプリはあなたのInfo.plistのLSApplicationQueriesSchemesキーを使うことを呼び出すURLをホワイトリストに登録する必要があります。

http://awkwardhare.com/post/121196006730/quick-take-on-ios-9-url-scheme-changes

関連する問題