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

Support namespaces in .xcassets #11

Open
grzegorzkrukowski opened this issue Jan 25, 2018 · 2 comments
Open

Support namespaces in .xcassets #11

grzegorzkrukowski opened this issue Jan 25, 2018 · 2 comments

Comments

@grzegorzkrukowski
Copy link

Hey

Currently this script is not supporting namespaces in .xcassets, would be great to have it working.
Swift version handles those properly, allowing duplicated names.

@guidosabatini-sysdata
Copy link
Contributor

What do you mean for namespaces? Are they the groups/folders you can create in the assets to organize the images?

@grzegorzkrukowski
Copy link
Author

@guidosabatini-sysdata Right now images are generated into one flat object, which creates few possible conflicts when you have same image names into your project:

  1. Having same image name as assets catalog name creates a conflict
  2. Having same image name on normal folders and inside assets catalog creates a conflict
  3. Having same image names in different namespaces in assets catalog creates a conflict, normally here it's possible to have imageNamed:@"namespace1/button" and imageNamed:@"namespace2/button".

If you compare that to R.swift in Swift - they do generate separate objects for each assets catalog or folder so you are doing R.assetscatalogname.namespace1.button for example.

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