You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am trying to inject a bundle into a certain process. I have created a new Xcode Project which solely handles the injection. I added the necessary frameworks and project files to the app. And have also added an "injectee" bundle to the project. I feel that everything that I am doing is right however I keep occurring with the messages in the log:
Hello,
I am trying to inject a bundle into a certain process. I have created a new Xcode Project which solely handles the injection. I added the necessary frameworks and project files to the app. And have also added an "injectee" bundle to the project. I feel that everything that I am doing is right however I keep occurring with the messages in the log:
mach_inject failing.. (os/kern) successful
mach inject done? 4
MyApp[34807:c07] Failure code 4
Here is my relevant code:
{
if ([bundlePath isAbsolutePath] == 0) {
bundlePath = [[[[NSFileManager defaultManager] currentDirectoryPath] stringByAppendingPathComponent:bundlePath] stringByStandardizingPath];
}
mach_error_t err = mach_inject_bundle_pid([bundlePath fileSystemRepresentation], pid);
if (err != err_none)
NSLog(@"Failure code %x", err);
}
NSString *bundlePath = [[NSBundle mainBundle]
pathForResource:@"Injectee" ofType:@"bundle"];
pid_t pid = GetPidByBundleIdentifier(@"com.bundle.identifier");
[self injectBundleWithPath:bundlePath intoProcess:pid];
}
I am not sure why this error is happening and was wondering if other users have experienced the same thing. Thanks.
The text was updated successfully, but these errors were encountered: