stream-video-flutter icon indicating copy to clipboard operation
stream-video-flutter copied to clipboard

iOS XCode 26: Clang dependency scanner failure

Open EvertonMJunior opened this issue 3 months ago • 5 comments

Hi!

After upgrading to XCode 26, I've been running into this issue and have been unable to build our app to iOS:

Failed to build iOS app
Swift Compiler Error (Xcode): Clang dependency scanner failure: While building module
'stream_video_screen_sharing' imported from stream_video_screen_sharing-130b6558.input:1:
In file included from <module-includes>:2:
/Users/everton/Library/Developer/Xcode/DerivedData/Runner-amdnynljsxtwiwbczsyyskjnmuic/Build/Intermediates.
noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/stream_video_screen_sharing/stream_v
ideo_screen_sharing.framework/Headers/stream_video_screen_sharing-Swift.h:285:9: fatal error: module
'Flutter' not found
stream_video_screen_sharing-130b6558.input:1:1: fatal error: could not build module
'stream_video_screen_sharing'



Swift Compiler Error (Xcode): Clang dependency scanner failure: While building module
'stream_video_screen_sharing' imported from stream_video_screen_sharing-13b26172.input:1:
In file included from <module-includes>:2:
/Users/everton/Library/Developer/Xcode/DerivedData/Runner-amdnynljsxtwiwbczsyyskjnmuic/Build/Intermediates.
noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/stream_video_screen_sharing/stream_v
ideo_screen_sharing.framework/Headers/stream_video_screen_sharing-Swift.h:285:9: fatal error: module
'Flutter' not found
stream_video_screen_sharing-13b26172.input:1:1: fatal error: could not build module
'stream_video_screen_sharing'



Swift Compiler Error (Xcode): Unable to find module dependency: 'Flutter'


Swift Compiler Error (Xcode): Compilation search paths unable to resolve module dependency:
'stream_video_screen_sharing'


Encountered error while archiving for device.

This is our current Podfile:

platform :ios, '15.5.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

target 'Broadcast Extension' do
  use_frameworks!
  pod 'stream_video_screen_sharing', :path => File.join('.symlinks', 'plugins', 'stream_video_screen_sharing', 'ios')
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)

    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.5.0'
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',

        ## dart: PermissionGroup.calendar
        # 'PERMISSION_EVENTS=0',

        ## dart: PermissionGroup.reminders
        # 'PERMISSION_REMINDERS=0',

        ## dart: PermissionGroup.contacts
        # 'PERMISSION_CONTACTS=0',

        ## dart: PermissionGroup.camera
        'PERMISSION_CAMERA=1',

        ## dart: PermissionGroup.microphone
        'PERMISSION_MICROPHONE=1',

        ## dart: PermissionGroup.speech
        # 'PERMISSION_SPEECH_RECOGNIZER=0',

        ## dart: PermissionGroup.photos
        'PERMISSION_PHOTOS=1',

        ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
        # 'PERMISSION_LOCATION=0',

        ## dart: PermissionGroup.notification
        'PERMISSION_NOTIFICATIONS=1',

        ## dart: PermissionGroup.mediaLibrary
        'PERMISSION_MEDIA_LIBRARY=1',

        ## dart: PermissionGroup.sensors
        # 'PERMISSION_SENSORS=0'
      ]
    end
  end
end

I found this similar issue on Pusher, tried using the same idea as the fix suggested there, but it didn't work.

Can you guys check this out?

Thanks!

EvertonMJunior avatar Sep 24 '25 10:09 EvertonMJunior

Hi @EvertonMJunior, I just tried to run our dogfooding app with xcode 26.0.1 and iOS target, that runs just fine. Can you try to see if you have the same issue with our dogfooding app? Or do you mean building it for a release?

renefloor avatar Sep 30 '25 09:09 renefloor

I have the same issue and I am running on Xcode 26 and Flutter version 3.35.3

Aanu1995 avatar Oct 01 '25 12:10 Aanu1995

I think I could reproduce. Building using the flutter command was fine for me, but building from xcode directly is failing. Is that the same for you?

Edit: this seems to work, but I don't consider it a solution.

Edit2: @EvertonMJunior and @Aanu1995 you can disable 'explicitly built modules' in the xcode project settings. That makes the compilation work in xcode.

Image

renefloor avatar Oct 07 '25 13:10 renefloor

Thank you. Remove 'explicitly built modules' in the xcode project settings makes the build successful

Aanu1995 avatar Oct 08 '25 14:10 Aanu1995

Btw, we'll keep this ticket open to see if we can fix in a better way. We're also investigating adding support for SPM, which might also fix this issue.

renefloor avatar Oct 08 '25 14:10 renefloor