Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change a VALValet's accessibility level #112

Closed
nemesis opened this issue Jun 16, 2017 · 1 comment
Closed

Change a VALValet's accessibility level #112

nemesis opened this issue Jun 16, 2017 · 1 comment

Comments

@nemesis
Copy link

nemesis commented Jun 16, 2017

Is it possible to change a specific VALValet's accessibility level?

For instance, let's say a VALValet had .always accessibility and now I want to make it .afterFirstUnlock.

The Apple docs say that it's possible, and there's even some sample code on StackOverflow, but is there a way to do this with Valet without having to migrate to a new VALValet with different accessibility?

Thanks.

@dfed
Copy link
Collaborator

dfed commented Jun 16, 2017

You can't change the accessibility level on an existing Valet. However, you can create a new Valet, and use -migrateObjectsFromValet:removeOnCompletion: to migrate the items over when both are accessible.

Creating a new Valet is cheap, and the migration call is explicit and allows you to detect errors. We wouldn't want to create an API that implicitly migrated via changing the accessibility level. Closing this out.

@dfed dfed closed this as completed Jun 16, 2017
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

No branches or pull requests

2 participants