mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Forward VM version to inspector
Reviewed By: bnham Differential Revision: D6938018 fbshipit-source-id: c79853ddf835acab86a16ebd539874d29d3aa60a
This commit is contained in:
committed by
Facebook Github Bot
parent
b1d8af48ae
commit
ad2d9e7fab
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user