Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
fbe5b8d
Use throws rather than return types to indicate error. No test change…
dfed Dec 25, 2019
72bb5e5
Get rid of ErrorHandler
dfed Dec 25, 2019
5127024
couldNotReadKeychain -> .couldNotAccessKeychain
dfed Dec 25, 2019
eba3e95
Commit the error files
dfed Dec 25, 2019
c39612c
Make Objective-C bridging methods for accessing values with prompt re…
dfed Dec 25, 2019
5165c3d
Update tests
dfed Dec 26, 2019
f6d5c6a
Fix warnings
dfed Dec 26, 2019
4f57bcf
Get tests running
dfed Dec 26, 2019
80e0a71
Simpler flow
dfed Dec 26, 2019
aece8fb
Swift 5 updates
dfed Dec 26, 2019
61fcab5
Update documentation
dfed Dec 26, 2019
5ebe4ae
Update ValetTouchIDTest
dfed Dec 26, 2019
10ebf88
Update README again
dfed Dec 26, 2019
d05479b
More swift 5
dfed Dec 26, 2019
a735f5b
More documentation
dfed Dec 26, 2019
b4c0f27
Remove incorrect documentation
dfed Dec 26, 2019
fe21e04
More documentation
dfed Dec 26, 2019
882f376
Clean up @objc declarations
dfed Dec 26, 2019
a06ab81
Bring API in line with Apple's naming guidelines
dfed Dec 26, 2019
430ff5b
Fix post-rebase
dfed Dec 30, 2019
b607e8b
Fix test
dfed Dec 30, 2019
73ba03f
Merge branch 'develop--4.0' into dfed--throws-api
dfed Dec 31, 2019
4694bc3
Merge branch 'develop--4.0' into dfed--throws-api
dfed Jan 6, 2020
a02cc30
Fix warning introduced by merge
dfed Jan 6, 2020
f8f33d0
Fix merge conflict test break
dfed Jan 6, 2020
670f5fb
Merge branch 'develop--4.0' into dfed--throws-api
dfed Jan 15, 2020
17d1eb2
Merge branch 'develop--4.0' into dfed--throws-api
dfed Jan 16, 2020
2fbba9d
Modernize doc comments
dfed Jan 16, 2020
66efc3f
Do not capitalize Key in documentation
dfed Jan 16, 2020
82f45a0
Single parameter should not have the Parameters heading in docs
dfed Jan 16, 2020
4ed9fa3
Add missing parameters to documentation
dfed Jan 16, 2020
b468699
Key -> key
dfed Jan 16, 2020
81bbc25
Merge branch 'dfed--cleanup' into dfed--throws-api
dfed Jan 16, 2020
bbb2ed9
Fixup missing Parameters
dfed Jan 16, 2020
99ee957
Merge branch 'dfed--cleanup' into dfed--throws-api
dfed Jan 16, 2020
74b7822
whitespace and merge conflicts
dfed Jan 16, 2020
d79aacc
Merge branch 'dfed--cleanup' into dfed--throws-api
dfed Jan 16, 2020
688bcb0
whitespace
dfed Jan 16, 2020
a86a468
Merge branch 'develop--4.0' into dfed--throws-api
dfed Jan 17, 2020
74d2e8d
Merge branch 'develop--4.0' into dfed--throws-api
dfed Jan 17, 2020
5893973
Fix whitespace
dfed Jan 19, 2020
ee56d51
Fail test on setup failure
dfed Jan 19, 2020
e0f33e1
Update comment
dfed Jan 19, 2020
a6fcdfb
Revert comment
dfed Jan 19, 2020
0032221
Update whitespace
dfed Jan 19, 2020
2f0d5cc
containsObject(forKey should throw in Swift
dfed Jan 19, 2020
873cda1
Use nullability rather than throws to indicate 'item not found'
dfed Jan 19, 2020
dab04b4
Revert "Use nullability rather than throws to indicate 'item not found'"
dfed Jan 19, 2020
e54bb22
ADd missing Returns comments
dfed Jan 19, 2020
630dd66
Introduce Throws doc comment
dfed Jan 19, 2020
455e401
Catch closer to the source
dfed Jan 19, 2020
42fa0a6
Fixup whitespace
dfed Jan 19, 2020
42f3925
try? less in tests
dfed Jan 19, 2020
adcea82
If deleting items throws, then we should surface the failure.
dfed Jan 19, 2020
a7d5f09
Merge branch 'develop--4.0' into dfed--throws-api
dfed Jan 19, 2020
bb12909
Remove runtime assert, since we will throw the error anyways
dfed Jan 19, 2020
1a6fade
Update Mac tests to use try on containsObject
dfed Jan 19, 2020
f718dc0
Add description to KeychainError
dfed Jan 20, 2020
265e3c8
Fix macOS tests after throwing on removeAllObjects in setUp
dfed Jan 20, 2020
b1d205b
Increase test coverage of error files
dfed Jan 20, 2020
cadeb20
vanillaValet -> valet, anotherFlavor -> iCloudValet
dfed Jan 20, 2020
f78e319
Rename test
dfed Jan 20, 2020
7bf227d
Revert comment change
dfed Jan 20, 2020
e60f5d3
Update whitespace
dfed Jan 20, 2020
2b20666
Update comment formatting
dfed Jan 20, 2020
eca2b7d
Revert "vanillaValet -> valet, anotherFlavor -> iCloudValet"
dfed Jan 20, 2020
93b4cef
Use permutation valet rather than vanillaValet multiple times
dfed Jan 20, 2020
697e53f
Indentation and test separation
dfed Jan 21, 2020
883ace0
Add comment re why we're checking for errSecInteractionNotAllowed
dfed Jan 21, 2020
efeced6
Better comment formatting
dfed Jan 21, 2020
249188f
> 0 -> not isEmpty
dfed Jan 21, 2020
e7023c9
Use Throws rather than Note
dfed Jan 21, 2020
d1b2d80
whitespace
dfed Jan 21, 2020
029927a
Add final to test class
dfed Jan 21, 2020
40344ef
Make test class final
dfed Jan 21, 2020
4e9eb8b
Expand default
dfed Jan 21, 2020
fd5feba
Rename internal containsObject methods to performCopy
dfed Jan 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ The Accessibility enum is used to determine when your secrets can be accessed. I

```swift
let username = "Skroob"
myValet.setString("12345", forKey: username)
try? myValet.setString("12345", forKey: username)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on whether we should show the error being ignored? Both here and in the Objective-C code below. Previously we were discarding the return type, so the current sample-code maintains the prior behavior.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to keep the example simple. The presence of try? implies that there is an error case that could (should) be handled in real usage.

let myLuggageCombination = myValet.string(forKey: username)
```

```objc
NSString *const username = @"Skroob";
[myValet setString:@"12345" forKey:username];
NSString *const myLuggageCombination = [myValet stringForKey:username];
[myValet setString:@"12345" forKey:username error:nil];
NSString *const myLuggageCombination = [myValet stringForKey:username error:nil];
```

In addition to allowing the storage of strings, Valet allows the storage of `Data` objects via `setObject(_ object: Data, forKey key: Key)` and `object(forKey key: String)`. Valets created with a different class type, via a different initializer, or with a different accessibility attribute will not be able to read or modify values in `myValet`.
Expand Down
49 changes: 0 additions & 49 deletions Sources/Valet/ErrorHandler.swift

This file was deleted.

Loading