1

I have an old project that didn't work on in the last 8 months and came back this week. No code changes nothing, I just updated to Xcode Version 12.4 (12D4e) as my iPhone iOS is upgraded and could not run the app.

Now I'm facing lots of troubles, cannot build anymore for iOS

I got these errors

Building for iOS, but the linked and embedded framework 'Flutter. framework' was built for iOS + iOS Simulator.

I tried all sort of things without success like

  1. flutter clean
  2. rm -rf ios/Pods && cd ios/; pod install --repo-update
  3. rm -rf ios/Flutter/App.framework

All the above together and nothing worked to get rid of the error.

My flutter version

Flutter 1.12.13+hotfix.8 • channel unknown • unknown source
Framework • revision 0b8abb4724 (1 year, 4 months ago) • 2020-02-11 11:44:36 -0800
Engine • revision e1e6ced81d
Tools • Dart 2.7.0

Flutter doctor is also happy

[✓] Flutter (Channel unknown, v1.12.13+hotfix.8, on macOS 11.4 20F71, locale en-DE)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
[✓] Android Studio (version 3.5)

I knew my flutter version is old, so please don't suggest updating. Updating is very hard as I tried but I have to update all code and many libraries are not available in the new version.

So please flutter experts any idea how to solve this?

Update 1 June 2021: I downgraded to old xcode version by downloading manually Version 11.4 (11E146). I could build archive fine here the app, then trying to publish in app store I got this error:

SDK Version Issue. This app was built with the iOS 13.4 SDK. All iOS apps submitted to the App Store must be built with the iOS 14 SDK or later, included in Xcode 12 or later.

So I cannot downgrade, or use new one I got stuck in changing and deploying the ios version...

2
  • Are you confusing "update flutter to 2.x" with "update dart to behave NNBD instead of legacy"? Because you can upgrade flutter without using NNBD, and all your chosen libs and code will just work. Commented Jun 1, 2021 at 3:09
  • Hi @RandalSchwartz. I am not interested in updating dart of flutter. As I described here, I updated xcode after 8 months and cannot build anymore for ios simulator or device Commented Jun 1, 2021 at 8:07

1 Answer 1

1

Try following

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. Tried that now, still same error " error: Building for iOS Simulator, but the linked and embedded framework 'Flutter.framework' was built for iOS + iOS Simulator. (in target 'Runner' from project 'Runner') "

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.