Created
June 7, 2020 09:17
-
-
Save wolfgangasdf/e63ba301f37d199e5ec2fe828038118c to your computer and use it in GitHub Desktop.
disable App transport security ATS dynamically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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