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

Looking for ideas! #6

Open
guillermomuntaner opened this issue Jun 29, 2019 · 17 comments
Open

Looking for ideas! #6

guillermomuntaner opened this issue Jun 29, 2019 · 17 comments
Labels
help wanted Extra attention is needed

Comments

@guillermomuntaner
Copy link
Owner

Hello everyone!

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

Thanks.

@guillermomuntaner guillermomuntaner added the help wanted Extra attention is needed label Jun 29, 2019
@own2pwn
Copy link
Contributor

own2pwn commented Jun 30, 2019

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

@own2pwn
Copy link
Contributor

own2pwn commented Jun 30, 2019

I'd go for @Dependency

@yvbeek
Copy link

yvbeek commented Jul 1, 2019

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 😄

@own2pwn
Copy link
Contributor

own2pwn commented Jul 1, 2019

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

@andreamazz
Copy link

On top of my mind:

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

@yvbeek
Copy link

yvbeek commented Jul 3, 2019

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

@guillermomuntaner
Copy link
Owner Author

guillermomuntaner commented Jul 3, 2019

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

@yhkaplan
Copy link

yhkaplan commented Jul 8, 2019

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?

@Dimillian
Copy link

Dimillian commented Jul 12, 2019

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

@guillermomuntaner
Copy link
Owner Author

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

@Dimillian
Copy link

Right I didn't saw thanks!

@mrigankgupta
Copy link

@obfuscate: encrypt and decrypt the string

@ricardorauber
Copy link

Are you guys still working on this repo?

@jasperblues
Copy link

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

@fl034
Copy link

fl034 commented Jun 22, 2022

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

@RomanPodymov
Copy link

Hello @guillermomuntaner
Are you going to archive this repository?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

12 participants