Closed Saik0s closed 6 years ago
Problem is that correct deviceRoot
in case of AppCode sets only after isDevice
, isSimulator
and isAndroid
variables. That's why you will get incorrect value for isIOS
variable, next - incorrect value for template
, InjectionBundle
and finaly error because of undefined logDir
- "Please inject with Xcode before using AppCode".
In my case AppCode plugin was expecting OSXInjectionProject instead of iOSInjectionProject.
Are you using the plugin or the app version?
Appcode plugin. Here is a piece of code from AppCode plugin, you can see mainFilePath
processScriptOutput(script, new String[]{resourcesPath + script, resourcesPath, project.getProjectFilePath(), mainFilePath, executablePath, arch, "" + ++patchNumber, "" + flags, unlockCommand, serverAddresses(), selectedFile}, event);
And here is a piece of code from common.pm where these arguments are assigned to variables.
($resources, $workspace, $deviceRoot, $executable, $arch, $patchNumber, $flags,
$unlockCommand, $addresses, $selectedFile, $xcodeApp, $buildRoot, $logDir, $learnt) = @ARGV;
As you can see mainFilePath
is assigned to $deviceRoot
That looks like it’s the old plugin version you are using. Have you tried the new app version and AppCode plugin? https://github.com/johnno1962/InjectionApp. I’d rather support that than making changes to code that I thought was working this late in the day.
Yeah, App works, but it requires an additional application to be running. Anyway, just wanted to inform you about a little issue in the old code.
Thank you for your great injector!
Thanks for reporting the problem & I’m sure you’re right. Sorry I can’t revisit that code just now.
Can you supply more information about this patch please? Are you using a device with AppCode? I have no way of testing this.