11

I'm using Xcode 13.3.1.

I'm trying to build a flutter application in Android Studio. It failed with the following error. To make it dead simple I tried just running xcodebuild which produced the same error as in Android Studio:

 .oh-my-zsh git:(master) xcodebuild
2022-04-21 19:45:25.858 xcodebuild[32450:312401] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-04-21 19:45:25.859 xcodebuild[32450:312401] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

xcodebuild: error: The directory /Users/salahuddin/.oh-my-zsh does not contain an Xcode project.

Any idea what causes this error and how to fix it?

Salahuddin
  • 1,617
  • 3
  • 23
  • 37
  • Does this answer your question? [Please help me with dependencies problem in Flutter. Says build failed because of something related to Apple Watch but I am not using Apple Watch](https://stackoverflow.com/questions/72270890/please-help-me-with-dependencies-problem-in-flutter-says-build-failed-because-o) – alegos27 May 18 '22 at 11:45

9 Answers9

6

Please refer to the message, you can find out solution. https://developer.apple.com/forums/thread/703233

SOLUTION (for me):

I had to first find the software update manually:

softwareupdate --list

This provided me with the following output:

Finding available software Software Update found the following new or updated software:

  • Label: Command Line Tools for Xcode-13.3 Title: Command Line Tools for Xcode, Version: 13.3, Size: 718145KiB, Recommended: YES, I then ran:

softwareupdate -i "Command Line Tools for Xcode-13.3"

(NOTE: You pass the "Label:" output as the string as yours could be different.

Shulamite
  • 61
  • 1
3

This command worked out for me: softwareupdate -d -a.

Reference: https://huckfinnsmoneytree.com/how-to-download-macos-updates-using-the-terminal/

kotlinski
  • 331
  • 2
  • 6
3

I faced the same problem when updating the project with Flutter 3. After several attempts, the below solution worked for me.

I have deleted the podfile.lock file inside the ios folder and then run the below commands.

  1. flutter pub upgrade
  2. flutter pub get
  3. cd ios
  4. pod repo update > Actually, this was an error for me but ignored it
  5. pod install

Also please make sure you are using the latest MacOS and Xcode. I hope this will help someone else.

Alex Chengalan
  • 8,211
  • 4
  • 42
  • 56
0

Looks like you need to install the Xcode command line tools, which you can do by executing the following command in Terminal: xcode-select --install

BoygeniusDexter
  • 2,154
  • 1
  • 16
  • 14
  • 9
    I tried running this command -> `xcode-select: error: command line tools are already installed, use "Software Update" to install updates`. Also tried `softwareupdate --install` but nothing was installed. – Salahuddin Apr 21 '22 at 12:56
0

This worked for me:

Completely turn off Bluetooth.

in ios/ folder of your project, change Podfile to platform :ios, '12.0'

Run pod deintegrate in Terminal inside the ios/ folder of your project.

Run pod install --repo-update in your ios/ folder

https://solveforums.msomimaktaba.com/threads/solved-flutter-for-ios-run-build-but-not-archive.699314/

0

The error mentions that there's no iOS project to be found on the directory.

xcodebuild: error: The directory /Users/salahuddin/.oh-my-zsh does not contain an Xcode project.

You'd need to navigate to the iOS build of your Flutter project on your terminal with cd ios and run xcodebuild there.

Omatt
  • 8,564
  • 2
  • 42
  • 144
0

multiple xcode.app you need to remove.(Download folder)

  1. XCode-> Preferences-> Locations -> Command Line Tools
  2. Check it shows multiple entries for same xcode version.
  3. Delete xCode.app other than Application folder.
  4. quit and restart xcode and terminal.
positivecrux
  • 1,307
  • 2
  • 16
  • 35
0

My issue was that I was using Xcode 13.4. I downloaded Xcode 13.3 from here and everything started working again.

I was encountering this issue on a self-hosted GitHub runner so in order for the fix above to work, I needed to:

  1. Uninstall the Xcode 13.4
  2. Remove the GitHub runner
  3. Install Xcode 13.3
  4. Re-add the GitHub runner
Code on the Rocks
  • 11,488
  • 3
  • 53
  • 61
0

Try This. Remove any command line tools:

sudo rm -rf /Library/Developer/CommandLineTools

Reinstall them:

xcode-select --install

Tell the system to use them:

sudo xcode-select -s /Library/Developer/CommandLineTools

If still not working, try that:

  • In Xcode > Preferences > Locations tab
  • Simply select the right toolset.
Medhi
  • 2,656
  • 23
  • 16