Closed ynnadkrap closed 9 years ago
Looks like you figured it out (now it's closed). I was also confused by this. The NewClient()
constructor takes the actual PEM data in a string, rather than the filename. There's another constructor NewClientWithFiles()
that does take the filenames: https://godoc.org/github.com/timehop/apns#NewClientWithFiles
I'm thinking of reducing the number of NewClient* functions and providing more examples. https://github.com/timehop/apns/issues/45
Excuse my ignorance.. I'm new to the iOS world.
I'm getting the error: "crypto/tls: failed to parse certificate PEM data" from this code:
where CERT_PEM ("devcert.pem") and KEY_PEM ("devkey.pem") are the filenames. The code above is being called from a directory below the files:
I created the CERT_PEM by using this command:
and I created KEY_PEM using this command:
I successfully tested these by using this command:
What am I doing wrong here? Thanks a bunch for the library.