Issue injecting on real device – Code signature invalid & Unhide Symbols restart loop
Nessuno ha ancora preso questa issue.
- #30 di @hpaul — chiusa senza merge
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- ios, swift
- Ambito
- devtools, mobile-dev
Direzione di ricerca
Start with the reported real-device injection path and the logs around the generated eval_injection_ContentView_1.dylib. Review ContentView.swift and the StockManagerApp entry point, then reproduce with the stated iPhone 16, iOS 18.6, and Xcode 16.0 setup. Done means identifying why the generated dylib is rejected and documenting a verified fix or workaround for the restart loop.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi John, first of all thanks for your amazing tool.
I'm having a persistent issue when trying to use InjectionNext while running my app on a real device (iPhone 16 running iOS 18.6), using Xcode 16.0.
Context:
Target device: iPhone 16 (iOS 18.6)
Xcode version: 16.0 (stable)
InjectionNext: latest release from Gumroad
Project type: SwiftUI iOS app
Compilation mode: Incremental (not Whole Module)
EMIT_FRONTEND_COMMAND_LINES: Enabled = YES in build settings
The problem:
When I try to inject changes into my app, the connection seems to be established and recompilation appears to start, but then I get persistent dlopen errors about invalid code signature on the generated .dylib. Here's an excerpt from the logs:
🔥 InjectionNext: Locating developer's Mac. Have you selected "Enable Devices"?
Broadcasting to pdp_ip1#4:5.57.7.41 to locate Injection host...
SimpleSocket/Could not send broadcast ping: No route to host
Broadcasting to en2#15:169.254.255.255 to locate Injection host...
...
🔥 Connecting to iMac-de-Miguel.home (169.254.67.84)...
🔥 InjectionNext: iPhoneOS connection to app established, waiting for commands.
🔥 Recompiling: /Users/miguel/Documents/StockManager/StockManager/ContentView.swift
🔥 ⚠️ dlopen failed dlopen(/private/var/mobile/Containers/Data/Application/.../tmp/eval_injection_ContentView_1.dylib, 0x0002): ... code signature invalid ... errno=1 ...
🔥 Injection could not load. If this was due to a default argument. Select the app's menu item "Unhide Symbols".
I tried using the “Unhide Symbols” option as recommended. It says:
🔥 0 symbols exported in 542 object files, please restart your app.
But even after restarting the app and trying again, I always get the same error — it's like I'm stuck in a loop where the code signature is always rejected.
Code setup
Here’s my current ContentView.swift:
import SwiftUI
import InjectionNext
import HotSwiftUI
struct ContentView: View {
@ObserveInjection private var inject
var body: some View {
Text("Hola buenas")
// .onReceive(InjectionNext.notification) {
// inject.invalidate()
// }
}
}
And my main entry point:
swift
Copiar
Editar
import SwiftUI
import FirebaseCore
class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
FirebaseApp.configure()
return true
}
}
@main
struct StockManagerApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
What I've tried so far:
Manually re-signing the app binary with my Apple Development certificate using codesign --force --deep ...
Confirmed valid entitlements
Verified dylib is generated at expected path, but code signature always fails
Cleaned build folder & rebuilt
Recompiled with file edits
Confirmed EMIT_FRONTEND_COMMAND_LINES is working
Disabled Whole Module Optimization
What I'm asking:
Is there anything else I can try to make InjectionNext work with real devices under iOS 18.6 and Xcode 16.0?
I’d really appreciate any pointers, or if there's a fix or workaround you could suggest. I’d love to continue using InjectionNext on-device for faster iteration.
Thanks a lot for your help!
Miguel
- Lingua principale
- Swift
- Stelle
- 437
- Fork
- 32
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di johnno1962/InjectionNext
-
Duplicate CFBundleIdentifier in copied _Testing_* overlay frameworks breaks simulator installAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
johnno1962/InjectionNext#175 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
johnno1962/InjectionNext#173 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
johnno1962/InjectionNext#167 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
johnno1962/InjectionNext#147 · 1 commento ·
Tutte le issue di johnno1962/InjectionNext
Issue simili
-
type: cleanup
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
googleapis/google-cloud-swift#1477 ·
I maintainer di solito rispondono entro 1 giorno
-
🐛 Bug Report: Console `/join` shows an endless spinner for invited users who are not signed inApertaproduct / auth product / console product / databases product / messaging product / self-hosted product / sites product / storage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
P1 status: first-line-handled status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
a2ui-project/a2ui#3282 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
binding:web core docs p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
RunanywhereAI/runanywhere-sdks#1123 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
Countly/countly-sdk-ios#485 ·
I maintainer di solito rispondono entro 1 giorno