Giter Site home page Giter Site logo

Comments (22)

rankinit avatar rankinit commented on August 16, 2024 1

Getting this issue on the latest branchio using CocoaPods. *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </var/containers/Bundle/Application/5300DA99-B369-446D-8F5E-A04D66D988AB/MyApp.app> (loaded)' with name 'BranchInviteViewController''

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on August 16, 2024

Hi @hsavit1, sorry you're seeing issues. Can you tell me first how you're including the code? It appears that the bundle you have is missing the Invite Controller, though I'm not sure why that would be the case. I'll try to look into this shortly, but may not be able to get back to you with more info until tomorrow.

from branch-ios-invite-sdk.

hsavit1 avatar hsavit1 commented on August 16, 2024

Thanks @shortstuffsushi for the quick reply. I've installed the BranchInvite through cocoapods, and most functions have been working smoothly thus far. I can see all of the files including the BranchInviteViewController Xib, however Xcode still gives me this NSInternalInconsistencyException at runtime.

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on August 16, 2024

When you look at the Target Membership in Xcode, is that BranchInviteViewController.xib file ticked for the BranchInviteBundle?

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on August 16, 2024

Like this

screen shot 2015-06-21 at 6 07 22 pm

from branch-ios-invite-sdk.

hsavit1 avatar hsavit1 commented on August 16, 2024

Yes, I think that was a very good question to ask, but unfortunately it looks exactly like that! I will try a few more things and get back to you shortly

from branch-ios-invite-sdk.

hsavit1 avatar hsavit1 commented on August 16, 2024

P.S. Im working with an 8.0 deployment target xcode 6.3

from branch-ios-invite-sdk.

hsavit1 avatar hsavit1 commented on August 16, 2024

interestingly, it gets through this method without crashing

+ (UINavigationController *)branchInviteViewControllerWithDelegate:(id <BranchInviteControllerDelegate>)delegate {
NSBundle *branchInviteBundle = [BranchInviteBundleUtil branchInviteBundle];
BranchInviteViewController *branchInviteController = [[BranchInviteViewController alloc] initWithNibName:@"BranchInviteViewController" bundle:branchInviteBundle];
branchInviteController.delegate = delegate;

return [[UINavigationController alloc] initWithRootViewController:branchInviteController];
}

from branch-ios-invite-sdk.

hsavit1 avatar hsavit1 commented on August 16, 2024

Also ive tried most of the standard things like clean/build , deleting derived data, reinstalling the cocoapods, checking the copybundle-rescoures, etc

It crashes on
[super loadView];

in the branch invite view controller

from branch-ios-invite-sdk.

hsavit1 avatar hsavit1 commented on August 16, 2024

so i did a little investigation, and the bundle does exist, although i had to do some hackery to actually get it

however, the class still cannot access the BranchInviteDefaultContactCell. When I check all the Nib contents in the bundle, I can't find any objects

+ (NSBundle *)branchInviteBundle {
NSString *branchInviteBundlePath = [[NSBundle mainBundle] pathForResource:@"BranchInvite" ofType:@"bundle"];
NSBundle *branchInviteBundle = [NSBundle bundleWithPath:branchInviteBundlePath];

NSArray *allbundles = [NSBundle allBundles];
NSBundle *bnd;
for(NSBundle *bundle in allbundles){
    if ([bundle.resourcePath containsString:@"mobile/Containers"]) {
        bnd = bundle;
    }
}

return bnd;
}

+ (UINib *)nibNamed:(NSString *)nibName {
NSBundle *branchInviteBundle = [BranchInviteBundleUtil branchInviteBundle];

NSArray *n = [branchInviteBundle pathsForResourcesOfType:@"nib" inDirectory:branchInviteBundle.bundlePath];


UINib *nib = [UINib nibWithNibName:nibName bundle:branchInviteBundle];

//    NSArray   *niby = [nib instantiateWithOwner:nil options:nil];

return nib;
}

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on August 16, 2024

@hsavit1 you can check the actual contents of a bundle on your file system -- a bundle is really just a directory. Could you locate it on your file system and see what's inside of it?

from branch-ios-invite-sdk.

hsavit1 avatar hsavit1 commented on August 16, 2024

@shortstuffsushi I decided it just wasn't worth it to continue going with this. I just installed the SDK manually and it works! Thanks for trying to help

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on August 16, 2024

Oh, so you're only no longer using Cocoapods, and that resolved it for you? I'm curious - are you trying to develop an iPad app? I just ran across this, which may be of note. However, if you got it working, I may stop pursuing for now.

screen shot 2015-06-21 at 11 13 10 pm

from branch-ios-invite-sdk.

hsavit1 avatar hsavit1 commented on August 16, 2024

Nope, iPhone. I decided to use the SDK instead. Still using cocoapods for other pods. Best of luck- I'm assuming this is Xcode not being nice but you never know. This is def a tough error to figure out, I'd suggest you move on to other things lol

from branch-ios-invite-sdk.

juanpdelat avatar juanpdelat commented on August 16, 2024

@shortstuffsushi I am having the same issue, I fixed it (hacked really) by adding manually the resources folder to my project, I am assuming there is an issue with that folder in the pod, although the BranchWelcomeViewController seems to be working correctly.

I will try to dig a little further tomorrow.

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on August 16, 2024

Hi @juanpdelat. Thanks for digging. I'm actually not working with Branch anymore, or maintaining this project, if you need help from our end, try @aaustin or @danwalkowski

from branch-ios-invite-sdk.

 avatar commented on August 16, 2024

These issues are due to a build configuration problem that I haven't sorted out yet. The example app runs fine in the simulator, but -only- on iPhones, which I believe is just a lucky coincidence. It crashes immediately if you try to run it on an iPad, because it can't load the invite xibs.

from branch-ios-invite-sdk.

fogunkoya avatar fogunkoya commented on August 16, 2024

@aaustin Hi there Austin was this issue ever sorted out?

from branch-ios-invite-sdk.

aaustin avatar aaustin commented on August 16, 2024

Yes - this should be resolved now due to the commits in Feb! I'm closing the ticket out.

from branch-ios-invite-sdk.

timefrancesco avatar timefrancesco commented on August 16, 2024

same here

from branch-ios-invite-sdk.

papanton avatar papanton commented on August 16, 2024

same issue here for latest version using swift

from branch-ios-invite-sdk.

francisjervis avatar francisjervis commented on August 16, 2024

See #40 - this should have been fixed with the merge for #38 but it looks like those changes weren't pushed to release?

from branch-ios-invite-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.