Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Error loading bundle resource

dominhquydominhquy Posts: 1New Users Noob
I'm working with a THEOS project. In my project, I want to use other frameworks or libraries with their's bundle resource (*.bundle) such as Google Plus framework. Because, this isn't a Xcode project so it hasn't Copy Bundle Resources section. I use NSBundle class to load bundle resource but I get this error
Error Domain=NSCocoaErrorDomain Code=4 "The bundle “MyBundle” couldn’t be loaded because its executable couldn’t be located." UserInfo=0x15a308d0 {NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSLocalizedFailureReason=The bundle’s executable couldn’t be located., NSLocalizedDescription=The bundle “MyBundle” couldn’t be loaded because its executable couldn’t be located., NSBundlePath=/var/mobile/Documents/MyBundle.bundle}

Here's my code
NSString *bundlePath = @"/var/mobile/Documents/MyBundle.bundle";
NSBundle *myBundle = [NSBundle bundleWithPath:bundlePath];
NSError *error;
BOOL loaded = [myBundle loadAndReturnError:&error];

NSLog(@"loaded: %@", (loaded ? @"TRUE" : @"FALSE"));
NSLog(@"error: %@", error);

I already try with other path and other bundle resource but I still get the same error
Tagged:
Sign In or Register to comment.