AgoraIO-Extensions / iris_method_channel_flutter

iris_method_channel is a method channel that communicate between C/C++(iris) and dart, which is used by Agora Flutter SDKs.
MIT License
2 stars 3 forks source link

Initialize IrisEvent and register send port first in _IrisMethodChannelNative.initilize #46

Closed littleGnAl closed 1 year ago

littleGnAl commented 1 year ago

We call addObserverForName in C++ inside the IrisEvent.registerEventHandler in iOS/macOS, at this time, the IrisEvent.registerEventHandler is called after the createNativeApiEngine, if an addObserverForName is called inside the createNativeApiEngine, which may block our observer. To ensure our observer always calls first, so move IrisEvent.registerEventHandler above the _nativeIrisApiEngineBinding.initialize().