Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial setup question #73

Closed
robowen5mac opened this issue Nov 4, 2018 · 7 comments
Closed

Initial setup question #73

robowen5mac opened this issue Nov 4, 2018 · 7 comments

Comments

@robowen5mac
Copy link

Sorry for the newbie question, but I am working to install this tool on a machine for the first time and cannot get it to work. Running 10.13.6 or 10.14 with Xcode 10.1, I can download the InjectionIII application from the Mac App Store or from the link provided in this application. It run and creates the menu bar item with choices like Open Project, Open Recent and File Watcher (Run XProbe is greyed out). I downloaded the GettingStarted example from http://johnholdsworth.com/injection.html. If I try to open this project using the extensions Open project menu, the *.xcodeproject file is greyed out and selecting various levels of the project directory does not do anything, with and without Xcode open. The Menu icon remains blue no matter what I do and there are no options to Inject code, etc. I am guessing there is something I have wrong in my setup, but am at a loss. Any suggestions to get things started would be appreciated.

@zenangst
Copy link
Collaborator

zenangst commented Nov 6, 2018

Hey @robowen5mac, no questions are dumb, dumb is not asking questions :)

If you are using Xcode 10 on your machines, then you need to load the correct bundle when your application starts. I don't know which one is used in the getting started example but check the line Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle")?.load().

So if you are using Xcode 10, you need to change this to Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/iOSInjection10.bundle")?.load().

Would you mind sharing any logs that you are getting when running the Xcode project, that usually helps to narrow things down :)

@robowen5mac
Copy link
Author

robowen5mac commented Nov 6, 2018

Thanks. I updated the bundle path and no when the GettingStarted app launches , I am now prompted to load the project directory and if I pick the top level directory, everything starts working. When I had read the install instructions I thought this step to load the bundle was optional:

Injection no longer requires you to change your project as for iOS is always available if you use the "Start Injection" menu (or type control-=) each time you start your app.

If you get tired of this or you want to develop 32 bit apps or tvOS or macOS you can and add one of the following to your applicationDidFinishLaunching:

Not sure if that is still the intended behaviour or if I misread things, but explicitly adding the call to load the bundle solved my issues.

@zenangst
Copy link
Collaborator

zenangst commented Nov 7, 2018

Hey mate, to clarify this a bit. The bundle can no longer be optional as it does some of the heavy liftings with InjectionIII. I think the statement/quote that you posted can come off as a bit confusing as it is legacy. When InjectionIII started to get distributed via the Mac App Store, @johnno1962 needs to change a bunch of things to abide by the sandboxing rules. One being, getting the user to grant permission to the Xcode project directory to give the file watcher access, and the bundle is needed in order to establish a connection between the iOS/tvOS/macOS app with the server (which is InjectionIII).

Hope that clarified it a tiny bit... or I might just have made things worse 😎

@robowen5mac
Copy link
Author

robowen5mac commented Nov 7, 2018 via email

@zenangst
Copy link
Collaborator

zenangst commented Nov 8, 2018

@robowen5mac glad that the explanation help. Updating the README is... as always, on our todo list. Thanks for pointing it out!

@robowen5mac
Copy link
Author

Thanks. Was just about to do a pull request, but see you already made the changes. Thanks for sorting it out so quickly.

@zenangst
Copy link
Collaborator

zenangst commented Nov 8, 2018

Closing this now ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants