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

后端 未结 9 1534
生来不讨喜
生来不讨喜 2020-12-24 11:57

After updating to Catalina 10.15.4 beta with Xcode 13.4 beta, which also updated Simulator to 13.4 (921.4).

The application compiles and runs correctly on a physical

9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-24 13:02

    Updated to Xcode 11.4. Ios 13.4, Iphone X. App just fetches data using API. App started on white screen and then finally crashes, both on simulator and device.

    I followed the offical guide (I also rm -rf ios/Flutter/App.framework) flutter.dev/docs/development/ios-project-migration. I ran several times flutter clean

    I also tried deleting Pods/ folder and Podfile.lock, then reinstalling using pod install in the ios folder.

    As I am using async data I also added as 1st line in main()

    WidgetsFlutterBinding.ensureInitialized();
    

    No help, app did not started either simulator.

    Then I removed ios/ and android/ folders. After that in project folder I ran command flutter create . that regenerates mentioned folders.

    After this my app started fine both on simulator and on device. I hope this would be help to others. NOTE!! if you have done any modifications manually to those folders please take backup or commit beforehand.

提交回复
热议问题