App on a Real iPhone fails to inject generated DYLIBS due to codesign issues
π₯ Sending broadcast packet to connect to your development host Sherlocks-Air.
π₯ If this fails, hardcode your Mac's IP address in HotReloading/Package.swift
or add an environment variable INJECTION_HOST with this value.
π₯ You'll need to be running a recent copy of the InjectionIII.app downloaded from https://github.com/johnno1962/InjectionIII/releases
π₯ And have typed: defaults write com.johnholdsworth.InjectionIII deviceUnlock any
Broadcasting to pdp_ip0.3:100.66.120.234 to locate InjectionIII host...
Broadcasting to ipsec0.10:192.0.0.6 to locate InjectionIII host...
Broadcasting to en0.16:192.168.1.255 to locate InjectionIII host...
Broadcasting to ipsec3.23:192.0.0.6 to locate InjectionIII host...
π₯ Connecting to Sherlocks-Air (192.168.1.144)...
π₯ HotReloading connected /Users/sherlockluk/Documents/Proj/Swift/CoverArt/CoverArt.xcodeproj
π₯ Watching files under the directory /Users/sherlockluk/Documents/Proj/Swift/CoverArt
π₯ π β οΈ Your project file seems to be in the Desktop or Documents folder and may prevent InjectionIII working as it has special permissions.
π₯ Compiling /Users/sherlockluk/Documents/Proj/Swift/CoverArt/CoverArt/Views/CameraView.swift
π₯ Loading .dylib ...
π₯ β οΈ dlopen() error: dlopen(/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib, 0x0002): tried: '/usr/lib/system/introspection/eval101.dylib' (no such file, not in dyld cache), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (code signature invalid in <1EF51F23-FFB1-383F-A933-4C3DD40782A2> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0), '/private/preboot/Cryptexes/OS/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (code signature invalid in <1EF51F23-FFB1-383F-A933-4C3DD40782A2> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0)
π₯ β οΈ Loading .dylib has failed due to invalid code signing.
π₯ Add the following as a Run Script/Build Phase:
defaults write com.johnholdsworth.InjectionIII "$PROJECT_FILE_PATH" "$EXPANDED_CODE_SIGN_IDENTITY"
π₯ β οΈ Injection error: Error Domain=SwiftEval Code=-1 "dlopen() error: dlopen(/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib, 0x0002): tried: '/usr/lib/system/introspection/eval101.dylib' (no such file, not in dyld cache), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (code signature invalid in <1EF51F23-FFB1-383F-A933-4C3DD40782A2> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0), '/private/preboot/Cryptexes/OS/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (code signature invalid in <1EF51F23-FFB1-383F-A933-4C3DD40782A2> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0)
π₯ β οΈ Loading .dylib has failed due to invalid code signing.
π₯ Add the following as a Run Script/Build Phase:
defaults write com.johnholdsworth.InjectionIII "$PROJECT_FILE_PATH" "$EXPANDED_CODE_SIGN_IDENTITY"" UserInfo={NSLocalizedDescription=dlopen() error: dlopen(/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib, 0x0002): tried: '/usr/lib/system/introspection/eval101.dylib' (no such file, not in dyld cache), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (code signature invalid in <1EF51F23-FFB1-383F-A933-4C3DD40782A2> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0), '/private/preboot/Cryptexes/OS/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (code signature invalid in <1EF51F23-FFB1-383F-A933-4C3DD40782A2> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval101.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0)
π₯ β οΈ Loading .dylib has failed due to invalid code signing.
π₯ Add the following as a Run Script/Build Phase:
defaults write com.johnholdsworth.InjectionIII "$PROJECT_FILE_PATH" "$EXPANDED_CODE_SIGN_IDENTITY"}
π₯ Compiling /Users/sherlockluk/Documents/Proj/Swift/CoverArt/CoverArt/Views/CameraView.swift
π₯ Loading .dylib ...
π₯ β οΈ dlopen() error: dlopen(/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib, 0x0002): tried: '/usr/lib/system/introspection/eval102.dylib' (no such file, not in dyld cache), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (code signature invalid in <06FB8E08-C429-379C-A376-7E40924F224F> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0), '/private/preboot/Cryptexes/OS/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (code signature invalid in <06FB8E08-C429-379C-A376-7E40924F224F> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0)
π₯ β οΈ Loading .dylib has failed due to invalid code signing.
π₯ Add the following as a Run Script/Build Phase:
defaults write com.johnholdsworth.InjectionIII "$PROJECT_FILE_PATH" "$EXPANDED_CODE_SIGN_IDENTITY"
π₯ β οΈ Injection error: Error Domain=SwiftEval Code=-1 "dlopen() error: dlopen(/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib, 0x0002): tried: '/usr/lib/system/introspection/eval102.dylib' (no such file, not in dyld cache), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (code signature invalid in <06FB8E08-C429-379C-A376-7E40924F224F> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0), '/private/preboot/Cryptexes/OS/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (code signature invalid in <06FB8E08-C429-379C-A376-7E40924F224F> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0)
π₯ β οΈ Loading .dylib has failed due to invalid code signing.
π₯ Add the following as a Run Script/Build Phase:
defaults write com.johnholdsworth.InjectionIII "$PROJECT_FILE_PATH" "$EXPANDED_CODE_SIGN_IDENTITY"" UserInfo={NSLocalizedDescription=dlopen() error: dlopen(/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib, 0x0002): tried: '/usr/lib/system/introspection/eval102.dylib' (no such file, not in dyld cache), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (code signature invalid in <06FB8E08-C429-379C-A376-7E40924F224F> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0), '/private/preboot/Cryptexes/OS/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (code signature invalid in <06FB8E08-C429-379C-A376-7E40924F224F> '/private/var/mobile/Containers/Data/Application/CDA99D2C-2406-4733-A312-24E9B44E97C1/tmp/eval102.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x00019AA0, codeBlobSize=0x00004DD0)
π₯ β οΈ Loading .dylib has failed due to invalid code signing.
π₯ Add the following as a Run Script/Build Phase:
defaults write com.johnholdsworth.InjectionIII "$PROJECT_FILE_PATH" "$EXPANDED_CODE_SIGN_IDENTITY"}
I have the following build scripts:
defaults write com.johnholdsworth.InjectionIII $SRCROOT 98E0C49655785E7E247956F9017FD937D4948AE1
RESOURCES=/Applications/InjectionIII.app/Contents/Resources
if [ -f "$RESOURCES/copy_bundle.sh" ]; then
"$RESOURCES/copy_bundle.sh"
fi
Bundle loaded at launch:
#if DEBUG
if let path = Bundle.main.path(forResource:
"iOSInjection", ofType: "bundle") ??
Bundle.main.path(forResource:
"macOSInjection", ofType: "bundle") {
Bundle(path: path)!.load()
}
#endif
Do I have to self-sign InjectionIII?
Hi, $SRCROOT is wrong where you set the default, it should be "$PROJECT_FILE_PATH"
I'm using iOS 18.1.1, XCode 16.0(16A242d)
I have the error, this issues looks like https://github.com/johnno1962/HotReloading/issues/85
the defaults read com.johnholdsworth.InjectionIII and the codesign of eval103.dylib looks good to me
And I didn't see any error log on evalxx.err/ evalxx.log
but I found some error when I run /Applications/InjectionIII.app/Contents/MacOS/InjectionIII on the terminal, does this error matter?
Are you adding HotReloading as a Swift Package and are using the copy_bundle.sh script? You do one or the other. But at this stage it's probably better to advise you to move to the newer implementation of injection which is simpler and easier to understand when it comes to injecting a device: https://github.com/johnno1962/InjectionNext.
Are you adding HotReloading as a Swift Package and are using the copy_bundle.sh script? You do one or the other. But at this stage it's probably better to advise you to move to the newer implementation of injection which is simpler and easier to understand when it comes to injecting a device: https://github.com/johnno1962/InjectionNext.
thxοΌI will try this project next week, hot reload on real device did helps a lot for me
my friend say, maybe it's because i'm using a free apple account, I will have a try
Possibly, not sure you can sign for a real device without a developer account.
Possibly, not sure you can sign for a real device without a developer account.
I change my apple account to a paid account, it works, no more dlopen error