このガイドを使用して、プログラムで VPN を作成しました: http://ramezanpour.net/post/2014/08/03/configure-and-manage-vpn-connections-programmatically-in-ios-8/
NEVPNProtocolIPSec *p = [[NEVPNProtocolIPSec alloc] init];
p.username = [[alertView textFieldAtIndex:0] text];
p.passwordReference = [keychainItemWrapper objectForKey:(__bridge id)kSecValueData];
p.serverAddress = @"mylink.com";
p.authenticationMethod = NEVPNIKEAuthenticationMethodSharedSecret;
p.sharedSecretReference = [keychainItemWrapper objectForKey:(__bridge id)kSecAttrService];
p.localIdentifier = @"identifier";
p.remoteIdentifier = @"identifier";
p.useExtendedAuthentication = YES;
p.disconnectOnSleep = NO;
[_vpnManager setProtocol:p];
すべてがiOS8で完全に機能しました。最初に、ユーザーがユーザー名を入力するテキストフィールドを持つ UIAlertView を示しました。次に、共有シークレットを入力した設定にリダイレクトされ、接続できました。
iOS 9 で、ユーザー名を入力して [完了] を押すと、次のようなポップアップが表示されます。[許可] をクリックすると、プロファイルが保存されます。その後、設定に移動し、接続を押すと、次のように表示されます: VPN共有シークレットが提供されませんでした. (私のコードに示されているように、keychainItemWrapper から取得したとしても) 誰でもこれを手伝ってくれますか?
ありがとうございました