Files
react-native-code-push/ios/CodePush/RCTConvert+CodePushInstallMode.m
Sergey Akhalkov 54351dbe19 installModes: implement new ON_NEXT_SUSPEND install mode (#770)
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.
2017-04-11 12:52:18 +03:00

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