Burritos
Burritos copied to clipboard
Looking for ideas!
Hello everyone!
In order to extend the collection I am looking for new fresh ideas.
Thanks.
What about to create a poll to vote for the features to impement first?
I'd go for @Dependency
A few ideas:
-
@BundleInfo
: reads a key from Bundle.main.infoDictionary -
@Keychain
: reads and stores values in the Keychain -
@NotificationHandler
: subscribes to a specific notification and is automatically deallocated -
@Random
: feed it an array and the get accessor returns a random element -
@CopyOnWrite
: wrapper forisKnownUniquelyReferenced
(see this post) -
@Debug
: optional that is only initialized in debug mode (#if DEBUG
) -
@Release
: optional that is only initialized in release mode (#if RELEASE
)
The names probably need a bit of tweaking 😄
@Zyphrax maybe @Secret(debug: "", release: "")
?
On top of my mind:
-
@SafeArray
: the subscript method returns an optional element, nil if the index is out of bounds
@Zyphrax maybe
@Secret(debug: "", release: "")
?
Yes that could work, it reminds me a bit of Ruby Rails environment secrets.
Is it possible to make it generic? Can you for example do:
@Secret(debug: 10, release: 100)
?
@Zyphrax maybe
@Secret(debug: "", release: "")
?Yes that could work, it reminds me a bit of Ruby Rails environment secrets.
Is it possible to make it generic? Can you for example do:
@Secret(debug: 10, release: 100)
?
Absolutely possible to use generics!
I am not sure those "secret" values should be in the souce code. It is a good pattern to keep them in config files/build settings which depend on the build configuration and read via bundle info.
I would like to do a PR for something like @Compressed(maxSizeInMB: 10)
that makes sure UIImage and Data properties are compressed to below a certain maximum limit. What do you think?
@Cached(name: String
)
I'm not even sure PropertyWrapper are the right tool for that, but the idea is to provide a cache key to any optional property that you set later into your code (maybe on the .onAppear, or maybe once you receive data from an async call). The next time you use the same key, it'll fetch the value from the backing storage of @Cached (a shared singleton which hold a map of [Key: Value]) and return it if available. And when you set the wrapped value it save it to the cache. Would be quite handy IMO in some case.
@Cached(name: String
) ...
@Dimillian a Cached property wrapper is on the todo list. I am still not sure about the cache implementation itself; either NSCache, a popular 3rd party or an easy way of plug in the cache itself.
Right I didn't saw thanks!
@Obfuscate: encrypt and decrypt the string
Are you guys still working on this repo?
In Pilgrim I have:
@Assembled var assembly: ApplicationAssembly
to pull items from a dependency container, where the container is responsible for lifecycle and wiring together actors at the composition root.
You can then use @Assembled to inject into top-level components (things like view controllers).
Looking forward to @KeyChain
@Persisted
to save Codable
values as JSON to the hard drive.
Hello @guillermomuntaner Are you going to archive this repository?