我有问题将数据写入文件。我做错了什么?
SecTrustRef trust = [protectionSpace serverTrust];
SecCertificateRef certificate = SecTrustGetCertificateAtIndex(trust, 0);
NSData* ServerCertificateData = (__bridge NSData *)(certificate);
NSError* error;
[ServerCertificateData writeToFile:ServerCertPath options:NSDataWritingAtomic error:&error];
if(error != nil)
NSLog(@"%@", error);