johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.56k stars 565 forks source link

Recompilation doesn't work when Xcode path contains spaces #79

Closed ashfurrow closed 8 years ago

ashfurrow commented 8 years ago

Hey there! Love this library, thanks so much!

Noticed one issue: I have my Xcode versions in different folders, and the folders have a space in them. When I hit the inject button, I get this error:

screen shot 2016-03-09 at 2 25 23 pm

The relevant lines are:

Building iOSInjectionProject/InjectionBundle.xcodeproj
/Applications/Xcode 7.2/Xcode.app/Contents/Developer/usr/bin/xcodebuild  -configuration Debug -arch x86_64 -sdk iphonesimulator

sh: /Applications/Xcode: No such file or directory

Looks like it's try to invoke xcodebuild without quotes, which doesn't work with spaces in the path.

Doesn't sound like a difficult problem to fix, if you wanted to point me in the right direction I can come back with a pull request.

johnno1962 commented 8 years ago

Thanks for the report - Didn’t think of that. It was a simple fix (when you know Perl!) and I’ve pushed it if you want to resync and try.

ashfurrow commented 8 years ago

🎉 I've installed through Alcatraz, would re-installing from there bring in the fix? Happy to test for reproduction :bow:

johnno1962 commented 8 years ago

uninstaling it and reinstalling with Alcatraz should do the trick. It’s was only a script change so you won’t need to restart Xcode.

ashfurrow commented 8 years ago

Seeing another error now, may be unrelated (I had moved Xcode in the meantime since I didn't expect such a fast turnaround :wink:). I know Xcode is sensitive to this, will reboot and report back :+1:

ashfurrow commented 8 years ago

OK, other error was unrelated, this is fixed, thanks! :tada: