mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-26 13:25:51 +08:00
Introduce experimental API to allow overriding how packager run status is determined
Summary: The docs for this new method explain what it does. Differential Revision: D3556890 fbshipit-source-id: b075e750cdd1e7354e0a26c03b3fd74cca52aeb7
This commit is contained in:
committed by
Facebook Github Bot 2
parent
16d29fe16f
commit
22eabe59a2
@@ -45,4 +45,15 @@ extern NSString *const RCTBundleURLProviderUpdatedNotification;
|
||||
@property (nonatomic, assign) BOOL enableDev;
|
||||
|
||||
+ (instancetype)sharedSettings;
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
* The default behavior of RCTBundleURLProvider (including the singleton shared instance) is to call
|
||||
* [NSURLConnection +sendSynchronousRequest:returningResponse:error:] to determine if the packager is running at
|
||||
* startup time. (Note this behavior is only enabled if RCT_DEV is on.) This experimental API allows you to specify
|
||||
* a custom predicate function that must return YES if the packager is running at the given host and port, and NO
|
||||
* otherwise.
|
||||
*/
|
||||
- (instancetype)initWithPackagerRunningPredicate:(BOOL (*)(NSString *host, NSUInteger port))packagerRunningPredicate;
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user