Xcode Extension Point Error in Flutter iOS Build
When building a Flutter iOS application, developers may encounter the confusing error:
Requested but did not find extension point with identifier
Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS
This warning message appears related to watchOS extensions but occurs even when building for standard iOS targets. The error itself is typically a red herring - the actual build failure usually stems from other underlying issues.
Understanding the Error
This warning message originates from Xcode's internal extension system and indicates that Xcode is looking for watchOS-specific extensions that aren't present in your current configuration. While the message appears alarming, it's often just a side effect of other configuration problems rather than the root cause of build failures.
Most Effective Solutions
Based on community solutions, here are the most successful approaches to resolve this issue:
1. Clear Derived Data and Clean Build
The most consistently successful solution is to clear Xcode's derived data and perform a clean build:
# Remove Xcode derived data
rm -rf ~/Library/Developer/Xcode/DerivedData
# Clean Flutter build
flutter clean
# Get dependencies
flutter pub get
After running these commands, rebuild your project. The first build may take longer as Xcode rebuilds all artifacts.
2. Reset Xcode Command Line Tools
Misconfigured command line tools often cause this issue:
# Reset to default command line tools path
xcode-select -r
# Alternatively, explicitly set the path
sudo xcode-select -s /Library/Developer/CommandLineTools
# Reinstall command line tools if needed
xcode-select --install
3. Recreate iOS Directory Structure
For persistent issues, recreating the iOS project files can help:
WARNING
Back up your iOS folder before proceeding, as this will regenerate all iOS-specific files.
# Backup your iOS folder first if not using version control
cp -R ios ios_backup
# Remove the iOS folder
rm -rf ios
# Clean Flutter build
flutter clean
# Regenerate iOS files
flutter create .
# Restore any custom files (Info.plist, GoogleService-Info.plist, etc.)
cp ios_backup/Runner/Info.plist ios/Runner/
cp ios_backup/GoogleService-Info.plist ios/Runner/
# Install pods
cd ios
pod install
4. Update Dependencies and Tools
Ensure all development tools are up to date:
# Update Flutter
flutter upgrade
# Update macOS software
softwareupdate --all --install --force
# Update CocoaPods repository
pod repo update
Common Pitfalls and Targeted Solutions
Podfile Configuration Issues
Improper Podfile configuration can trigger this error. Ensure your Podfile has the correct iOS platform version:
# Uncomment and set appropriate iOS version
platform :ios, '12.0'
Package Version Conflicts
Some packages, particularly image_picker, have caused issues:
# In pubspec.yaml, use a stable version
dependencies:
image_picker: 0.8.4 # Instead of latest
File Syntax Errors
In rare cases, shell script syntax errors in Flutter tools can cause this issue. Check for parse errors in files like xcode_backend.sh
.
Apple Watch Interference
Surprisingly, having an Apple Watch connected and powered on can sometimes interfere with the build process due to how Xcode handles device targeting.
When All Else Fails
If none of the above solutions work, consider these more drastic measures:
Switch Flutter Channels:
bashflutter channel master flutter upgrade
Downgrade Flutter Version: Temporarily downgrade then upgrade Flutter
bashflutter downgrade flutter upgrade
Manual Xcode Plugin Editing (Advanced):
- Backup then edit
IDEWatchSupportCore.xcplugindata
- Remove the problematic extension points (not recommended for most users)
- Backup then edit
DANGER
Editing Xcode internal files may break your development environment. Only attempt this if you're comfortable with potential consequences and have complete backups.
Prevention Best Practices
- Keep Tools Updated: Regularly update Xcode, Flutter, and CocoaPods
- Use Version Control: Always use Git or similar to track changes to your iOS folder
- Document Dependencies: Clearly specify package versions in pubspec.yaml
- Maintain Clean Build Habits: Regularly run
flutter clean
before major builds
Conclusion
The "Requested but did not find extension point" error is typically a symptom rather than the root cause of build issues. Start with clearing derived data and resetting command line tools, then progress to more involved solutions if needed. In most cases, the problem resolves with proper cleanup and tool configuration.
Remember that this error often masks other issues, so check the complete build output for additional clues if these solutions don't immediately resolve the problem.