airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
204 stars 11 forks source link

[Feature Request][iOS][tvOS] AppDelegate extending by native extensions #1647

Open itlancer opened 2 years ago

itlancer commented 2 years ago

Feature Description

In many cases developers targeting to iOS/tvOS must have access to AppDelegate lifecycle methods such as application:didFinishLaunchingWithOptions https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622921-application Without access to such methods you cannot initialize some third-party libraries or use some functionalities (background tasks registration for example). AIR should support to extend such AppDelegate methods by native extensions. Right now there is no straightforward way to do this.

Known Workarounds

https://programmer.group/5c172a84033de.html https://community.adobe.com/t5/air-discussions/add-code-to-appdelegate-on-ios/m-p/9425625#M49785 https://github.com/tuarua/Swift-IOS-ANE#applicationdidfinishlaunching

marchbold commented 2 years ago

We already have a standardised way to access these methods through the Core extension:

https://github.com/distriqt/ANE-Core

Have a look at the integration methods described here:

https://github.com/distriqt/ANE-Core/tree/master/integration

basically converts all the app delegate callbacks into objc events that you can receive through a delegate.