mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Enable profiling builds identification for iOS (#49137)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49137 # Changelog: [Internal] Similarly as D66501768, adding new `profiling` query parameter to inspector url for registering profiling fields. Reviewed By: huntie Differential Revision: D69057572 fbshipit-source-id: d11d88c7e5260d4ca405564d180d8a0edcb39596
This commit is contained in:
committed by
Facebook GitHub Bot
parent
90f6e1010d
commit
fbfb251177
@@ -100,6 +100,9 @@ static NSString *getInspectorDeviceId()
|
||||
|
||||
static NSURL *getInspectorDeviceUrl(NSURL *bundleURL)
|
||||
{
|
||||
auto &inspectorFlags = facebook::react::jsinspector_modern::InspectorFlags::getInstance();
|
||||
BOOL isProfilingBuild = inspectorFlags.getIsProfilingBuild();
|
||||
|
||||
NSString *escapedDeviceName = [[[UIDevice currentDevice] name]
|
||||
stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet];
|
||||
NSString *escapedAppName = [[[NSBundle mainBundle] bundleIdentifier]
|
||||
@@ -108,11 +111,13 @@ static NSURL *getInspectorDeviceUrl(NSURL *bundleURL)
|
||||
NSString *escapedInspectorDeviceId = [getInspectorDeviceId()
|
||||
stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet];
|
||||
|
||||
return [NSURL URLWithString:[NSString stringWithFormat:@"http://%@/inspector/device?name=%@&app=%@&device=%@",
|
||||
getServerHost(bundleURL),
|
||||
escapedDeviceName,
|
||||
escapedAppName,
|
||||
escapedInspectorDeviceId]];
|
||||
return [NSURL
|
||||
URLWithString:[NSString stringWithFormat:@"http://%@/inspector/device?name=%@&app=%@&device=%@&profiling=%@",
|
||||
getServerHost(bundleURL),
|
||||
escapedDeviceName,
|
||||
escapedAppName,
|
||||
escapedInspectorDeviceId,
|
||||
isProfilingBuild ? @"true" : @"false"]];
|
||||
}
|
||||
|
||||
@implementation RCTInspectorDevServerHelper
|
||||
|
||||
Reference in New Issue
Block a user