‘App.framework’ was built for iOS Simulator.

Recently I picked up Flutter and I must say I am simply loving every widget of it.

However, in between, I had to upgrade my MacOS to Catalina and with it, I also had to upgrade the XCode to 11.4. And with that I started hitting the below error message:

error: Building for iOS, but the linked and embedded framework ‘App.framework’ was built for iOS Simulator. (in target ‘Runner’ from project ‘Runner’)

It was confusing and frustrating initially, as I was in the middle of a project delivery milestone and now I had to deal with this unexpected upgrade issue.

Anyways, with some findings, I got to know that it's more of a compatibility issue that got introduced as XCode 11.4 onwards XCode handles the embedding and linking of frameworks differently. So now the Flutter framework has to handle this scenario. Actually as per their update, with Flutter ver 1.15.x onwards it's fixed.

But I can not switch my Flutter version and luckily the Flutter docs have also provided a workaround solution to this issue, but I failed in following the steps myself in the first try. Here is the Official link.

So, I am adding the steps here, mainly for myself to get reminded of the steps for future projects until I upgrade my Flutter version. And if it helps somebody then well and good.

Step 1: Open your project in XCode

Step 2: Delete the App.framework and Flutter.framework as shown below.

Just choose Remove References
Just choose “Remove References”

Step 3: Now go to Build Phases > Thin Binary and replace the contents with

/bin/sh “$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh” embed

/bin/sh “$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh” thin

Step 4: Lastly, go to Build Settings tab and look for ‘Other Linkage Flags’

Tip: You can quick search for ‘LDFlags’.

And add the following one by one, as shown in the gif below.

$(inherited) -framework Flutter

And that's it, your project should build fine for both physical device and simulator.





Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

5 Interesting Modules In Python To Play With

Alvin’s Dew Drop Daily — Issue #161

I Wanna Go Fast - Load Balancing Dynamic Steering

How to create a Rails 6 image in Docker — Ubuntu 18.04

Python Wordle Helper Code

HMS Account Kit and Features

Baozi Leetcode 190: Reverse Bits & 中年大叔程序员沮丧聊天疫情中的WFH

How to find TxID for SatisFinance Transfer Tax Compensation from the Migration (PC M

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhishek Singh

Abhishek Singh


More from Medium

Push Communication Notification in IOS 15

How Beneficial is Flutter for iOS App Development?

Best Cross-Platform App Development Frameworks 2022

Using Hasura GraphQL as a Backend for Flutter Projects