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

Load images from framework bundle #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Load images from framework bundle #20

wants to merge 1 commit into from

Conversation

qtdzz
Copy link
Collaborator

@qtdzz qtdzz commented Apr 2, 2018

This PR fixes the issue when using this FW in another project, the images can't be loaded

@ghost
Copy link

ghost commented Jul 19, 2018

This won't work because xcassets bundles cannot be accessed from a resource bundle. They need to be included in the 'resources' tag (instead of 'resources_bundles') in the podspec.

After that, you can access them via the framework bundle.

@ghost
Copy link

ghost commented Jul 19, 2018

For anyone looking for a simple workaround, copying the pod's xcassets into your local project works for now.

@qtdzz
Copy link
Collaborator Author

qtdzz commented Jul 19, 2018

This won't work because xcassets bundles cannot be accessed from a resource bundle. They need to be included in the 'resources' tag (instead of 'resources_bundles') in the podspec.
After that, you can access them via the framework bundle.

Hi, thanks for checking it. Could you please elaborate how it doesn't work for you?
I have just moved the example project out of the library and it still seems to work for me https://github.com/qtdzz/ExampleAMVC (I don't know why when they are in the same workspace, it always works regardless the different podspec configurations and image loading)

Apparently, I had tried using resource instead of resource_bundle but it didn't work back then. Now it just works (I have no idea). And when doing this, I also notice that they recommend to use resource_bundle instead of resource, that's why I ended up in this PR (http://guides.cocoapods.org/syntax/podspec.html#resource_bundles)

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

Successfully merging this pull request may close these issues.

1 participant