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 }