How to adopt the UIApplicationDelegate methods for Handoff (specifically application:continueUserActivity:restorationHandler:)

I have ionic3 project and i’m using deeplink and socialShare plugins ,
so when a user share a universal link , and someone click on this link he will have the options to open it throw app or safari (if the app is installed).
i created the apple-app-site-association file, and i specified my associated domains, still the part of adopt the UIApplicationDelegate methods for Handoff.
I read :

I understood the idea but i didn’t know where to write the implementation which appdelegate.h or .m and what to write?

anyone can help me.