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

后端 未结 9 1533
生来不讨喜
生来不讨喜 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 12:51

    After several days trying to find a solution to test the Flutter app on iOS device, I finally found this:

    flutter clean
    flutter build ios
    

    -Open xCode and run app on your device.

    0 讨论(0)
  • 2020-12-24 12:53

    In my case, it works only simulator(debug). if you want to deploy your app on the app store(release) i highly recommend you to upgrade flutter version using

    flutter version v1.15.17
    

    otherwise you would encounter crashed app with white screen.

    just upgrade flutter version then all things work well

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题