mapbox / mapbox-events-ios

Mapbox Events Framework for iOS
Other
20 stars 38 forks source link

Bugfix/missing timer run #353

Closed OdNairy closed 1 year ago

OdNairy commented 1 year ago

This PR addresses the issue with missing MMETimerManager when the start is called. SDK has a lazy initialization and that's why MMETimerManager construction was postponed. However, if any client (like Maps SDK) will fire an event just after an object initialization it would lead to missing 180sec events flushing timer. The actual fix is to move MMETimerManager init back to the object construction. According to my metrics, it takes 90-100 nanoseconds to construct and has very little impact on performance. Instruments report with multiple runs

Fixes CORESDK-1430