I want to change/modify some value in info.plist from Swift programmatically. For example I want to change "NSAllowsArbitaryLoads" to 0.
This is code what I am using for editing the value:
func editPlist(){
var infoPlistPath = Bundle.main.path(forResource: "Info", ofType: "plist")
var infoPlistDict = NSMutableDictionary(contentsOfFile: playersDictionaryPath!)
var nsAppKey = infoPlistDict?.object(forKey: "NSAppTransportSecurity") as! NSDictionary
print(nsAppKey["NSAllowsArbitraryLoads"])
nsAppKey["NSAllowsArbitraryLoads"] = 0
}
In reality I want to change my exported UTIs image in Swift programmatically. I want to change it for each object that I want to share via UIActivityController.
P.S. : I am using Swift 3 in Xcode 8.