Having to run Flutter Clean and remove framework everytime I switch building from Physical iOS and Simulator

Viewed 3901

I have a flutter Project I started a month ago. Yesterday my xcode automatically updated and began having this error

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

The only way I can make it work is to run the two commands below $ flutter clean $ rm -rf ios/Flutter/App.framework ios/Flutter/Flutter.framework

so Now it runs smoothly on the physical device but if I want to run on the simulator again I get a similar error without the word "Simulator" in it like this

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

To get it to work I have to run the two commands again.

Is this normal behaviour? I am sure the solution is simple? sorry I am new to flutter and iOS development. is there a way to have both frameworks in there for iOS Physical and for iOS Simulator so I don't have to clean and remove frameworks? Please let me know how exactly to add both. Steps would really be appreciated

Thank you!

1 Answers
Related