johnno1962 / InjectionNext

Fourth evolution of Code Injection for Xcode
MIT License
76 stars 2 forks source link

InjectionNext doesn't allow app to build on device #27

Closed Perjan closed 3 weeks ago

Perjan commented 3 weeks ago

I integrated InjectionNext yesterday after transitioning from InjectionIII. So far I loved it when building on the simulator.

Unfortunately it doesn't allow the project to build on a real device.

App Structure

What I tried

This is the build error.

CleanShot 2024-10-31 at 12 00 50@2x

Please @johnno1962 help me solve it, because this is blocking me from submitting to the App Store. Thanks.

Perjan commented 3 weeks ago

Here is the error log as well. Error-InjectionNext.txt

johnno1962 commented 3 weeks ago

This is Xcode 16.1 right? Can you try turning off the "Undefined behaviour Sanitizer" in your scheme?

image
Perjan commented 3 weeks ago

I turned it off. Now it works. Thanks John. The app runs fine on the device.

johnno1962 commented 3 weeks ago

It's a strange problem. I have a project which by chance replicates what you've seem in Xcode 15 as well when you build for device with "Undefined behaviour Sanitizer" but, when I tried to prepare a replicating project for Apple I couldn't get it to fail and can't see what the difference would be. ¯\_(ツ)_/¯. Any other strange problems with InjectionNext let me know!

Perjan commented 3 weeks ago

I am working on Xcode 16.1. Maybe having frameworks that also have InjectionNext and Inject as dependencies might trigger it?

johnno1962 commented 3 weeks ago

I tried adding a framework but it doesn't seem to be that. Seems to be a very odd edge case in the build system related to the InjectionLite or DLKit Swift Packages which I have a smallish replicating project which doesn't build for simulator or device, so I raised FB15653175.