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!
Xcode 11.4 changed the way frameworks are linked and embedded. Flutter v1.15.3 and later will automatically migrate your Xcode project.
In the meantime, to fix it manually, follow the following instructions: https://flutter.dev/docs/development/ios-project-migration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With