Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Loading the dylib
- -(void)load {
- //handle = dlopen([[NSString stringWithFormat:@"%@/Facebook.dylib", pluginPath] UTF8String], RTLD_LAZY);
- handle = dlopen("Facebook.dylib", RTLD_LAZY);
- void *load = dlsym(handle, "post");
- load != NULL && ((BOOL (*) (void)) load)();
- if (load != NULL)
- NSLog(@"Not NULL");
- else
- NSLog(@"Load is NULL");
- dlclose(handle);
- }
- //This is the dylib that should be loaded. (Facebook.dylib)
- BOOL post () {
- NSLog(@"Dylib function called!");
- UIAlertView *error = [[UIAlertView alloc] initWithTitle:@"Alert" message:@"It worked!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
- [error show];
- [error release];
- return YES;
- }
Add Comment
Please, Sign In to add comment