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
[TSMessage addCustomDesignFromFileWithName:@"AlternativeDesign.json"] crashes #175
Comments
Oh, that makes sense. I'll publish a fix for that. |
Okay, fixed with 92fd1a9 It was only related to the example project. The method itself works in your project, right? |
the issue still occurs in my app, I haven't tested the example project. perhaps the cocoapods spec is broken? it doesn't seem to find the If I add a
|
That usually means, the file cannot be found. Can you check your [appname].app bundle if your JSON file exists? Set an exception breakpoint and see what's causing the crash. |
Using TSMessages pointed at :head, this crash occurs. Setting a breakpoint reveals that https://github.com/toursprung/TSMessages/blob/92fd1a9c3db64615c11aa8d04cab955624457845/Pod/Classes/TSMessageView.m#L72 podBundle is nil. Also, looking at my cocoapod structure, TSMessages has a "Resource" folder but doesn't have a bundle in it at all. Do you have to create the .bundle yourself? Cocoapods seems to suggest you need to point the Podspec to a .bundle file. |
Well, TSMessages uses resource_bundles, like described here: http://guides.cocoapods.org/syntax/podspec.html#resource_bundles Are you using Cocoapods for integrating this library? |
Yep, although my Podfile points to :head to get some of the new features that have been added:
It'll crash at that point because the podBundle variable isn't properly instantiated. |
Can you check if the resource bundle was properly installed with your app in the simulator? |
All this should be fixed with the latest version on master. I'll release a Cocoapods update later today |
after the recent changes
[TSMessage addCustomDesignFromFileWithName:@"AlternativeDesign.json"]
crashes when using a custom design.this is due to the fact that the json file is looked up only inside the new bundle. specifically, this line causes the crash: 5908e4c#diff-66f9603ce433cc6cc7b4df87530f4b9bR76
The text was updated successfully, but these errors were encountered: