Skip to content

Commit

Permalink
Merge pull request #84 from johnno1962/main
Browse files Browse the repository at this point in the history
Inject on a device?
  • Loading branch information
krzysztofzablocki committed Jan 18, 2024
2 parents 5b31807 + 31ed726 commit e91205e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/Inject/Inject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ public extension InjectListener {
#if DEBUG
private var loadInjectionImplementation: Void = {
guard objc_getClass("InjectionClient") == nil else { return }
// If project has a "Build Phase" running this script, Inject should
// work on a device (requires an InjectionIII github release 4.8.0+):
// /Applications/InjectionIII.app/Contents/Resources/copy_bundle.sh
if let path = Bundle.main.path(forResource:
"iOSInjection", ofType: "bundle") ??
Bundle.main.path(forResource:
"macOSInjection", ofType: "bundle"),
Bundle(path: path)?.load() == true {
return
}
#if os(macOS)
let bundleName = "macOSInjection.bundle"
#elseif os(tvOS)
Expand Down

0 comments on commit e91205e

Please sign in to comment.