Skip to content

Commit

Permalink
flipper: Enable Flipper.
Browse files Browse the repository at this point in the history
Call the appropriate initialize-Flipper function in native runtime
code.

Part of the RN v0.61 -> v0.62 changes to the template app [1],
corresponding to facebook/react-native@05f5cb534. This should be
fine to do after the main upgrade commit; nothing in React Native's
internals should depend on Flipper being enabled [2].

On iOS, use the form of the initialize-Flipper function as it was
updated in facebook/react-native@b4d1fcfb2 and wrap the call site in
a conditional as done there.

[1] https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.62.2
[2] #4244 (comment)
  • Loading branch information
chrisbobbe authored and gnprice committed Sep 18, 2020
1 parent ab671e2 commit 7c72715
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public void onCreate() {
super.onCreate();
FCMPushNotifications.createNotificationChannel(this);
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
conversations = new ConversationMap();
}

Expand Down
4 changes: 4 additions & 0 deletions ios/ZulipMobile/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ @implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
#if DEBUG
InitializeFlipper(application);
#endif

RCTSetLogThreshold(RCTLogLevelError);
self.moduleRegistryAdapter = [[UMModuleRegistryAdapter alloc] initWithModuleRegistryProvider:[[UMModuleRegistryProvider alloc] init]];

Expand Down

0 comments on commit 7c72715

Please sign in to comment.