After encountering a bunch of problems related to coverage flushing (fixed) and test output being consumed (not fixed), I decided to give Cedar and GH-Unit a try as an alternative to XCTest.
Unfortunately this presents a new problem:
- When launching from the IDE everything goes well.
- When launching form the cmd-line, I get SSL certificate errors
Error summary:
Error Domain=com.biasedbit.http Code=60 "Peer certificate cannot be authenticated with given CA certificates"
How can I fix this? (And for extra points) Why would the certificate be known when launching from the IDE, but not from the command line?
From the cmd-line it's necessary to explicitly specify that invalid/self-signed SSL certificates should be allowed. I'm still not sure why this was not necessary when running via the IDE, but that's another question.
Setting Accept Invalid Certificates
With the network stack I'm using (BBHTTP, which by the way is seriously nice and it seems under-rated) this is as simple as: