johnno1962 / InjectionIII

Re-write of Injection for Xcode in (mostly) Swift
MIT License
4.08k stars 319 forks source link

Unknown argument: -interposable #500

Closed variiance closed 6 months ago

variiance commented 7 months ago

I am trying to use hot reloading through @krzysztofzablocki's Inject, my apologies if this is not the correct place to post the issue. After adding -Xlinker and -interposable flags to my main target (in Other linker flags -> Debug -> Any iOS Simulator SDK, menu bar running with the project root selected, Inject installed through SPM) I am getting the following compile error: clang: error: unknown argument: '-interposable' I am using Xcode 15.2. The library works perfectly following the same steps on a personal project of mine, I only get this error on a larger work project. Could you please point to where the issue may lie?

johnno1962 commented 7 months ago

Hi this is probably due to Xcode adding quotes or spaces around the "-Xlinker -interposable" arguments. The should be on separate lines in the build setting as shown in the README for the https://github.com/johnno1962/InjectionIII project.

variiance commented 6 months ago

Thanks. The issue was I did not add -Xlinker since I already saw that in linker flags. for something else. Apparently that's not how it works :) Added it again, and it works great now!