
#import "RNSodaUpdate.h"

@interface RNSodaUpdate ()

@end

@implementation RNSodaUpdate

- (dispatch_queue_t)methodQueue
{
    return dispatch_get_main_queue();
}
RCT_EXPORT_MODULE()

static NSString * const AppVersionConfigKey = @"appVersion";
static NSString * const BuildVersionConfigKey = @"buildVersion";
static NSString * const ClientUniqueIDConfigKey = @"clientUniqueId";
static NSString * const ServerURLConfigKey = @"serverUrl";


RCT_EXPORT_METHOD(getConfiguration:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)
{
    NSDictionary *config = @{
                             AppVersionConfigKey:@"1.0.0",
                             BuildVersionConfigKey:@"1.0",
                             ClientUniqueIDConfigKey:@"123456",
                             ServerURLConfigKey:@"https://www.baidu.com"
                             };
    if(config) {
        resolve(config);
    } else {
        // (NSString *code, NSString *message, NSError *error)
        reject(@"-1",@"获取失败",nil);
    }
}

@end
  
