InjectionIII: Loading .dylib has failed

Hello 👋

First off thanks for the amazing library - it’s been a game changer.

However, I’m hitting this issue when hot reloading a module in a larger (~100k LoC) project. I’ve tried re-running to no avail, and I also tried removing the indicated type (MockSampleService) but a similar error is thrown with another type.

Any ideas on how I could fix?

💉 Loading .dylib …

⚠️ dlopen() error: dlopen(/Users/jwright/Library/Developer/CoreSimulator/Devices/2D52E204-AAB5-413D-9089-5DFDC3B89053/data/Containers/Data/Application/096D4D0C-738E-44A4-B0A3-BCC495789135/tmp/eval101.dylib, 0x0002): symbol not found in flat namespace ‘_$s10Networking18MockSampleServiceVAA0cD0AAMc’

💉 ⚠️ Loading .dylib has failed, This is likely because Swift code being injected references a function using a default argument or a member with access control that is too restrictive or perhaps an XCTest that depends on code not normally linked into your application. Rebuilding and re-running your project (without a build clean) can resolve this.

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

An idea a bit from left field, have you tried adding “Other linker flags”: -Xlinker -undefined -Xlinker dynamic_lookup?

At this point I’d do a build clean and try again and see where you’re situated.