I have solved this problem. Just set the identityReference property, hoping to help others who encounter the same problem in the future
p.identityReference = try! Data(contentsOf: Bundle.main.url(forResource: "ikev2vpnca", withExtension: "cer")!)
Topic:
App & System Services
SubTopic:
Networking
Tags: