Clicky

iOS Dev Nugget 249 App Transport Security Diagnostics with nscurl

.

Need to run a code review on your codebase? Hire me

Supporting App Transport Security is important. But not all the keys are obvious.

Here's where nscurl comes in. Mentioned in the same page above, running nscurl --ats-diagnostics --verbose <URL> shows you diagnostics output which will help you determine which keys and values you need to specify for ATS. e.g.:

Default ATS Secure Connection
---
ATS Default Connection
ATS Dictionary:
{
}
Result : PASS
---

================================================================================

Allowing Arbitrary Loads

---
Allow All Loads
ATS Dictionary:
{
    NSAllowsArbitraryLoads = true;
}
Result : PASS
---

================================================================================

Configuring TLS exceptions for httpbin.org

---
TLSv1.2
ATS Dictionary:
{
    NSExceptionDomains =     {
        "httpbin.org" =         {
            NSExceptionMinimumTLSVersion = "TLSv1.2";
        };
    };
}
Result : PASS

Your feedback is valuable: Do you want more nuggets like this?   Yes   or   No

.

.

Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter

.

View archives of past issues