Skip to content

Error on build for iOS after upgrading to XCode 26 #1066

@EvertonMJunior

Description

@EvertonMJunior

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions