Skip to content

PersistUserDefaults library#29

Open
JosephDuffy wants to merge 27 commits intomasterfrom
PersistUserDefaults-library
Open

PersistUserDefaults library#29
JosephDuffy wants to merge 27 commits intomasterfrom
PersistUserDefaults-library

Conversation

@JosephDuffy
Copy link
Owner

@JosephDuffy JosephDuffy commented Sep 12, 2020

This is a branch I'm using in Nevis and other apps I'm developing.

I am not aware of any issues, but I would like to improve the API (where possible) prior to merging.

It would be nice to have a `Storage` type that stores the values in a dictionary within an array, stored by another object.

The main use of this would be storing values in UserDefaults/NSUbiquitousKeyValueStore as an array of dictionaries to enable smaller diffs when a single values changes, support update listeners for each property, and easily store the order of values
Enables consumers to utilise `UserDefaults`-related types as necessary without adding too my many types when importing `Persist`
`UserDefaultsMappedArrayStorageTests.testArrayPropertyUpdates` is currently failing. Need to figure out how many times this is expected to be called
@codecov
Copy link

codecov bot commented Sep 12, 2020

Codecov Report

Merging #29 (106753a) into master (f869ddc) will decrease coverage by 29.09%.
The diff coverage is 11.91%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #29       +/-   ##
===========================================
- Coverage   99.54%   70.44%   -29.10%     
===========================================
  Files          25       31        +6     
  Lines        1318     1587      +269     
===========================================
- Hits         1312     1118      -194     
- Misses          6      469      +463     
Impacted Files Coverage Δ
...urces/Persist/FileManager/FileManagerStorage.swift 100.00% <ø> (ø)
...es/Persist/FileManager/Persisted+FileManager.swift 100.00% <ø> (ø)
...es/Persist/FileManager/Persister+FileManager.swift 100.00% <ø> (ø)
...lueStore/Persisted+NSUbiquitousKeyValueStore.swift 100.00% <ø> (ø)
...lueStore/Persister+NSUbiquitousKeyValueStore.swift 100.00% <ø> (ø)
...orableInNSUbiquitousKeyValueStoreTransformer.swift 87.50% <ø> (ø)
Sources/Persist/Transformer/JSONTransformer.swift 69.23% <ø> (-30.77%) ⬇️
.../Persist/Transformer/PropertyListTransformer.swift 100.00% <ø> (ø)
...sist/Transformer/RawRepresentableTransformer.swift 100.00% <ø> (ø)
.../Persist/UserDefaults/Persisted+UserDefaults.swift 100.00% <ø> (ø)
... and 33 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f869ddc...106753a. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant