INNER CODE UNIT · TypeScript

modifyAppDelegateLaunchingCode

bamlab/react-native-flipper-performance-monitor · flipper-native/plugin/src/index.ts:33

function modifyAppDelegateLaunchingCode(src: string): MergeResults {
  const newSrc = `  #ifdef FB_SONARKIT_ENABLED
    FlipperClient * client = [FlipperClient sharedClient];
    [client addPlugin: [FlipperPerformancePlugin new]];
  #endif`;

  return mergeContents({
    tag: "react-native-performance-plugin-expo-launchingcode",
    src,
    newSrc,
    anchor: /didFinishLaunchingWithOptions:/,
    offset: 2,
    comment: "//",
  });
}

function withIosPlugin(config: ExpoConfig) {
  return withAppDelegate(config, (config) => {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…