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

Fix crash when .Nib is inside a framework bundle. #1050

Merged
merged 2 commits into from
May 14, 2019

Conversation

mrcararia
Copy link
Contributor

I needed to wrap XLForm inside a private framework and implement custom cells.
In this scenario a crash is obtained because the .nib file is not found inside the main bundle.
It is necessary to look for it within the private framework bundle.
This fix the issue.

@@ -155,7 +156,9 @@ -(XLFormBaseCell *)cellForFormController:(XLFormViewController * __unused)formCo

if ([bundle pathForResource:cellResource ofType:@"nib"]) {
_cell = [[bundle loadNibNamed:cellResource owner:nil options:nil] firstObject];
} else {
}else if([bundleForCaller pathForResource:cellResource ofType:@"nib"]){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please respect the style guide: Add a space after } and before { and (.
Same thing below in else

Copy link
Contributor Author

@mrcararia mrcararia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Mathias,
here the fix with the right style.
Sorry.

@mats-claassen mats-claassen merged commit f2383b7 into xmartlabs:master May 14, 2019
@mats-claassen mats-claassen mentioned this pull request Oct 2, 2019
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.

None yet

2 participants