Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hey! Just want to start by saying thank you so much for this amazing package. I've built 3 successful app businesses that all make heavy use of RNFB 💛

My most recent app is using Expo, fully managed, no prebuild. I'd like to enable the AdSupport.Framework on iOS, but it seems like I'd need access to native files (Podfile) to make the change described here: https://rnfirebase.io/analytics/usage#device-identification

Any help or guidance here would be appreciated!

You must be logged in to vote

Replies: 3 comments · 1 reply

Comment options

Hey I am facing the same question. How are we able to enable the AdSupport.Framework for RNFB with fully Expo managed workflow on iOS?

You must be logged in to vote
0 replies
Comment options

@mike24dzy

Add "./plugins/withPodfile", to your expo.plugins array in app.json

/plugins/withPodfile.js

const { withDangerousMod } = require('@expo/config-plugins')
const fs = require('fs')
const path = require('path')

const PREPEND_LINE = '$RNFirebaseAnalyticsEnableAdSupport = true'

/**
 *
 * @param {import('expo/config-plugins').ExportedConfig} config
 * @returns {import('expo/config-plugins').ExportedConfigWithProps}
 */
module.exports = config => {
  return withDangerousMod(config, [
    'ios',
    config => {
      const file = path.join(
        config.modRequest.platformProjectRoot,
        'Podfile'
      )

      const contents = fs
        .readFileSync(file, 'utf-8')
        .replace(PREPEND_LINE + '\n\n', '')

      fs.writeFileSync(file, `${PREPEND_LINE}\n\n${contents}`)

      return config
    }
  ])
}
You must be logged in to vote
1 reply
@mike24dzy
Comment options

Thank you very much!!

Comment options

I added it but the analytics still doesn't work on iOS ? Do you have any ideas ?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
Labels
None yet
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.