Confusion about IDFA and Branch

Hi, we’re finally about ready to submit our managed workflow app to the app stores so I’m going through the Deploying to App Stores documentation which says:

Apple will ask you whether your app uses the IDFA: the answer is “yes.” This is because Expo contains the Facebook and Branch SDKs, which contain code for collecting the IDFA, and you’ll need to check a couple boxes on the Apple submission form. See Branch’s Guide for which specific boxes to fill in.

The linked Branch Guide says:

It is important that you answer these questions as accurately as possible.

However, our app does not have ads. But from the Expo documentation, I get the impression that we should answer yes to some or all of these questions because of the FB and Branch SDKs in the managed SDK. Is that correct? Should I answer yes to all 4 questions?

1 Like

Hi drommatch.

I am having the same problem as you did.
My app does not have ads. What did you answer on those questions?
Did you get your app approved?
I was thinking in answering YES to uses IDFA and letting all the others unmarked.

Hi pablo, We did get our app approved but we didn’t take the managed approach. We took the approach of 1) ejecting our app, 2) manually building Apple and Android builds without all the extra stuff (without FB and Branch SDKs), and 3) git reverting the ejection to continue development. For example, here are roughly the steps we take:

  1. In app.config.js, increment MAJOR_VERSION_NUMBER (Android always requires that the major version is incremented), and set PATCH_VERSION_NUMBER to the current date.
  2. git commit -am "Version X.Y.Z: Major changes"
  3. git tag X.Y.Z
  4. git push
  5. git push --tags
  6. Make sure you’re logged in with expo login (needed to create the right plist info even though we’re not using the managed build service)
  7. expo eject
  8. Review all the warnings and manual steps highlighted by the ejection
  9. iOS:
    1. npx pod-install
    2. Open XCode and then open *.xcworkspace
    3. Wait for “Indexing” to complete
    4. First time: Preferences } Accounts } Add }
    5. Double click on Project } Signing & Capabilities } Team: Set our team
    6. If you want to test in simulators, select the simulator type and click Play
    7. Next to the play/stop buttons, to the right of Project, select Build } Any iOS Device
    8. Product } Archive
    9. Click Distribute App
    10. Wait for an email that “The following build has completed processing”
    11. Go to https://appstoreconnect.apple.com/apps/
    12. Click on App
    13. Click on Testflight
    14. Expand the build and click Manage on the Missing Compliance warning } Yes } Yes
    15. Test the app using Test Flight
    16. Scroll down and update the Version number
    17. Under Build, remove the old build, and add the new one
    18. Quit XCode
    19. There may be a Metro terminal window open. If so, Ctrl+C and then Enter to end it.
  10. Android:
    1. Update android/gradle.properties and add to the bottom:
      org.gradle.daemon=true
      org.gradle.configureondemand=true
      org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8
      
    2. Update android/app/build.gradle and add to the end of the android section:
          dexOptions {
             javaMaxHeapSize "2g"
          }
      
    3. Update android/app/src/main/AndroidManifest.xml and replace uses-permission entries with:
        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
        <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
        <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
        <uses-permission android:name="android.permission.CAMERA"/>
        <uses-permission android:name="android.permission.RECORD_AUDIO"/>
        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
        <uses-permission android:name="android.permission.WAKE_LOCK"/>
        <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
      
    4. Update android/build.gradle and add the following right before the end } of the repositories { section of allprojects:
              maven {
                  // expo-camera bundles a custom com.google.android:cameraview
                  url "$rootDir/../node_modules/expo-camera/android/maven"
              }
      
    5. Start Android Studio
    6. Wait a little bit and it will pop-up “Plugin Update Recommended”; click update.
    7. If you want to test in simulators:
      1. Select the simulator type and click Play
    8. Build } Generate Signed Bundle/APK
      1. Android App Bundle
      2. Key store path: upload-keystore.jks
      3. Key store password: Android Upload Keystore
      4. Key alias: upload
      5. Key password: Android Upload Key
      6. Uncheck “Export encrypted key…”
      7. Next
    9. Generate apks: java -jar ../bundletool-all-*.jar build-apks --bundle=app-release.aab --output=app-release.apks --ks=../upload-keystore.jks --ks-key-alias upload
    10. Connect Android phone by USB and check it’s in adb devices
    11. java -jar ../bundletool-all-*.jar install-apks --apks=app-release.apks
    12. Launch app from phone launcher
    13. Go to https://play.google.com/console/
    14. Testing } Internal Testing } Create New Release
    15. Click on App
    16. Upload aab file
    17. Update Release Notes
    18. Save
    19. Review Release
    20. Start Rollout to Internal Testing
    21. Click on Internal Testing and then the Testers tab
    22. Copy link and use it to install on a tester’s phone
    23. Testing } Internal Testing } Promote Release } Closed Testing } Alpha
    24. Save
    25. Review Release
  11. git checkout -b X.Y.Z_ios or git checkout -b X.Y.Z_android
  12. git add -A .
  13. git commit -am "iOS build" or git commit -am "Android build"
  14. git push --set-upstream origin X.Y.Z_ios or git push --set-upstream origin X.Y.Z_android
  15. git checkout master
  16. git clean --force && git reset --hard && rm -rf android/ ios/

Wow! You just made my day!
I am still thinking about ejecting, but it will be much easier now.
Thank you.

However, I was wondering about app signing.
As far as I can understand, in XCODE the credentials will be tied to my team when i chose them, right?
In Android, the key store is ejected?

This is my first app, so I am familiar with expo build only.

App signing and all the keys are not easy. It took me a few days to get everything working and it was very confusing. But if you have a week to spare, I think it’s better to do it to have more control.