Skip to content

[App.framework] Linked and embedded framework 'App.framework' was built for iOS/iOS Simulator #50568

Description

@jagandeepbrar

SOLUTION

@jmagman has written an article on how to solve this problem for your project: https://flutter.dev/docs/development/ios-project-migration

Steps to Reproduce

  1. Prepare application for running
  2. Run flutter run or flutter run --debug
  3. Build fails

Logs

Terminal Output

Screen Shot 2020-02-11 at 9 28 03 AM

flutter doctor -v

➜ flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.15.4 19E224g, locale en-CA)
    • Flutter version 1.12.13+hotfix.7 at /Users/jagandeepbrar/Development/flutter
    • Framework revision 9f5ff2306b (2 weeks ago), 2020-01-26 22:38:26 -0800
    • Engine revision a67792536c
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/jagandeepbrar/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Xcode 11.4, Build version 11N111s
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.0.2
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.42.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.8.1

[✓] Connected device (1 available)
    • iPhone 8 Plus • 934E82BE-9245-43CC-8A33-9E17C8806E78 • ios •
      com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)

• No issues found!

Notes

This appears to have started since upgrading 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 physically attached device, but no simulators of any devices can pass this stage.

EDIT: Just attempted both Flutter beta and dev channels, and the same error occurs after rebuilding the tools and running flutter clean in the project root.

Activity

  1. jagandeepbrar commented on Feb 11, 2020

    @jagandeepbrar
    Author

    As an update, just finished reinstalling the stable release of Xcode and using xcode-select to set it back to 11.3.1, and it works as expected. Launches in all emulators.

    Something must have broken in 11.4 beta.

  2. jmagman commented on Feb 12, 2020

    @jmagman
    Member

    I'm also on Xcode 11.4 beta and I just created a new app and was able to flutter run -d <simulator> without build errors on Flutter 1.12.13+hotfix.7.

    1. Did you run sudo xcodebuild -runFirstLaunch after you xcode-select to Xcode 11.4?
    2. Are you able to run on that simulator from ios/Runner.xcworkspace in Xcode?
  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 12, 2020
  4. jagandeepbrar commented on Feb 12, 2020

    @jagandeepbrar
    Author

    Hi @jmagman, thanks for responding. Yes, I did do the first run and I have tried running through Xcode as well and it is throwing me the same error.

    Screen Shot 2020-02-11 at 8 40 19 PM

    Let it be noted that it can build for generic iOS devices, and can run on physical devices, but is only showing this error on simulators.

    With both Xcode's installed together, I can use the beta (11.4) simulator with stable Xcode (11.3.1) and it works correctly. So it must be something in Xcode 11.4 that is causing the issue.

  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 12, 2020
  6. jmagman commented on Feb 12, 2020

    @jmagman
    Member

    I briefly saw this error, and I'm not sure how to I got into or out of that state.

    It's failing to even start the build to get to the script that would assemble the right variant. We could swap App.framework to App.xcframework but that would be a nightmare of a project file migration...

  7. added
    t: xcode"xcodebuild" on iOS and general Xcode project management
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Feb 12, 2020
  8. jmagman commented on Feb 12, 2020

    @jmagman
    Member

    Does rm -rf ios/Flutter/App.framework get you unstuck?

  9. jagandeepbrar commented on Feb 12, 2020

    @jagandeepbrar
    Author

    I reset my ios folder, which effectively deleted App.framework since it's in the .gitignore, and it seems to be working now! Works from both Xcode 11.4 and flutter run -d <id>.

  10. jmagman commented on Feb 12, 2020

    @jmagman
    Member

    Glad you have a workaround, but this is concerning so I'm going to reopen until we understand how often this is happening.

    Can you let us know if you see it again, and how you got in that state?

  11. jagandeepbrar commented on Feb 12, 2020

    @jagandeepbrar
    Author

    I had another machine that had a copy of the project on it. Using the App.framework from that project causes the issue to reappear. I have attached an archive that contains both a working and non-working copy of App.framework. I hope that can help you with the debugging!

    If there are any other files you may want please let me know!

    Issue 50568.zip

  12. jagandeepbrar commented on Feb 12, 2020

    @jagandeepbrar
    Author

    With the rebuilt App.framework I am not longer able to launch on my physical device. I now get this:

    Screen Shot 2020-02-11 at 10 11 07 PM

    It appears that the first build of App.framework causes it to only be compatible with the device type (simulator or physical) that is being used for that run.

    Deleting App.framework will cause it to be rebuilt on the next run and it will work correctly until you switch device types again. Running just flutter clean isn't enough, but you'll have to run it when you delete App.framework otherwise it will try to install the cached build.

    Again this only occurs with Xcode 11.4/Simulator 11.4. I did a build for physical devices which created an App.framework. Attempted to launch with Simulator 11.4 running an iOS 13.4 image and it failed to launch. I switched the command line tools back to Xcode 11.3/Simulator 11.3, and without changing App.framework it still works.

  13. 27 remaining items

  14. blueberryparm commented on Mar 25, 2020

    @blueberryparm
  15. ArthurKnight commented on Mar 27, 2020

    @ArthurKnight

    DO this and can't install app . No code signature found

  16. jmagman commented on Mar 27, 2020

    @jmagman
    Member

    @ArthurKnight Did you follow the instructions in https://flutter.dev/docs/development/ios-project-migration?

    Particularly the build phase:

    /bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" embed
    /bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" thin
    
  17. eospi commented on Mar 27, 2020

    @eospi
  18. jmagman commented on Mar 27, 2020

    @jmagman
  19. leecommamichael commented on Mar 27, 2020

    @leecommamichael
  20. jmagman commented on Mar 27, 2020

    @jmagman
  21. i-asimkhan commented on Apr 1, 2020

    @i-asimkhan

    @jmagman Thanks for this.

  22. coduy96 commented on Apr 4, 2020

    @coduy96
  23. Abhishek0116 commented on Apr 5, 2020

    @Abhishek0116

    Does rm -rf ios/Flutter/App.framework get you unstuck?

    This is working perfectly.

  24. wangfeng211 commented on Apr 6, 2020

    @wangfeng211
  25. jmagman commented on Apr 6, 2020

    @jmagman
  26. mbaleczny commented on Apr 6, 2020

    @mbaleczny
  27. jmagman commented on Apr 6, 2020

    @jmagman
  28. locked as resolved and limited conversation to collaborators on Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

c: regressionIt was better in the past than it is nowt: xcode"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions