johnno1962 / InjectionIII

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

Loading .dylib has failed #495

Closed xiaoklong closed 6 months ago

xiaoklong commented 7 months ago

💉 ⚠️ dlopen() error: dlopen(/Users/xiaokanglong/Library/Developer/CoreSimulator/Devices/0AE81ABB-E66F-4791-967D-F4F28BD9EA80/data/Containers/Data/Application/6276043C-7C9A-457B-B34B-07FF085AD5A0/tmp/eval105.dylib, 0x0002): symbol not found in flat namespace '_KGTingAlertTag_Collect_Set_Privacy_Status' 💉 ⚠️ 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.

_KGTingAlertTag_Collect_Set_Privacy_Status is const

johnno1962 commented 7 months ago

HI, This is likely due to restricted "visibility" of that symbol. This sometimes happens when you use a third party framework. You will not be able to inject the particular file that references that symbol.