Getting Apple IDFA (and Android equivalent)

Hi guys,

I’m trying to track app installs for a Facebook campaign. I can post to the graph API directly, but I need to push in the advertising identifier (see App Events API - Marketing API - Documentation - Facebook for Developers).

I can’t find any way to get the IDFA. There is react-native-idfa package in existence, but obviously needs some native linking.

Is there any way?

1 Like

Wow interesting problem, I haven’t had to do this myself yet.

@tonicapp you can probably write your own web server to send requests to, and from there make requests to the marketing-api? That is how I would approach it off of the top of my head.

@jimmylee - sure, makes sense, but the problem is I need a bit of native code to actually get the IDFA (and respective advertising identifier on Android). AdSupportIOS in react-native was meant to do this for iOS but it’s not linked by default (and therefore not linked for Expo), and moreover, it’s been deprecated as of the latest react-native (0.48).

Sounds like for my immediate use case ejecting might be the only option, unless something like react-native-idfa can be added before SDK 21 was released, or something!

To set expectations - it’s unlikely we’ll expose the IDFA because Apple is careful to check how it is used since it’s sensitive information. I’d recommend ejecting if you want the IDFA.

1 Like

Hi @ide, How can We disable this feature IDFA?

Hello @ide Do you know if there’s been any updates that would allow you to get the IDFA without ejecting?

There are no updates and we recommend you use the bare workflow for this.

Hi @ide I would love to send custom events to FaceBook. For this I either need access to the IDFA, or for expo-facebook to support sending custom analytics events.

The expo docs say that

Expo exposes a minimal native API since you can access Facebook’s Graph API directly through HTTP

However - we can’t access the graph api to POST custom events without the advertiser-id. Since this is senstive info as you said, would expo consider adding custom-events to the expo-facebook api?

I’d really like to avoid ejecting if possible as I love the expo workflow so much.

Thanks!

For privacy reasons we don’t expose the IDFA. In general if there is a significant feature you need or a feature with a significant consequence (like the IDFA), the bare workflow is currently the best approach. In general going forward we are investing in the Expo runtime platform and Expo’s services so developers can write the modules they need on their own instead of being bottlenecked on the Expo team.

Hi @ide, I just need to extract the IDFA to integrate Adtonos to my expo application. If we can’t extract it using expo, could you let me know what might be issues potentially if I ejected the expo?
I haven’t ever tried it yet

Thanks

Read though the Bare Workflow Walkthrough here: Bare Workflow Walkthrough - Expo Documentation. You should also use Git or another VCS before ejecting (and just using a VCS regardless) if you need to go back. Lastly, if you have questions specific to your app, this page lists some consultants you could hire if you’d prefer to use their time instead of your own: Consultants — Expo.

Hey everyone :wave:
Just submitted a PR related a lot of the questions here. While it doesn’t have ASIdentifierManager support, you’ll still be able to send events with populated Ad data.