Skip to content

Invalid Podfile file: undefined local variable or method `flutter_application_path' #48038

@OhadMaor-VIA

Description

@OhadMaor-VIA

Steps to Reproduce

  1. Today, 1/1/20, I've installed the Flutter SDK and followed all the steps.
  2. I've then followed this link to integrate a flutter module in my existing native iOS app.
  3. After doing pod install I've got:
    [!] Invalid Podfile file: undefined local variable or method `flutter_application_path' for #Pod::Podfile:0x00007fd125b5bdc0.
  4. The podhelper.rb file is inside my_flutter/.ios/Flutter and has the actual method pod install needs.

Basically I am trying to integrate my_flutter module in my native iOS app. According to my understanding the stable channel now (1/1/2020) supports integrating a flutter module in my existing native iOS app. But, I've also switched to the master channel and got the same error.

Logs

doctor health -v:
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.5 18F132, locale en-US)
• Flutter version 1.12.13+hotfix.5 at /Users/ohad/flutter
• Framework revision 27321eb (3 weeks ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e
• Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/ohad/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3, Build version 11C29
• CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (1 available)
• iPhone 11 Pro Max • 6CE073F6-8AB2-4031-A777-7C1CBAE4AF45 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)

• No issues found!

Activity

OhadMaor-VIA

OhadMaor-VIA commented on Jan 2, 2020

@OhadMaor-VIA
Author

Solved by moving install_all_flutter_pods(flutter_application_path) to the end of the pod file.
i.e:
Before:

install_all_flutter_pods(flutter_application_path)
pod ...
pod ...
pod ...

After:

pod ...
pod ...
pod ...
install_all_flutter_pods(flutter_application_path)
github-actions

github-actions commented on Aug 24, 2021

@github-actions

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

locked as resolved and limited conversation to collaborators on Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @OhadMaor-VIA

        Issue actions

          Invalid `Podfile` file: undefined local variable or method `flutter_application_path' · Issue #48038 · flutter/flutter