Skip to content

UserDefaults cannot be saved #913

@fangandyuan

Description

@fangandyuan

if NSClassFromString("AFURLSessionManager") != nil { let classes = InstrumentationUtils.objc_getClassList() classes.forEach { if let method = class_getInstanceMethod($0, NSSelectorFromString("af_resume")) { methodsToSwizzle.append(method) } } }

With this hook code, UserDefaults.standard.setValue("Test", forKey: "Test") will only take effect in the current startup and will be restored next time。But I didn't reproduce it in the demo。
Can you provide a switch to turn off this logic so that we don't monitor AFN?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions