Skip to content

Instantly share code, notes, and snippets.

@wolfgangasdf
Created June 7, 2020 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wolfgangasdf/e63ba301f37d199e5ec2fe828038118c to your computer and use it in GitHub Desktop.
Save wolfgangasdf/e63ba301f37d199e5ec2fe828038118c to your computer and use it in GitHub Desktop.
disable App transport security ATS dynamically
// this is in kotlin, very easy to translate to java
val ats = org.eclipse.swt.internal.cocoa.NSDictionary.dictionaryWithObject(
org.eclipse.swt.internal.cocoa.NSNumber.numberWithBool(true),
org.eclipse.swt.internal.cocoa.NSString.stringWith("NSAllowsArbitraryLoads"))
org.eclipse.swt.internal.cocoa.NSBundle.mainBundle().infoDictionary().setValue(
ats, org.eclipse.swt.internal.cocoa.NSString.stringWith("NSAppTransportSecurity"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment