Permalink
Browse files

Fixed the usage of the `Archive.addEntry` method in the iOS Demo and …

…the README file.
  • Loading branch information...
arturgrigor committed May 4, 2018
1 parent da4cc87 commit a7d6eb2f91f5445dcf18363c4ef51023d51a1780
Showing with 2 additions and 6 deletions.
  1. +1 −3 CloudKitGDPR iOS Demo/ViewController.swift
  2. +1 −3 README.md
@@ -69,9 +69,7 @@ class ViewController: UITableViewController {
let archive = Archive(url: url, accessMode: .create)
for (fileName, csvContents) in value {
let data = Data(bytes: Array(csvContents.utf8))
try? archive?.addEntry(with: fileName, type: .file, uncompressedSize: UInt32(data.count), provider: { position, size -> Data in
return data
})
try? archive?.addEntry(with: fileName, type: .file, uncompressedSize: UInt32(data.count), provider: { data[$0..<$0+$1] })
}
DispatchQueue.main.async {
View
@@ -162,9 +162,7 @@ gdpr.exportData(usingTransformer: JSONDataTransformer.default) { result in
let archive = Archive(url: url, accessMode: .create)
for (fileName, csvContents) in value {
let data = Data(bytes: Array(csvContents.utf8))
try? archive?.addEntry(with: fileName, type: .file, uncompressedSize: UInt32(data.count), provider: { position, size -> Data in
return data
})
try? archive?.addEntry(with: fileName, type: .file, uncompressedSize: UInt32(data.count), provider: { data[$0..<$0+$1] })
}
DispatchQueue.main.async {

0 comments on commit a7d6eb2

Please sign in to comment.