Repository navigation
[App.framework] Linked and embedded framework 'App.framework' was built for iOS/iOS Simulator #50568
Copy link
Copy link
Closed
Labels
c: regressionIt was better in the past than it is nowIt was better in the past than it is nowt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
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
- Prepare application for running
- Run
flutter runorflutter run --debug - Build fails
Logs
Terminal Output
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: regressionIt was better in the past than it is nowIt was better in the past than it is nowt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.

Activity
jagandeepbrar commentedon Feb 11, 2020
As an update, just finished reinstalling the stable release of Xcode and using
xcode-selectto set it back to 11.3.1, and it works as expected. Launches in all emulators.Something must have broken in 11.4 beta.
jmagman commentedon Feb 12, 2020
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.sudo xcodebuild -runFirstLaunchafter youxcode-selectto Xcode 11.4?ios/Runner.xcworkspacein Xcode?jagandeepbrar commentedon Feb 12, 2020
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.
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.
jmagman commentedon Feb 12, 2020
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...
jmagman commentedon Feb 12, 2020
Does
rm -rf ios/Flutter/App.frameworkget you unstuck?jagandeepbrar commentedon Feb 12, 2020
I reset my
iosfolder, which effectively deleted App.framework since it's in the .gitignore, and it seems to be working now! Works from both Xcode 11.4 andflutter run -d <id>.jmagman commentedon Feb 12, 2020
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?
jagandeepbrar commentedon Feb 12, 2020
I had another machine that had a copy of the project on it. Using the
App.frameworkfrom 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
jagandeepbrar commentedon Feb 12, 2020
With the rebuilt
App.frameworkI am not longer able to launch on my physical device. I now get this:It appears that the first build of
App.frameworkcauses it to only be compatible with the device type (simulator or physical) that is being used for that run.Deleting
App.frameworkwill cause it to be rebuilt on the next run and it will work correctly until you switch device types again. Running justflutter cleanisn't enough, but you'll have to run it when you deleteApp.frameworkotherwise 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 changingApp.frameworkit still works.27 remaining items
blueberryparm commentedon Mar 25, 2020
ArthurKnight commentedon Mar 27, 2020
DO this and can't install app . No code signature found
jmagman commentedon Mar 27, 2020
@ArthurKnight Did you follow the instructions in https://flutter.dev/docs/development/ios-project-migration?
Particularly the build phase:
eospi commentedon Mar 27, 2020
jmagman commentedon Mar 27, 2020
leecommamichael commentedon Mar 27, 2020
jmagman commentedon Mar 27, 2020
i-asimkhan commentedon Apr 1, 2020
@jmagman Thanks for this.
coduy96 commentedon Apr 4, 2020
Abhishek0116 commentedon Apr 5, 2020
This is working perfectly.
wangfeng211 commentedon Apr 6, 2020
jmagman commentedon Apr 6, 2020
mbaleczny commentedon Apr 6, 2020
jmagman commentedon Apr 6, 2020