flipper
flipper copied to clipboard
Solution to flipper NO APPLICATION SELECTED
The issue happens when we upgraded from version 0.63.2 to version 0.70.6, then 0.71.1. For some reason, we do have to manually initialize Flipper as just importing #import <React/RCTBridge.h> the app isn't detected flipper, and from the log, i couldn't see any RSOCKET connection being attempt. However, manually initialize the flipper worked.
Podfile:
:flipper_configuration => FlipperConfiguration.enabled(['DevelopmentDebug','ProductionDebug']),
App Delegate.mm (For some reason, this initialization is a must). Otherwise, we will have NO APPLICATION SELECTED
#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
static void InitializeFlipper(UIApplication* application) {
FlipperClient* client = [FlipperClient sharedClient];
SKDescriptorMapper* layoutDescriptorMapper =
[[SKDescriptorMapper alloc] initWithDefaults];
[client addPlugin:[[FlipperKitLayoutPlugin alloc]
initWithRootNode:application
withDescriptorMapper:layoutDescriptorMapper]];
[client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
[client addPlugin:[FlipperKitReactPlugin new]];
[client addPlugin:[[FlipperKitNetworkPlugin alloc]
initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
[client start];
}
#endif
#ifdef FB_SONARKIT_ENABLED
InitializeFlipper(application);
#endif
Environment
"react-native-flipper": "^0.187.1", gem 'cocoapods', '1.12.0' "react-devtools-core": "4.24.1" xcode version: 14.2 "react-native": "0.71.1", simulator version: ios 16.2
Where should I put :flipper_configuration => FlipperConfiguration.enabled(['DevelopmentDebug','ProductionDebug']), if I get uninitialized constant Pod::Podfile::FlipperConfiguration?