Skip to content

Commit e91205e

Browse files
Merge pull request #84 from johnno1962/main
Inject on a device?
2 parents 5b31807 + 31ed726 commit e91205e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Sources/Inject/Inject.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ public extension InjectListener {
3232
#if DEBUG
3333
private var loadInjectionImplementation: Void = {
3434
guard objc_getClass("InjectionClient") == nil else { return }
35+
// If project has a "Build Phase" running this script, Inject should
36+
// work on a device (requires an InjectionIII github release 4.8.0+):
37+
// /Applications/InjectionIII.app/Contents/Resources/copy_bundle.sh
38+
if let path = Bundle.main.path(forResource:
39+
"iOSInjection", ofType: "bundle") ??
40+
Bundle.main.path(forResource:
41+
"macOSInjection", ofType: "bundle"),
42+
Bundle(path: path)?.load() == true {
43+
return
44+
}
3545
#if os(macOS)
3646
let bundleName = "macOSInjection.bundle"
3747
#elseif os(tvOS)

0 commit comments

Comments
 (0)