You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -56,7 +56,7 @@ You can of course also just include this framework manually into your project by
56
56
Simply add this line to your Cartfile:
57
57
58
58
```
59
-
github "Flinesoft/CSVImporter" ~> 1.4
59
+
github "Flinesoft/CSVImporter" ~> 1.6
60
60
```
61
61
62
62
And run `carthage update`. Then drag & drop the HandySwift.framework in the Carthage/build folder to your project. Also do the same with the dependent framework `HandySwift`. Now you can `import CSVImporter` in each class you want to use its features. Refer to the [Carthage README](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) for detailed / updated instructions.
@@ -71,7 +71,7 @@ platform :ios, '8.0'
71
71
use_frameworks!
72
72
73
73
target 'MyAppTarget'do
74
-
pod 'CSVImporter', '~> 1.4'
74
+
pod 'CSVImporter', '~> 1.6'
75
75
end
76
76
```
77
77
@@ -103,7 +103,7 @@ Note that you can specify an **alternative delimiter** when creating a `CSVImpor
103
103
104
104
### Asynchronous with Callbacks
105
105
106
-
CSVImporter works completely asynchronous and therefore doesn't block the main thread. As you can see the `onFinish` method is called once it finishes for using the results. There is also `onFail` for failure cases (for example when the given path doesn't contain a CSV file), `onProgress` which is regularly called and provides the number of lines already processed (e.g. for progress indicators). You can chain them as follows:
106
+
CSVImporter works asynchronously by default and therefore doesn't block the main thread. As you can see the `onFinish` method is called once it finishes for using the results. There is also `onFail` for failure cases (for example when the given path doesn't contain a CSV file), `onProgress` which is regularly called and provides the number of lines already processed (e.g. for progress indicators). You can chain them as follows:
By default the real importing work is done in the `.utility` global background queue and callbacks are called on the `main` queue. This way the hard work is done asynchronously but the callbacks allow you to update your UI. If you need a different behavior, you can customize the queues when creating a CSVImporter object like so:
125
+
126
+
```Swift
127
+
let path ="path/to/your/CSV/file"
128
+
let importer = CSVImporter<[String]>(path: path, workQosClass: .background, callbacksQosClass: .utility)
129
+
```
130
+
124
131
### Easy data mapping
125
132
126
133
As stated above the default type is a `[String]` but you can provide whatever type you like. For example, let's say you have a class like this
0 commit comments