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

Resources not included to bundle #174

Closed
choomz opened this issue Aug 20, 2014 · 4 comments
Closed

Resources not included to bundle #174

choomz opened this issue Aug 20, 2014 · 4 comments

Comments

@choomz
Copy link

choomz commented Aug 20, 2014

Hi there,

First, thanks for this cool library.

I'm actually facing a strange bug with this lib & cocoapods. Actually the lib crash because the file TSMessagesDefaultDesign.jsonis not embedded with the app.

So it crash here https://github.com/toursprung/TSMessages/blob/master/TSMessages/Views/TSMessageView.m#L69
because the file is not found.

I checked the sh file and actually everything looks ok :

install_resource "TSMessages/TSMessages/Resources/Images/NotificationBackgroundError.png"
install_resource "TSMessages/TSMessages/Resources/Images/[email protected]"
install_resource "TSMessages/TSMessages/Resources/Images/NotificationBackgroundErrorIcon.png"
install_resource "TSMessages/TSMessages/Resources/Images/[email protected]"
install_resource "TSMessages/TSMessages/Resources/Images/NotificationBackgroundMessage.png"
install_resource "TSMessages/TSMessages/Resources/Images/[email protected]"
install_resource "TSMessages/TSMessages/Resources/Images/NotificationBackgroundSuccess.png"
install_resource "TSMessages/TSMessages/Resources/Images/[email protected]"
install_resource "TSMessages/TSMessages/Resources/Images/NotificationBackgroundSuccessIcon.png"
install_resource "TSMessages/TSMessages/Resources/Images/[email protected]"
install_resource "TSMessages/TSMessages/Resources/Images/NotificationBackgroundWarning.png"
install_resource "TSMessages/TSMessages/Resources/Images/[email protected]"
install_resource "TSMessages/TSMessages/Resources/Images/NotificationBackgroundWarningIcon.png"
install_resource "TSMessages/TSMessages/Resources/Images/[email protected]"
install_resource "TSMessages/TSMessages/Resources/Images/NotificationButtonBackground.png"
install_resource "TSMessages/TSMessages/Resources/Images/[email protected]"
install_resource "TSMessages/TSMessages/Resources/TSMessagesDefaultDesign.json"

The lib is included with

pod "TSMessages"

in the pod file.

I also tried

pod "TSMessages", "~> 0.9"

which is the same, it gives me the 0.9.9 version.

Maybe you have some clue ?

Thanks a lot !

@choomz
Copy link
Author

choomz commented Aug 20, 2014

Nvm, my mistake, I checked the "Run script only when installing" checkbox in the build phases ... dunno why.

@choomz choomz closed this as completed Aug 20, 2014
@alex-samnas
Copy link

Hello,
Thank for providing such an amazing library.

I have been using this library for a lot projects and always has been working great.

But I am trying to implement it in a project now and I have the same issue as above:
the lib crash because the file TSMessagesDefaultDesign.json is not embedded with the app.

The lib is included with:
pod "TSMessages"

Thanks. :)

@MartinP7r
Copy link

a work-around would be to include the resources files via the bundle resources of your build target (Build Phases -> Copy Bundle Resources -> Add Other...)
not sure why this isn't handled automatically, though

the fix in this issue might work: #257 (comment)

@jeremy-jm
Copy link

@cyrus86
Thanks your answer, my mistake has been resolved by your comment.

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

4 participants