Hello, I have issue on ios - ```'RNRudderSdk/RNRud...
# support
a
Hello, I have issue on ios -
Copy code
'RNRudderSdk/RNRudderAnalytics.h' file not found
1. rudderstack/rudder-integration-appsflyer-react-native": "^1.5.6 2. pod 'Rudder-Appsflyer' How to fix it? Thanks!
s
To elaborate, the issue is we aren't getting data from our React-native rudderstack sdk (RNrudderSDK) into the iOS version of AppsFlyer. It works in Android. The error above is generated after explicitly following the docs here; https://www.rudderstack.com/docs/destinations/streaming-destinations/appsflyer/
We're on device mode.
How do we rectify the file not found error?
c
Please follow these troubleshooting steps: • First, remove the package-lock.json and node_modules folder. • Then, make sure that you’ve run this command
npm install @rudderstack/rudder-sdk-react-native --save
to install the Rudder React-Native package. • Then, navigate to your iOS folder and then run this command:
pod deintegrate && rm podfile.lock && pod install
. • Start building the app again. Hopefully, the error should be resolved now. • If the error persists try creating a new React-Native project and then perform the above action. LMK if it helps!
a
@clever-baker-88340 thank you, I haven't problem with rudderstack/rudder-sdk-react-native lib. Problem with - "@rudderstack/rudder-integration-appsflyer-react-native": "^1.5.6" after reinstalling have the same error on ios
c
Hey @adventurous-petabyte-6019 , Can you please confirm, if you’ve run
npm install @rudderstack/rudder-sdk-react-native --save
and then run
pod deintegrate && rm podfile.lock && pod install
in your iOS project? Also, can you please share your
Podfile.lock
and
package.json
files. I want to see, if it contains the required libraries related to the Rudderstack or not!
a
c
Can you also share the Rudder React-Native Core and AppsFlyer SDK’s initialisation code snippet?
a
in Podfile?
c
No, basically your React-Native project App.txs/App.js file where you’re initialising the Rudder React-Native Core and AppsFlyer libraries. Similar to this code:
Copy code
import rudderClient from "@rudderstack/rudder-sdk-react-native"


useEffect(() => {
  const rudderInitialise = async () => {
    await rudderClient.setup(WRITE_KEY, {
      dataPlaneUrl: DATA_PLANE_URL,
      trackAppLifecycleEvents: true,
      recordScreenViews: true,
    });
    console.log('SDK is initalised');
  };
  rudderInitialise().catch(console.error);
}, []);
And:
Copy code
import appsflyer, {
  onAppOpenAttribution,
  onAttributionFailure,
  onDeepLink,
  onInstallConversionData,
  onInstallConversionFailure,
  setOneLinkCustomDomains,
  setOptions,
} from '@rudderstack/rudder-integration-appsflyer-react-native';

setOptions({
    devKey: APPSFLYER_DEV_KEY,
    isDebug: true,
    onInstallConversionDataListener: true,
    appleAppId: APPSFLYER_APPLE_ID,
    timeToWaitForATTUserAuthorization: 60,
  });
Meanwhile, you may also refer to our sample React-Native project: https://github.com/rudderlabs/rudder-sdk-react-native/blob/develop/apps/example/src/app/App.tsx.
a
it's crashing before init app
c
Yeah, I got that it is a build time issue. But I actually need to understand if there is any initialisation issue or not. I’ve verified on my side, there is no such issue, hence, I’m trying to identify the root cause in your case. If possible, can you please share a sample React-Native project where this error is present, so that I could debug it properly.
👍 1
a
App.tsx
👍 1
c
Can you please try to share the
Minimal Viable Example
? I’ve to examine that!
👍 1
a
Copy code
import rudderClient from '@rudderstack/rudder-sdk-react-native';

useEffect(() => {
    const rudderInitialise = async () => {
      await rudderClient.setup(Config.RUDDERSTACK_KEY, {
        dataPlaneUrl: Config.RUDDERSTACK_DATA_PLANE_URL,
        trackAppLifecycleEvents: true,
        recordScreenViews: true
      });
      console.log('SDK is initalised');
    };
    rudderInitialise().catch(console.error);
  }, []);
I don't have
Copy code
setOptions({
    devKey: APPSFLYER_DEV_KEY,
    isDebug: true,
    onInstallConversionDataListener: true,
    appleAppId: APPSFLYER_APPLE_ID,
    timeToWaitForATTUserAuthorization: 60,
  });
because can't test APPSFLYER build
c
Thanks for sharing this, I’ll look into it and get back to you.
👍 1
I just created a sample React-Native project but unable to reproduce the issue. In my case, iOS app got built and also running successfully. I’ve shared the same sample React-Native project with the code snippet you mentioned. Can you please check if it fails on your side? • Unzip it • Perform
npm i
cd iOS
pod install
• Build the app
a
Copy code
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/kompanietss/Library/Developer/Xcode/DerivedData/sampleproject-adhhffdgecgfbybmlmbqdyhguixk/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-46EB2E000134A0.sh (in target 'FBReactNativeSpec' from project 'Pods')
it's expo I'm using cli
c
Okay, let me try again with CLI. You’ve created project using this:
npx react-native init sampleproject
, right? BTW, have you got any error in the above sample React-Native project?
a
no, haven't, I'll try to install new proj with react-native 0.70.6
👍 1
c
After you try again and the issue persist, can you please share the whole React-Native project? It would be easier for me to look into it.
👍 1
a
@calm-yak-10773 hello, I found why I have this error, in Podfile I'm using
Copy code
use_frameworks! :linkage => :static
👍 1
it's need for firebase, what do I need to write here if you know?
Copy code
rn_maps_path = '../node_modules/react-native-maps'
  use_frameworks! :linkage => :static # for Firebase

  $static_framework = [
    'react-native-maps',
    'react-native-google-maps',
    'Google-Maps-iOS-Utils',
    'GoogleMaps',
    '@rudderstack/rudder-integration-appsflyer-react-native',
    '@rudderstack/rudder-sdk-react-native'
  ]

  pod 'react-native-google-maps', :path => rn_maps_path
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'
  pod 'Rudder-Appsflyer'
c
Can you please try with this in your Podfile:
Copy code
pod 'FirebaseCore', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
and make sure you remove:
Copy code
use_frameworks! :linkage => :static
Let me know, if it works!
👍 1
a
yes, It's working, thank you!
❤️ 1
c
Glad to hear that, finally problem is resolved🙂
👍 1
s
Thanks for the help Abhishek!
🙂 1
One follow up to this. Our events are now passing through rudderstack to the destination but only after we installed the AppsFlyer SDK. Do we really need; do we really need - @rudderstack/rudder-integration-appsflyer-react-native?
c
The @rudderstack/rudder-integration-appsflyer-react-native package includes the necessary AppsFlyer SDK for both Android and iOS. Installing this package is essential to ensure that events are successfully sent, as simply installing the AppsFlyer SDK alone won’t suffice, you may refer to the source code: https://github.com/rudderlabs/rudder-sdk-react-native/tree/develop/libs/rudder-integration-appsflyer-react-native. Ideally, you shouldn’t need to install the AppsFlyer SDK separately in order to send events. Moreover, we have identified an issue that primarily impacts the @rudderstack/rudder-integration-appsflyer-react-native package. This issue can result in events not being delivered. We are actively working on a solution and plan to address it within the next few sprints.