Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obj-C integration example ? #4

Open
vptcnt opened this issue Nov 30, 2022 · 0 comments
Open

Obj-C integration example ? #4

vptcnt opened this issue Nov 30, 2022 · 0 comments

Comments

@vptcnt
Copy link

vptcnt commented Nov 30, 2022

Hello,

Do you know how to implement your library in an Ios written in Obj-C ?

Thanks for your help

# SWIFT 
import ScreenProtectorKit

class AppDelegate: FlutterAppDelegate {

    private lazy var screenProtectorKit = { return ScreenProtectorKit(window: window) }()

    override func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
    
        screenProtectorKit.configurePreventionScreenshot()
  
        return true
    }

    override func applicationDidBecomeActive(_ application: UIApplication) {
        screenProtectorKit.enabledPreventScreenshot()
    }

    override func applicationWillResignActive(_ application: UIApplication) {
        screenProtectorKit.disablePreventScreenshot()
    }
    
}

# OBJ-C ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant