Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Issue injecting on real device – Code signature invalid & Unhide Symbols restart loop

Aperta
#81 18 commenti 2 reazioni 0 assegnatari Vedi su GitHub

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

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di johnno1962/InjectionNext

Tutte le issue di johnno1962/InjectionNext

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.