Skip to content

No podspec found for Flutter in ../flutter_module_example/.ios/Flutter/engine #84279

@th-anguyen

Description

@th-anguyen

Steps to Reproduce

Example project located here:
https://github.com/thunderheadone/one-sdk-flutter/tree/feature/MOB-1367_Add-Flutter-to-existing-app-example/examples/ios-add-flutter-to-existing-app-example

  1. In terminal, navigate to to examples/flutter_module_example/
  2. Run flutter clean, then flutter pub get
  3. Navigate to ios-add-fluter-to-existing-app-example
  4. Run pod install

Expected results:
pod install works okay and ios project with Flutter module added works.

Actual results:
After upgrading Flutter from v1.22.1 to v2.2.1 stable, trying to run pod install from the iOS project ios-add-flutter-to-existing-app-example with flutter_module_example module (add to app) produces the following error:

Analyzing dependencies
[!] No podspec found for `Flutter` in `../flutter_module_example/.ios/Flutter/engine`

It seems like the Flutter.podspec is missing in the generated .ios/Flutter/engine directory. When I switch to 1.22.1 and run flutter pub get from the flutter_module_example directory, the podspec is generated. Same command on 2.2.1 does not generate the podspec.

`flutter doctor -v` results: [✓] Flutter (Channel stable, 2.2.1, on macOS 11.4 20F71 darwin-x64, locale en-US) • Flutter version 2.2.1 at /Users/alexnguyen/dev/flutter • Framework revision 02c026b (13 days ago), 2021-05-27 12:24:44 -0700 • Engine revision 0fdb562ac8 • Dart version 2.13.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/alexnguyen/Library/Android/sdk/
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = /Users/alexnguyen/Library/Android/sdk/
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.5, Build version 12E262
• CocoaPods version 1.10.1

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] VS Code (version 1.56.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.23.0

[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.77
! Error: Alex iPhone 12 Pro Max is not connected. Xcode will continue when Alex iPhone 12 Pro Max is connected. (code -13)

• No issues found!

Activity

TahaTesser

TahaTesser commented on Jun 10, 2021

@TahaTesser
Member

Hi @th-anguyen
Thanks for filing the issue

I can reproduce the issue using code

tahatesser@Tahas-MBP ios-add-flutter-to-existing-app-example % pod install
Analyzing dependencies
[!] No podspec found for `Flutter` in `../flutter_module_example/.ios/Flutter/engine`

[!] Automatically assigning platform `iOS` with version `14.5` on target `Add Flutter to Existing App Example` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
tahatesser@Tahas-MBP ios-add-flutter-to-existing-app-example % 

However, I see that you've non-hidden iOS folder. Flutter module generated .ios folder which is hidden by default and you're not supposed to modify it as this is generated

I simply deleted you non-hidden ios and executeflutter pub get and it generates new .ios folder and then executed pod install in the ios-add-flutter-to-existing-app-example

tahatesser@Tahas-MBP ios-add-flutter-to-existing-app-example % pod install
Analyzing dependencies
Downloading dependencies
Installing Flutter (1.0.0)
Installing FlutterPluginRegistrant (0.0.1)
Installing Thunderhead (6.3.7)
Installing flutter_example (0.0.1)
Installing one_sdk_flutter (0.1.0)
Generating Pods project
Integrating client project
Pod installation complete! There are 4 dependencies from the Podfile and 5 total pods installed.

[!] Automatically assigning platform `iOS` with version `14.5` on target `Add Flutter to Existing App Example` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
tahatesser@Tahas-MBP ios-add-flutter-to-existing-app-example % 

As you can see all the pods are installed and we don't get No podspec error

flutter doctor -v
[✓] Flutter (Channel stable, 2.2.1, on macOS 11.4 20F71 darwin-x64, locale en-GB)
    • Flutter version 2.2.1 at /Users/tahatesser/Code/flutter_stable
    • Framework revision 02c026b03c (2 weeks ago), 2021-05-27 12:24:44 -0700
    • Engine revision 0fdb562ac8
    • Dart version 2.13.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Volumes/Extreme/Xcode-beta.app/Contents/Developer
    • Xcode 13.0, Build version 13A5154h
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] VS Code (version 1.56.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.23.0

[✓] Connected device (3 available)
    • iPhone 12 (mobile) • F0F01CEF-6AB8-4654-B53E-616A76808595 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64     • macOS 11.4 20F71
      darwin-x64
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome
      91.0.4472.77

• No issues found!
added
waiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds
on Jun 10, 2021
nxcco

nxcco commented on Jun 11, 2021

@nxcco

Also ran into this issue. Same procedure used like @TahaTesser to solve it.

IgorBelyayev

IgorBelyayev commented on Jul 8, 2021

@IgorBelyayev

@TahaTesser The solution you proposed works in op's use case, however it is not acceptable for me. The reason being is that my Flutter project is both a module and a stand-alone app. Consequently, I need both the ios and .ios folders. I therefore think there will need to be a more sophisticated fix for this issue.

no-response

no-response commented on Jul 8, 2021

@no-response

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.

TahaTesser

TahaTesser commented on Jul 9, 2021

@TahaTesser
Member

@IgorBelyayev
Please file a new issue with your use case with the details to reproduce the issue

github-actions

github-actions commented on Jul 30, 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 Jul 30, 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

    in triagePresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @IgorBelyayev@nxcco@TahaTesser@th-anguyen

        Issue actions

          No podspec found for `Flutter` in `../flutter_module_example/.ios/Flutter/engine` · Issue #84279 · flutter/flutter