ユーザー確認メールがユーザーのメールに送信されたアプリで作業しています。 "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];
}
}