johnno1962 / injectionforxcode

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

When multiple targets exist in project, bundle compilation fails #158

Closed zintus closed 7 years ago

zintus commented 7 years ago

Hello and thanks for awesome project!

Bundle compilation fails for me being unable to find frameworks to link with. After some research i've found, that in injectionSource.pl:130 it's undefined for which target build settings should be shown. In my case xcodebuild selects wrong target, therefore rendering derived inlcude paths wrong.

Maybe it's related to target selection, but generated framework search path contains comma in the middle of path. -F'/Users/zintus/Library/Developer/Xcode/DerivedData/IO-effdteicbasathfqikibhumkmzvc/Build'/Products/Debug-iphonesimulator

Thanks.

johnno1962 commented 7 years ago

Hi, from memory, the extra quote is intentional.

zintus commented 7 years ago

What about target selection?

johnno1962 commented 7 years ago

Unfortunately injection doesn’t know about targets. Can you move the correct target in your project to make it the default?

zintus commented 7 years ago

Reordering scheme in Xcode doesn't help, but editing scheme container directly helps.

Thank you :)