Forward VM version to inspector

Reviewed By: bnham

Differential Revision: D6938018

fbshipit-source-id: c79853ddf835acab86a16ebd539874d29d3aa60a
This commit is contained in:
Paco Estevez Garcia
2018-02-13 08:06:43 -08:00
committed by Facebook Github Bot
parent b1d8af48ae
commit ad2d9e7fab
9 changed files with 30 additions and 14 deletions

View File

@@ -15,6 +15,7 @@
@interface RCTInspectorPage : NSObject
@property (nonatomic, readonly) NSInteger id;
@property (nonatomic, readonly) NSString *title;
@property (nonatomic, readonly) NSString *vm;
@end
@interface RCTInspector : NSObject

View File

@@ -38,9 +38,11 @@ private:
@interface RCTInspectorPage () {
NSInteger _id;
NSString *_title;
NSString *_vm;
}
- (instancetype)initWithId:(NSInteger)id
title:(NSString *)title;
title:(NSString *)title
vm:(NSString *)vm;
@end
@interface RCTInspectorLocalConnection () {
@@ -64,7 +66,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
NSMutableArray<RCTInspectorPage *> *array = [NSMutableArray arrayWithCapacity:pages.size()];
for (size_t i = 0; i < pages.size(); i++) {
RCTInspectorPage *pageWrapper = [[RCTInspectorPage alloc] initWithId:pages[i].id
title:@(pages[i].title.c_str())];
title:@(pages[i].title.c_str())
vm:@(pages[i].vm.c_str())];
[array addObject:pageWrapper];
}
@@ -86,10 +89,12 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
- (instancetype)initWithId:(NSInteger)id
title:(NSString *)title
vm:(NSString *)vm
{
if (self = [super init]) {
_id = id;
_title = title;
_vm = vm;
}
return self;
}

View File

@@ -155,6 +155,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
@"id": [@(page.id) stringValue],
@"title": page.title,
@"app": [[NSBundle mainBundle] bundleIdentifier],
@"vm": page.vm,
@"isLastBundleDownloadSuccess": bundleStatus == nil
? [NSNull null]
: @(bundleStatus.isLastBundleDownloadSuccess),