Last active
September 18, 2018 10:41
-
-
Save nderkach/4a2225d5230d722b194d44fec4e0861e to your computer and use it in GitHub Desktop.
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
guard let jsonData = try? JSONSerialization.data(withJSONObject: trackers, options: .prettyPrinted) else { | |
return | |
} | |
let documentFolder = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.trackerblocker") | |
guard let jsonURL = documentFolder?.appendingPathComponent(Constants.blockerListFilename) else { | |
return | |
} | |
do { | |
try jsonData.write(to: jsonURL) | |
} catch { | |
// Handle the error here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment