'Flutter build iOS got error: Requested but did not find extension point with identifier

I just upgraded to Xcode 13.3-beta, running a flutter project got this error:

Error output from Xcode build:
↳
    2022-03-02 17:45:38.148 xcodebuild[62848:6695836] 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-03-02 17:45:38.148 xcodebuild[62848:6695836] 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
    ** BUILD FAILED **

Now, I am confused, I am running a iOS app on simulator, why throughs out errors like watchOS?

And I totally don't know how to resolve this error.

Any one could help me?



Solution 1:[1]

OK, very weird but running xcrun multiple times seems to fix this. I had also updated to Xcode 13.3 recently.

xcrun -sdk iphoneos --show-sdk-path

The first time it shows the error. The second time it shows the right answer. I ran it with all three sdks, iphoneos, macosx, watchos and all showed the errors the first time. I also ran it with all five of the options for all three sdks:

xcrun -sdk iphoneos --show-sdk-path
xcrun -sdk iphoneos --show-sdk-version
xcrun -sdk iphoneos --show-sdk-build-version
xcrun -sdk iphoneos --show-sdk-platform-path
xcrun -sdk iphoneos --show-sdk-platform-version

The build error from xcodebuild went away after that, although I'm not certain which of the commands fixed it.

Solution 2:[2]

Found solution:

  1. Check for updates of Xcode in App Store (it should be updated already, but just for confirmation)
  2. Launch Xcode; it will ask you to install additional software. After installation finishes the errors will gone.

Solution 3:[3]

Fixed this by running.

xcrun -sdk macosx --show-sdk-path 

This outputs your current skd path.

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk

Add this to your .zshrc file.

export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk

Source it

source ~/.zshrc

Now run

 xcrun -sdk macosx --show-sdk-version

Solution 4:[4]

To avoid hard coding the version you can add this to your .profile:

export SDKROOT=$(xcrun -sdk macosx --show-sdk-path)

reload profile (source path to your profile) and run

xcrun -sdk macosx --show-sdk-version

to verify

Solution 5:[5]

This issue is sadly with XCode 13.3.

This is pointed out by this answer - Stackoverflow Answer- Flutter for iOS run, build but not archive

The three solutions given were

  • Modify the code

  • Downgrade to Xcode 13.2.1

  • Wait for Apple to modify Xcode

For myself I use CodeMagic, and didn't have the luxury of downgrading my Archive. XCode could take months to update. So modifying the code was the only option. I was able to find this issue opened on March 15th 2022. Which eventually has this solution..

Open your Podfile and paste pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/miguelpruivo/DKImagePickerController.git' as shown below:

`target 'Runner' do
use_frameworks!
use_modular_headers!
#Workaround for segmentation fault:11 while archiving
#Add the below line
pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/miguelpruivo/DKImagePickerController.git'

flutter_install_all_ios_pods File.dirname(File.realpath(FILE))
end`

Yes I know your error said your errors were through WatchOS. However as I understand, this is an issue that occurs in version 13.3 of Xcode. In Xcode 13.3, if you have a code that uses UI_USER_INTERFACE_IDIOM(), you will get an "Out of Memory" error when you run Archive. Changing "UI_USER_INTERFACE_IDIOM()" to "UIDevice.current.userInterfaceIdiom" resolves the error. Commonly this issue occures with flutter pods using - DKImagePickerController/PhotoGallery.

I was able to fix this without touching anything Watch related. On top of this I made sure my flutter project had a minimum support level of 12, however that might be completely unrelated.

Ultimately downgrading is probably the solution. As well many of my links lead to other solutions if anyone is curious of the diving into it.

Solution 6:[6]

Okay, just found a solution which might sound super dumb but updating my Mac OS to Moterey 12.3 solved the issue with no change in the code required.

Solution 7:[7]

A workaround that worked for me was to install the previous stable Xcode version 13.2.1 and build it from the IDE.

You can have multiple versions installed, so you don't have to change anything in your current setup.

https://xcodereleases.com/

Solution 8:[8]

Check if there is some update for Xcode.

xcode-select --install

If you get the message below from the command above, try:

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

  sudo rm -rf /Library/Developer/CommandLineTools
  xcode-select --install

Also, you should check if there is a macOS update available.

Click on the Apple icon no top left > About this mac > Software update (for example, macOS Monterey 12.3)

Solution 9:[9]

If it's a flutter project following step can be helpful:

  • Update MacOS
  • Update Xcode and command lines tools
  • Run flutter pub upgrade, flutter pub get in the project folder
  • Delete podfile.lock in ios folder of the project
  • Run cd ios, pod repo update, pod install in the project folder

Solution 10:[10]

In my case, its React Native app, the problem was with cocoa pods. Reinstalling pods helped. Run below in your project folder

rm -rf ios/Pods && npx pod-install

Solution 11:[11]

Got this as well when trying to run the app from Android Studio. Solved this by...

  • starting XCode,
  • open the Runner,
  • run the app from xcode,
  • stop the app in xcode, ...and then it worked fine to run the app without this error from Android Studio.

Solution 12:[12]

  1. you can try install the latest xcode13.3
  2. then you can try xcode-select --install to install the command tools

Solution 13:[13]

Run command sudo xcode-select -s /Applications/Xcode.app

Solution 14:[14]

Also experiencing the same issue, I tried @user1503606 and @MCCCS suggestion, sadly didn't work.

Looking at this answer, the issue stems from XCode 13.3 and as @y2ducky suggests, downgrading should solve the issue.

Solutions:

  • Downgrade to Xcode 13.2.1 (you can find older versions here https://developer.apple.com/download/all/ then expand it and move Xcode (Xcode.app) to Applications folder, which will replace your current Xcode 13.)
  • Wait for Apple to modify Xcode

Solution 15:[15]

Using xcode version "13.2.1" works for me. Seems like "13.3" is doing something differently

Solution 16:[16]

Here is another one that helped me to solve this issue. Go to About this mac -> storage and remove support watchOS in Xcode developer settings.

Solution 17:[17]

Works with xcode 13.3.1, Monterey intel: downgrade flutter sdk to Flutter ->2.10.0 Dart ->2.16.0

which can be downloaded here: https://docs.flutter.dev/development/tools/sdk/releases?tab=macos

change your valid sdk path in terminal with flutter --version

this includes for new projects.

running May 1, 2022

Solution 18:[18]

Restart of iPhone solved the problem for me.

Solution 19:[19]

I brought another solution.

I tried multiple solutions which mentioned in this question, but all failed. So, I just tried from flutter starting project. It did build perfectly. After adding some libraries, the library starts to require more higher ios version.

I usually upgrade ios version by Podfile like this,

# Uncomment this line to define a global platform for your project
platform :ios, '12.0'

but, instead of that, I upgraded ios version with Runner.xcworkspace and ios/Flutter/AppframeworkInfo.plist according to this link. https://docs.flutter.dev/deployment/ios#review-xcode-project-settings

and after that, I finally succeeded to build project.

Solution 20:[20]

This also could be a problem with your pubspec.lock file. Some version of libraries probably trying to use Watch Support. That was the my case. So, I fixed some libraries's versions and then it worked fine.

Solution 21:[21]

This solution worked for me

  • Try xcode-select --install If command line developer tools were already installed try fixing it by
  • sudo xcode-select -r

Solution 22:[22]

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.

Solution 23:[23]

This works for me https://github.com/nvm-sh/nvm/issues/2764 I run:

?  ~ source ~/.nvm/nvm.sh
?  ~ nvm deactivate
/Users/username/.nvm/*/bin removed from ${PATH}

?  ~ source ~/.nvm/nvm.sh