mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-10 15:49:36 +08:00
Make getConfiguration return a promise
This commit is contained in:
@@ -80,9 +80,10 @@ RCT_EXPORT_METHOD(setUsingTestFolder:(BOOL) shouldUseTestFolder)
|
||||
usingTestFolder = shouldUseTestFolder;
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(getConfiguration:(RCTResponseSenderBlock)callback)
|
||||
RCT_EXPORT_METHOD(getConfiguration:(RCTPromiseResolveBlock)resolve
|
||||
rejecter:(RCTPromiseRejectBlock)reject)
|
||||
{
|
||||
callback(@[[NSNull null], [CodePushConfig getConfiguration]]);
|
||||
resolve([CodePushConfig getConfiguration]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(installUpdate:(NSDictionary*)updatePackage
|
||||
|
||||
Reference in New Issue
Block a user