Event listener and read the views tree in SwiftUI IOS

Viewed 210

I have today an IOS XCFramework that I can import to an IOS UIkit app And this XCFramework is able seamlessly to read the views tree of the storyboard of the test app And listen to all the events in these views... viewdidappear.. touch events.

I would like to the same thing to an IOS SwiftUI app. Meaning I will import an new XCFramework to this IOS SwiftUI app, and the new XCFramework will be to read all the views tree of the SwiftUI app and the XCFramework will be to listen to all the events onAppear onDisappear touch events of the IOS SwiftUI app.

How can I do it.

I would that the developer of the SwiftUI app will only need to just import my XCFramework and maybe run a startlisten api function that I will provide him and all listening to the events will happen in the background in the XCFramework without the developer of the app doing anything more then that...

I want everything to be done seamlessly in the background.

I read these... But seems like not the solution here for me as I want an XCFramework in thr background that does not requires the app developer to do anything other just import my XCFramework.

"Observing ViewModel Changes in SwiftUI" https://www.cuvenx.com/post/observing-viewmodel-changes-in-swiftui

"SwiftUI’s New App Lifecycle and Replacements for AppDelegate and SceneDelegate in iOS 14" https://www.iosdevie.com/p/swiftui-replace-appdelegate-scenedelegate?s=r

Thanks

0 Answers
Related