app_life 0.0.2
app_life: ^0.0.2 copied to clipboard
Native lifecycle functions that support iOS and Android, different from WidgetBindings that come with Flutter
Native lifecycle functions that support iOS and Android, different from WidgetBindings that come with Flutter WidgetBindings Android/IOS native life cycle
android 生命周期 #
ON_CREATE, ON_START, ON_RESTART, ON_RESUME, ON_STOP, ON_PAUSE, ON_DESTROY
ios生命周期 #
//ON_CREATE #define DID_FINISH_LAUNCHING_WITH_OPTIONS @"DID_FINISH_LAUNCHING_WITH_OPTIONS" //ON_PAUSE #define APPLICATION_WILL_RESIGN_ACTIVE @"APPLICATION_WILL_RESIGN_ACTIVE" //ON_STOP #define APPLICATION_DID_ENTER_BACKGROUND @"APPLICATION_DID_ENTER_BACKGROUND" //ON_START #define APPLICATION_WILL_ENTER_FOREGROUND @"APPLICATION_WILL_ENTER_FOREGROUND" //ON_RESUME #define APPLICATION_DID_BECOME_ACTIVE @"APPLICATION_DID_BECOME_ACTIVE" //ON_DESTROY #define APPLICATION_WILL_TERMINATE @"APPLICATION_WILL_TERMINATE"
注册生命周期函数 #
- (android) AppLifeManage.registerLife(AppLifeManage.LifeEnum.ON_CREATE);
- (ios) [AppLifePlugin registerLife:DID_FINISH_LAUNCHING_WITH_OPTIONS];