Skip to content

Commit

Permalink
Expose [RCTBundleURLProvider isPackagerRunning] publicly (#27012)
Browse files Browse the repository at this point in the history
Summary:
The private API isPackagerRunning is useful. Rather than duplicating it, I am exposing it here so that I can make use of it in future PRs, and so others can do the same.

## Changelog

[iOS] [Changed] - Expose the isPackagerRunning methods on RCTBundleURLProvider
Pull Request resolved: #27012

Test Plan: This change doesn't impact any runtime code, though it does impact build. I used a vanilla test app (react-native init) and built it using xcode as well as react-native run-ios.

Differential Revision: D18174316

Pulled By: cpojer

fbshipit-source-id: 523d134882303f68a1f69521e31f29d7dbfb666c
  • Loading branch information
afoxman authored and facebook-github-bot committed Oct 30, 2019
1 parent af8ea06 commit fe9cba7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions React/Base/RCTBundleURLProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ extern const NSUInteger kRCTBundleURLProviderDefaultPort;
*/
- (void)resetToDefaults;

#if RCT_DEV
- (BOOL)isPackagerRunning:(NSString *)host;
#endif

/**
* Returns the jsBundleURL for a given bundle entrypoint and
* the fallback offline JS bundle if the packager is not running.
Expand Down

0 comments on commit fe9cba7

Please sign in to comment.