Skip to content

Debug with target My Mac(Designed for iPad) #552

@jb522185660

Description

@jb522185660

When I try to Debug with target My Mac(Designed for iPad)

        guard objc_getClass("InjectionClient") == nil else {
            return
        }
        #if os(macOS) || targetEnvironment(macCatalyst)
        let bundleName = "macOSInjection.bundle"
        #elseif os(tvOS)
        let bundleName = "tvOSInjection.bundle"
        #elseif targetEnvironment(simulator)
        let bundleName = "iOSInjection.bundle"
        #else
        let bundleName = "maciOSInjection.bundle"
        #endif
        let injectionBundle = Bundle.init(path: "/Applications/InjectionIII.app/Contents/Resources/\(bundleName)")
        if let bundle = injectionBundle{
            try bundle.loadAndReturnError()
        } else {
                debugPrint("Injection 注入失败,未能检测到 Injection")
        }
    } catch {
        debugPrint("Injection 注入失败 \(error)")
    }

always show the error

💉 ⚠️ Injection bundle loaded but could not connect. Is InjectionIII.app running?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions