prongbang / screen_protector

Safe Data Leakage via Application Background Screenshot and Prevent Screenshot for Android and iOS.
https://pub.dev/packages/screen_protector
MIT License
39 stars 18 forks source link

Plugin does not return result on iOS #18

Closed kast-ppi closed 8 months ago

kast-ppi commented 1 year ago

The following code does not return a result future:

await ScreenProtector.protectDataLeakageWithBlur()

In SwiftScreenProtectorPlugin.swift there are result(...) statements missing:

case "protectDataLeakageWithBlur":
            enabledProtectDataLeakageWithBlur = .on
            <-- TODO result(...) missing -->
            break
        case "protectDataLeakageWithImage":
            if args != nil {
                protectDataLeakageWithImageName = args!["name"] ?? "LaunchImage"
            }
            enabledProtectDataLeakageWithImage = .on
            <-- TODO result(...) missing -->
            break
        case "protectDataLeakageWithColor":
            if args != nil {
                guard let hexColor = args!["hexColor"] else {return}
                protectDataLeakageWithColor = hexColor
                enabledProtectDataLeakageWithColor = .on
            }
            <-- TODO result(...) missing -->
            break
prongbang commented 8 months ago

Thank you for reporting the issue. The issue has been fixed in version screen_protector: ^1.4.0.