Hi All:
I have implemented a personal VPN on macos. I use NEVPNProtocolIKEv2 to configure IKEv2 protocol. When I set parameter, I am a bit confused with Apple developer documents.
As below shown, I set authentication method to certificate, and passed p12 certificate data and password.
ikev2.authenticationMethod = NEVPNIKEAuthenticationMethodCertificate;
ikev2.identityData = [NSData dataWithContentsOfFile:certificatePath];
ikev2.identityDataPassword = password;
However, from Apple documents.
In macOS, this property is ignored for NEVPNProtocolIKEv2 and NETunnelProviderProtocol objects. On iOS, this property is ignored for NETunnelProviderProtocol objects. In cases where this property is ignored, the identity should be set using the identityReference property.
Even I do not set identityReference, I found I can still connect successful with remote VPN server on MacOS 10.14.6 and MacOS 10.15.3.
I have also tried to set all (identityData, identityDataPassword, identityReference) value, It still can connect to server.
so what is the meaning document here, should it correct or not?
Even current code is work, I think use identityReference is still suggested. Please give your suggestions. Thanks.