Burritos icon indicating copy to clipboard operation
Burritos copied to clipboard

Looking for ideas!

Open guillermomuntaner opened this issue 5 years ago • 17 comments

Hello everyone!

In order to extend the collection I am looking for new fresh ideas.

Thanks.

guillermomuntaner avatar Jun 29 '19 17:06 guillermomuntaner

What about to create a poll to vote for the features to impement first?

own2pwn avatar Jun 30 '19 13:06 own2pwn

I'd go for @Dependency

own2pwn avatar Jun 30 '19 13:06 own2pwn

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 for isKnownUniquelyReferenced (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 😄

yvbeek avatar Jul 01 '19 19:07 yvbeek

@Zyphrax maybe @Secret(debug: "", release: "") ?

own2pwn avatar Jul 01 '19 20:07 own2pwn

On top of my mind:

  • @SafeArray: the subscript method returns an optional element, nil if the index is out of bounds

andreamazz avatar Jul 03 '19 09:07 andreamazz

@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) ?

yvbeek avatar Jul 03 '19 17:07 yvbeek

@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.

guillermomuntaner avatar Jul 03 '19 18:07 guillermomuntaner

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?

yhkaplan avatar Jul 08 '19 02:07 yhkaplan

@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.

Dimillian avatar Jul 12 '19 15:07 Dimillian

@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.

guillermomuntaner avatar Jul 12 '19 15:07 guillermomuntaner

Right I didn't saw thanks!

Dimillian avatar Jul 13 '19 05:07 Dimillian

@Obfuscate: encrypt and decrypt the string

mrigankgupta avatar Sep 26 '19 03:09 mrigankgupta

Are you guys still working on this repo?

ricardorauber avatar Aug 12 '20 13:08 ricardorauber

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

jasperblues avatar Jan 20 '21 02:01 jasperblues

@Persisted to save Codable values as JSON to the hard drive.

fl034 avatar Jun 22 '22 21:06 fl034

Hello @guillermomuntaner Are you going to archive this repository?

RomanPodymov avatar Nov 10 '22 07:11 RomanPodymov