mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-10 07:10:36 +08:00
Restart the app _while_ it is in the background, but only after it has been in the background for "minimumBackgroundDuration" seconds (0 by default), so that user context isn't lost unless the app suspension is long enough to not matter.
21 lines
866 B
Objective-C
21 lines
866 B
Objective-C
#import "CodePush.h"
|
|
|
|
#if __has_include(<React/RCTConvert.h>)
|
|
#import <React/RCTConvert.h>
|
|
#else
|
|
#import "RCTConvert.h"
|
|
#endif
|
|
|
|
// Extending the RCTConvert class allows the React Native
|
|
// bridge to handle args of type "CodePushInstallMode"
|
|
@implementation RCTConvert (CodePushInstallMode)
|
|
|
|
RCT_ENUM_CONVERTER(CodePushInstallMode, (@{ @"codePushInstallModeImmediate": @(CodePushInstallModeImmediate),
|
|
@"codePushInstallModeOnNextRestart": @(CodePushInstallModeOnNextRestart),
|
|
@"codePushInstallModeOnNextResume": @(CodePushInstallModeOnNextResume),
|
|
@"codePushInstallModeOnNextSuspend": @(CodePushInstallModeOnNextSuspend) }),
|
|
CodePushInstallModeImmediate, // Default enum value
|
|
integerValue)
|
|
|
|
@end
|