-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecated errors #3
Comments
I haven't worked on this project since the introduction of APNS. Please use the wiki or the issue tracker so that other people can look into this. |
I have the same problem. Have anyone a solution for the problem? Currently I use XCode 4.5. |
open ApplicationDelegate.m, and try this // // Create certificate.
// NSData *certificateData = [NSData dataWithContentsOfFile:self.certificate];
// CSSM_DATA data;
// data.Data = (uint8 *)[certificateData bytes];
// data.Length = [certificateData length];
// result = SecCertificateCreateFromData(&data, CSSM_CERT_X_509v3, CSSM_CERT_ENCODING_BER, &certificate);
// NSLog(@"SecCertificateCreateFromData(): %d", result);
// Create certificate.
NSData* certData = [NSData dataWithContentsOfFile:self.certificate];
if( [certData length] ) {
certificate = SecCertificateCreateWithData( kCFAllocatorDefault, (__bridge CFDataRef)certData );
if( certificate != NULL ) {
SecPolicyRef myPolicy = SecPolicyCreateBasicX509();
SecTrustRef myTrust;
result = SecTrustCreateWithCertificates(certificate, myPolicy, &myTrust);
} else {
NSLog(@"error: trying to create the SSL certificate from data located at %@, but failed", self.certificate);
}
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey I tried running the program on Xcode v4.3.2 and I get errors saying:
CSSM_DATA is deprecated
SecCertificateCreateFromData is deprecated
When I try to run send a push message, the program crashes in iosock.c
OSStatus SocketWrite(
...
// at:
length = write(sock,
(char*)dataPtr + bytesSent,
dataLen - bytesSent);
Any ideas as to why this is happening?
Thanks :)
The text was updated successfully, but these errors were encountered: