InjectionIII: Wrong class is injected

đź’‰ Compiling /Users/mtriohin/Documents/XcodeProjects/ios/AppName/Controllers/Unauthorized/Login/LoginCardView.swift
đź’‰ Loading .dylib ...
objc[7205]: Class _TtC7AppName10SearchView is implemented in both /Users/mtriohin/Library/Developer/CoreSimulator/Devices/2AE15907-717E-4BB0-B912-28647383A11E/data/Containers/Bundle/Application/50C9FF9D-3BC2-4743-8153-7E8B03AF394B/AppName.app/AppName (0x1046fb560) and /Users/mtriohin/Library/Developer/CoreSimulator/Devices/2AE15907-717E-4BB0-B912-28647383A11E/data/Containers/Data/Application/4FB026A0-E9FC-4784-BA40-A13561410C00/tmp/eval110.dylib (0x10dda8aa8). One of the two will be used. Which one is undefined.
💉 Loaded .dylib - Ignore any duplicate class warning ⬆️
đź’‰ Injected class 'AppName.SearchView' (5,8)
đź’‰ Interposed 7 function references.

beta 7 image image image

image

Same behaviour with last ~3 Xcode and mac os betas, tried also older versions of InjectionIII - nothing changed, worked fine with Xcode 12.5.1 but after updating to mac os beta 7 cannot use Xcode 12

image

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 60 (34 by maintainers)

Most upvoted comments

Hi, thanks for constant improvements and updates!

I didn’t get a chance to try the new features (including device injection) but I used it yesterday for some tasks (basic non final class injections) and it worked pretty fine.

Hey Mihail, We’re about to release https://github.com/johnno1962/InjectionIII/releases/tag/4.1.7 if you’d like to give it a try. Should just be a consolidation of the features we discussed above but may also have added injection of private struct and final class members.

Thanks for the two hours! I can see you really want to be able to inject code in getters and I guess that is a reasonable expectation. I’ve pushed b936b3e81bf503369cefb9e71afa4603df9134da which should enable this for you.

Great, I’ll create ANOTHER release. I’m reasonably satisfied this shouldn’t cause problems. If I’m feeling brave I might release it for the “interposing” (i.e. structs etc.) side of things after I’ve thought about it a bit more. Thanks again.

OK, If you could switch back to HotReloading, I’ve pushed 955eab81f5bde8cb7e7eaf9a9e3254736fd29956 which should enable the patching of getters and setters in the vtable for classes. Do you have the time to give it a try?

Thanks, that’s good to know. I’ve filed a radar with Apple (FB9648402) and we’ll see what comes of it but we have a fix for now. Thank you very much for reporting this and testing out the various versions. You can switch back to HotReloading main branch, released version 2.1.4 now. I’ve prepared a new 3.1.0 release of the app.