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
Copy Markdown
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
Copy Markdown

codecov bot commented Sep 12, 2020

Codecov Report

❌ Patch coverage is 11.91223% with 281 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.44%. Comparing base (f869ddc) to head (106753a).
⚠️ Report is 132 commits behind head on master.

Files with missing lines Patch % Lines
...y Storage/UserDefaultsArrayDictionaryStorage.swift 0.00% 141 Missing ⚠️
...onary Storage/UserDefaultsMappedArrayStorage.swift 0.00% 91 Missing ⚠️
...ces/PersistUserDefaults/ArrayKeyPathObserver.swift 0.00% 19 Missing ⚠️
...s/PersistUserDefaults/StorableInUserDefaults.swift 11.11% 16 Missing ⚠️
...ources/PersistUserDefaults/UserDefaultsValue.swift 42.85% 4 Missing ⚠️
Sources/TestHelpers/CodableStruct.swift 0.00% 4 Missing ⚠️
Sources/PersistCore/Persister.swift 80.00% 2 Missing ⚠️
Sources/PersistUserDefaults/KeyPathObserver.swift 80.00% 2 Missing ⚠️
...rces/PersistUserDefaults/UserDefaultsStorage.swift 66.66% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (f869ddc) and HEAD (106753a). Click for more details.

HEAD has 14 uploads less than BASE
Flag BASE (f869ddc) HEAD (106753a)
22 8
Additional details and impacted files
@@             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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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