Use of undeclared identifier '_AppsFlyerdelegate'

Viewed 494

I am not an iOS developer rather know bit of iOS and i am stuck at native side of iOS

So I was facing this issue on iOS

And I was trying this suggested answer

Here he says to add this and so I did

  // AppsFlyer init here...
  if(_AppsFlyerdelegate == nil){
    _AppsFlyerdelegate = [[RNAppsFlyer alloc] init];
  }
  [[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
  [AppsFlyerLib shared].appsFlyerDevKey = @"YOUR_APPSFLYER_DEV_KEY"; // HACK: iOS SDK is faster than RN plugin

but I started getting these errors

Use of undeclared identifier '_AppsFlyerdelegate'

So I went to my pod file and added this (not sure if this sis correct)

 pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])
  pod 'AppsFlyerFramework'

Did pod install, again ran the command but the error didn't went away? Any idea what I am doing wrong?

Also (not important) but can someone briefly explain me this code

if(_AppsFlyerdelegate == nil){
    _AppsFlyerdelegate = [[RNAppsFlyer alloc] init];
  }
  [[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
  [AppsFlyerLib shared].appsFlyerDevKey = @"YOUR_APPSFLYER_DEV_KEY"; // HACK: iOS SDK is faster than RN plugin


  // React Native Bridge and Root View init here...
  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  RCTRootView *rootView = [[RCTRootView alloc] 
    initWithBridge:bridge
    moduleName:@"FiftyViewsUnderTheAppiumSea"
    initialProperties:nil
  ];
0 Answers
Related