Skip to content

iOS Build Failure: AdMob Initialization Fails #6109

Open
@nccirtu

Description

@nccirtu

Can we access your project?

  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

When running the app on an iOS Simulator, it crashes immediately on launch. This happens both when using the "Local Run" feature in the FlutterFlow Desktop App and when building the downloaded code manually with Xcode.

The crash log consistently shows a GADInvalidInitializationException, indicating that the Google Mobile Ads SDK is being initialized without a valid application ID, even though the GADApplicationIdentifier is correctly set in the Info.plist file.

Expected Behavior

The app should launch successfully on the iOS Simulator without crashing, correctly initializing the Google Mobile Ads SDK with the application ID provided in the project settings.

Steps to Reproduce

Problem Description:
When I try to run my app in "Local Run" mode via the FlutterFlow Desktop App, the iOS Simulator crashes. To investigate further, I downloaded the code, but I'm facing the exact same error after extensive local troubleshooting on my Mac: a GADInvalidInitializationException stating that the GADApplicationIdentifier is missing.
I've already gone through a long list of troubleshooting steps, which I've detailed below.
Troubleshooting Steps Performed on the Downloaded Code:
Clean Project Setup: Performed a clean code download, followed by flutter clean and flutter pub get.
CocoaPods Reinstallation: Completely cleaned the ios directory (pod deintegrate, etc.) and performed a fresh pod installation.
Resolved Xcode Conflicts: Manually resolved known conflicts between Flutter and CocoaPods (adjusting .xcconfig files and ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES).
Fixed Module Errors: Successfully resolved initial No such module errors for GoogleMaps and Flutter by configuring the Framework Search Paths.
Manual Info.plist Configuration: Correctly added the GADApplicationIdentifier to the Runner/Info.plist file.
Verified Plist Path: Confirmed that the "Info.plist File" build setting in the Runner target points to the correct Runner/Info.plist.
Cleared Xcode Cache: Completely deleted the Xcode DerivedData cache.
Reset Simulator: Performed a full "Erase All Content and Settings..." on the iOS Simulator.
My Hypothesis:
Since the error occurs in both the Local Run and the manually configured project, and all common troubleshooting avenues have been exhausted, my hypothesis is that the root cause might be related to how the Xcode project is configured for AdMob integration by FlutterFlow. It's possible that a build script isn't correctly picking up the Info.plist entry.
I would be very grateful if you could look into this and help me identify the cause.
Thank you for your support.

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

ITFXhcj1sIlNxeZE0Zf+cO1v/GEwGUALa+dI0tZ+TQ0jF5D4P7QQd+PRTFtvQtyzaHxlMWL9nTgz/6nlhdnLV8ErNUmdc6ZZyqoNUhPPbFOmaKXQCri7dmh6TO5YFXaD0qunmiRQIbNYLnAZ2GGuft69az6Cf9qOYwx5e6fDbOY=

Visual documentation

Steps to Reproduce the Issue:

  1. Project Setup:

    • Create a new project in FlutterFlow.
    • Navigate to Settings > Integrations > AdMob.
    • Enable AdMob and enter a valid iOS App ID.
  2. Triggering the Build:

    • Use the FlutterFlow Desktop App to start a "Local Run" session for the iOS Simulator.
    • Alternatively, download the project code.
  3. Local Setup (if code was downloaded):

    • Run flutter clean, then flutter pub get in the project directory.
    • Navigate to the ios folder and run pod install.
    • Open the Runner.xcworkspace file in Xcode.
  4. Launch the App:

    • Build and run the app on an iOS Simulator.
  5. Observe the Crash:

    • The app will build successfully but crash immediately upon launch.
    • The Xcode debug console will show a GADInvalidInitializationException with the reason that the SDK was initialized without an application ID. This happens even though the GADApplicationIdentifier key is present and correct in the Runner/Info.plist file.

Environment

- FlutterFlow version: Latest Production Version 
- Platform: macOS Desktop App
- Browser name and version: N/A (Using Desktop App)
- Operating system and version affected: macOS 15.4.1

Additional Information

This issue is a critical blocker. It completely prevents me from testing, debugging, and ultimately deploying the iOS version of my app. Since my project relies on AdMob for monetization, I am unable to proceed with the app launch until this is resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageA potential issue that has not been confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions