johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.55k stars 565 forks source link

It seems not work on simulator,Xcode 10.1 #274

Closed Jerry4me closed 5 years ago

Jerry4me commented 5 years ago

Simulator:iPhone 6s 10.3.1 Xcode:Xcode 10.1(10B61)

Error Message:

Loading .dylib - Ignore any duplicate class warning... dlopen() error: dlopen(/Users/xudequan/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval102.dylib, 2): Symbol not found: ___llvm_profile_runtime Referenced from: /Users/xudequan/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval102.dylib Expected in: flat namespace in /Users/xudequan/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval102.dylib

johnno1962 commented 5 years ago

Hi, this is due to collecting test coverage data. Please turn it off in your project scheme.

Jerry4me commented 5 years ago

Hi, this is due to collecting test coverage data. Please turn it off in your project scheme.

Thanks !!!

teameh commented 5 years ago

Hi @johnno1962 I'm still running into this problem even when coverage is turned off..

💉 *** Compiling /Users/veen011/Projects/Apps/MyProject/MenuViewController.swift ***
💉 Loading .dylib - Ignore any duplicate class warning...
💉 *** dlopen() error: dlopen(/Users/veen011/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval101.dylib, 2): Symbol not found: ___llvm_profile_runtime
  Referenced from: /Users/veen011/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval101.dylib
  Expected in: flat namespace
 in /Users/veen011/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval101.dylib ***

Using v1.4 from the AppStore and this in my AppDelegate:

Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/iOSInjection10.bundle")!.load()

Your GettingStarted Project works fine though..

johnno1962 commented 5 years ago

Sounds like you need to clean and rebuild your project from scratch.

frowing commented 5 years ago

@johnno1962 Hitting the same issue. Cleaning and rebuilding from scratch did not work. Any other ideas?