INNER CODE UNIT · TypeScript
modifyAppDelegateImport
bamlab/react-native-flipper-performance-monitor · flipper-native/plugin/src/index.ts:17
function modifyAppDelegateImport(src: string): MergeResults {
const newSrc = `#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
#import <FlipperPerformancePlugin.h>
#endif`;
return mergeContents({
tag: "react-native-performance-plugin-expo-import",
src,
newSrc,
anchor: /@implementation AppDelegate/,
offset: -1,
comment: "//",
});
}
function modifyAppDelegateLaunchingCode(src: string): MergeResults {
const newSrc = ` #ifdef FB_SONARKIT_ENABLED