Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

How to make the present VC display normally. #566

Copy link
Copy link
@RisingSSR

Description

@RisingSSR
Issue body actions

Device: real device - iPhone 15
Xcode: 16.2
Code:

@_exported import InjectHotReload

class MMWindow: UIWindow {
    
    override var rootViewController: UIViewController? {
        get { super.rootViewController }
        set {
            if let newValue {
//                  super.rootViewController = newValue
                super.rootViewController = InjectHotReload.ViewControllerHost(newValue)
            } else {
                super.rootViewController = nil
            }
        }
    }
    
    override func makeKeyAndVisible() {
        super.makeKeyAndVisible()
        
        do {
            // simulatorBundle
//            let simulatorBundle = Bundle.init(path: "/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle")
//            if let bundle = simulatorBundle {
//                try bundle.loadAndReturnError()
//                debugPrint("Injection simulator Bundle成功")
//            } else {
//                debugPrint("Injection simulator 注入失败,未能检测到Injection")
//            }
            
            // realDeviceBundlePath
            if let realDeviceBundlePath = Bundle.main.path(forResource: "iOSInjection", ofType: "bundle"), let realDeviceBundle = Bundle(path: realDeviceBundlePath) {
                try realDeviceBundle.loadAndReturnError()
                debugPrint("Injection RealDevice Bundle成功")
            } else {
                debugPrint("Injection RealDevice 注失败,未能检测到Injection")
            }
        } catch {
            debugPrint("Injection注入失败\(error)")
        }
    }
}

then, when i present another vc, it cannot works

I think it's the UITransitionView that's causing the problem

Image

so how can i works

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.