-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Description
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
- In terminal, navigate to to examples/flutter_module_example/
- Run
flutter clean
, thenflutter pub get
- Navigate to
ios-add-fluter-to-existing-app-example
- 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
Flutter
in../flutter_module_auction/.ios/Flutter/engine
#77216TahaTesser commentedon Jun 10, 2021
Hi @th-anguyen
Thanks for filing the issue
I can reproduce the issue using code
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 generatedI simply deleted you non-hidden
ios
and executeflutter pub get
and it generates new.ios
folder and then executedpod install
in theios-add-flutter-to-existing-app-example
As you can see all the pods are installed and we don't get
No podspec
errorflutter doctor -v
nxcco commentedon Jun 11, 2021
Also ran into this issue. Same procedure used like @TahaTesser to solve it.
IgorBelyayev commentedon Jul 8, 2021
@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 commentedon Jul 8, 2021
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 commentedon Jul 9, 2021
@IgorBelyayev
Please file a new issue with your use case with the details to reproduce the issue
github-actions commentedon Jul 30, 2021
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.