flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.85k stars 27.66k forks source link

xcodebuild error: The workspace named "Runner" does not contain a scheme named "Runner" #28940

Closed dkikimov closed 3 years ago

dkikimov commented 5 years ago

Trying to build IOS app. It works brilliantly on Android, but when i tried to build it for iOS i had an error.

Why can it be?

Building com.example.cctrack for device (ios-release)...
Automatically signing iOS for device deployment using specified development team
in Xcode project: 2SLBG8E2Y6
Running Xcode build...                                                  
Xcode build done.                                            0,7s
xcodebuild: error: The workspace named "Runner" does not contain a scheme named
"Runner". The "-list" option can be used to find the names of the schemes in the
workspace.

Oops; flutter has exited unexpectedly: "Exit code 65 from: /usr/bin/env xcrun xcodebuild -configuration Release -quiet -workspace Runner.xcworkspace -scheme Runner BUILD_DIR=/Users/daniilkikimov/Downloads/cctrack/build/ios -sdk iphoneos SCRIPT_OUTPUT_STREAM_FILE=/var/folders/v4/0l22rds905zfxkzdzdsj7v2m0000gn/T/flutter_build_log_pipe.HtRYCe/pipe_to_stdout -showBuildSettings".
Sending crash report to Google.
Crash report sent (report ID: cbf3b982a89494d6)
Crash report written to /Users/daniilkikimov/Downloads/cctrack/flutter_02.log;
please let us know at https://github.com/flutter/flutter/issues.

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.12.6 16G1314, locale ru-KZ)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from:
      https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK
      components.
      (or visit https://flutter.io/setup/#android-setup for detailed
      instructions).
      If Android SDK has been installed to a custom location, set ANDROID_HOME
      to that location.
      You may also want to add it to your PATH environment variable.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.0.1)
[!] Android Studio (not installed)
[!] VS Code (version 1.27.2)
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected device
    ! No devices available
Allan-Nava commented 5 years ago

I got this erorr:

 === BUILD TARGET Pods-Runner OF PROJECT Pods WITH CONFIGURATION Release ===
    ld: '/Users/ies/Desktop/work/ntop/ivo_lite/build/ios/Release-iphoneos/FMDB/libFMDB.a(FMDatabasePool.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated
    library from the vendor, or disable bitcode for this target. file '/Users/ies/Desktop/work/ntop/ivo_lite/build/ios/Release-iphoneos/FMDB/libFMDB.a' for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

How can I fix it?

lanxuexing commented 5 years ago

I had the same problem

ld: framework not found App
clang: error: linker command failed with exit code 1 (use -v to see invocation)
MauroNavaDOS commented 5 years ago

Same error :V dammmn

oulfe-lemi commented 5 years ago

xcodebuild: error: The workspace named "Runner" does not contain a scheme named "Runner". The "-list" option can be used to find the names of the schemes in the workspace.

Oops; flutter has exited unexpectedly: "Exit code 65 from: /usr/bin/env xcrun xcodebuild -configuration Debug -quiet -workspace Runner.xcworkspace -scheme Runner BUILD_DIR=/Users/oulfe/project/sheger/build/ios -sdk iphonesimulator -arch x86_64 FLUTTER_SUPPRESS_ANALYTICS=true -showBuildSettings".

McLarenCollege commented 5 years ago

I got this erorr:

 === BUILD TARGET Pods-Runner OF PROJECT Pods WITH CONFIGURATION Release ===
    ld: '/Users/ies/Desktop/work/ntop/ivo_lite/build/ios/Release-iphoneos/FMDB/libFMDB.a(FMDatabasePool.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated
    library from the vendor, or disable bitcode for this target. file '/Users/ies/Desktop/work/ntop/ivo_lite/build/ios/Release-iphoneos/FMDB/libFMDB.a' for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

How can I fix it?

For me the solution was to go to the build settings in Xcode and set 'Enable bitcode' to No (under 'Build Options)

blackbeario commented 5 years ago

Same here.

xcodebuild: error: The workspace named "Runner" does not contain a scheme named "Runner"
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.12.8-pre.11, on Mac OS X 10.14.6 18G103, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.40.1)
[✓] Connected device (3 available)
Cameron-keith commented 4 years ago

Same here.

xcodebuild: error: The workspace named "Runner" does not contain a scheme named "Runner"
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.12.8-pre.11, on Mac OS X 10.14.6 18G103, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.40.1)
[✓] Connected device (3 available)

I am having this same issue,

Does anyone have an update on the fix?

jmagman commented 4 years ago

@Allan-Nava @McLarenCollege the bitcode issue seems unrelated. Please file a new issue.

@lanxuexing That one is definitely unrelated. Please file a new issue.

jmagman commented 4 years ago

@KatsuShooter @Cameron-keith @blackbeario Can one of you open ios/Runner.xcworkspace in Xcode and attach a screenshot of Product > Scheme > Edit Scheme to see what you have?

jmagman commented 4 years ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!

Thanks for your contribution.

guihackmann commented 4 years ago

open ios/Runner.xcworkspace

Hi, I have the same issue. Following the above steps, when I click "Edit Schemes" it doesn't show anything, it seems there are no schemes created. What should I do?

jmagman commented 4 years ago

@guihackmann That's different from the Xcode project that gets generated by flutter. Do you know how you got into that state? Did you edit it at some point? Do you see any schemes in ios/Runner.xcodeproj?

sscast commented 4 years ago

@guihackmann That's different from the Xcode project that gets generated by flutter. Do you know how you got into that state? Did you edit it at some point? Do you see any schemes in ios/Runner.xcodeproj?

I think I just come across the same issue, and before that I clicked "Localize". It appeared on the right hand side column if you open ios/Runner.xcworkspace (edited) Not sure if it's the same as what others experience, but hope it gives you some clue! And I'm curious for an answer too. My fix was to rebuild the app, but I know there should be another way! Thanks.

Screen Shot 2020-08-03 at 7 26 08 PM

`

jmagman commented 4 years ago

@sscast @guihackmann

Can one of you open ios/Runner.xcworkspace in Xcode and attach a screenshot of Product > Scheme > Edit Scheme to see what you have?

sscast commented 4 years ago

@sscast @guihackmann

Can one of you open ios/Runner.xcworkspace in Xcode and attach a screenshot of Product > Scheme > Edit Scheme to see what you have?

I don't have screenshot as I have rebuilt it. I remember if i open ios/Runner.xcworkspace it's empty, but I can open the Runner with ios/Runner.xcodeproj/

jmagman commented 3 years ago

I'm not sure how these workspace/project files were corrupted, but a newly created flutter create app isn't. If you see this, please file a new issue and completely fill out the template. Check your source control and see if you have any stray edits to ios/Runner* files.

Closing, I don't think this is actionable.

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.