Skip to content

Pod validation fails due to warnings with Xcode 26.0 #170437

Closed
3 of 4 issues completed
Closed

Description

@vashworth

https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20macos_repo_checks/8789/infra

Multiple APIs in multiple plugins are deprecated and now with Xcode 26.0 are showing as warnings, which causes pod validation to fail.

For example:

Linting camera_avfoundation.podspec
Running "pod lib lint /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation.podspec --configuration=Debug --skip-tests --use-libraries"

 -> camera_avfoundation
 -> camera_avfoundation (0.0.1)
    - NOTE  | xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | [iOS] xcodebuild:  note: Building targets in dependency order
    - NOTE  | [iOS] xcodebuild:  note: Target dependency graph (5 targets)
    - NOTE  | xcodebuild:  <module-includes>:1:9: note: in file included from <module-includes>:1:
    - NOTE  | xcodebuild:  |         `- note: in file included from <module-includes>:1:
    - NOTE  | [iOS] xcodebuild:  Headers/Public/camera_avfoundation/camera_avfoundation-umbrella.h:14:9: note: in file included from Headers/Public/camera_avfoundation/camera_avfoundation-umbrella.h:14:
    - NOTE  | [iOS] xcodebuild:  |         `- note: in file included from Headers/Public/camera_avfoundation/camera_avfoundation-umbrella.h:14:
    - NOTE  | xcodebuild:  Headers/Public/camera_avfoundation/camera_avfoundation.h:5:9: note: in file included from Headers/Public/camera_avfoundation/camera_avfoundation.h:5:
    - NOTE  | xcodebuild:  |         `- note: in file included from Headers/Public/camera_avfoundation/camera_avfoundation.h:5:
    - NOTE  | xcodebuild:  Headers/Public/camera_avfoundation/FLTCam.h:10:9: note: in file included from Headers/Public/camera_avfoundation/FLTCam.h:10:
    - NOTE  | xcodebuild:  |         `- note: in file included from Headers/Public/camera_avfoundation/FLTCam.h:10:
    - NOTE  | xcodebuild:  Headers/Public/camera_avfoundation/FLTCamConfiguration.h:11:9: note: in file included from Headers/Public/camera_avfoundation/FLTCamConfiguration.h:11:
    - NOTE  | xcodebuild:  |         `- note: in file included from Headers/Public/camera_avfoundation/FLTCamConfiguration.h:11:
    - NOTE  | xcodebuild:  Headers/Public/camera_avfoundation/FLTCamMediaSettingsAVWrapper.h:11:9: note: in file included from Headers/Public/camera_avfoundation/FLTCamMediaSettingsAVWrapper.h:11:
    - NOTE  | xcodebuild:  |         `- note: in file included from Headers/Public/camera_avfoundation/FLTCamMediaSettingsAVWrapper.h:11:
    - NOTE  | xcodebuild:  Headers/Public/camera_avfoundation/FLTCaptureVideoDataOutput.h:8:9: note: in file included from Headers/Public/camera_avfoundation/FLTCaptureVideoDataOutput.h:8:
    - NOTE  | xcodebuild:  |         `- note: in file included from Headers/Public/camera_avfoundation/FLTCaptureVideoDataOutput.h:8:
    - NOTE  | xcodebuild:  Headers/Public/camera_avfoundation/FLTCaptureOutput.h:8:9: note: in file included from Headers/Public/camera_avfoundation/FLTCaptureOutput.h:8:
    - NOTE  | xcodebuild:  |         `- note: in file included from Headers/Public/camera_avfoundation/FLTCaptureOutput.h:8:
    - WARN  | xcodebuild:  Headers/Public/camera_avfoundation/FLTCaptureConnection.h:17:22: warning: 'AVCaptureVideoOrientation' is deprecated: first deprecated in iOS 17.0 - Use AVCaptureDeviceRotationCoordinator instead
    - NOTE  | xcodebuild:  |                      `- warning: 'AVCaptureVideoOrientation' is deprecated: first deprecated in iOS 17.0 - Use AVCaptureDeviceRotationCoordinator instead
    - NOTE  | xcodebuild:  /Volumes/Work/s/w/ir/cache/osx_sdk/xcode_17a5241e/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureSession.h:143:28: note: 'AVCaptureVideoOrientation' has been explicitly marked deprecated here
    - NOTE  | xcodebuild:  |                            `- note: 'AVCaptureVideoOrientation' has been explicitly marked deprecated here
    - WARN  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/DefaultCamera.swift:12:13: warning: sendability of function types in instance method 'stopVideoRecording(completion:)' does not match requirement in protocol 'Camera'; this is an error in the Swift 6 language mode
    - NOTE  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/Camera.swift:51:8: note: expected sendability to match requirement here
    - NOTE  | xcodebuild:  func stopVideoRecording(completion: @escaping (_ path: String?, _ error: FlutterError?) -> Void)
    - WARN  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/DefaultCamera.swift:12:13: warning: sendability of function types in instance method 'captureToFile(completion:)' does not match requirement in protocol 'Camera'; this is an error in the Swift 6 language mode
    - NOTE  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/Camera.swift:53:8: note: expected sendability to match requirement here
    - NOTE  | xcodebuild:  func captureToFile(completion: @escaping (_ path: String?, _ error: FlutterError?) -> Void)
    - WARN  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/DefaultCamera.swift:12:13: warning: sendability of function types in instance method 'setExposurePoint(_:withCompletion:)' does not match requirement in protocol 'Camera'; this is an error in the Swift 6 language mode
    - NOTE  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/Camera.swift:63:8: note: expected sendability to match requirement here
    - WARN  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/DefaultCamera.swift:12:13: warning: sendability of function types in instance method 'setFocusPoint(_:completion:)' does not match requirement in protocol 'Camera'; this is an error in the Swift 6 language mode
    - NOTE  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/Camera.swift:69:8: note: expected sendability to match requirement here
    - WARN  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/DefaultCamera.swift:12:13: warning: sendability of function types in instance method 'setZoomLevel(_:withCompletion:)' does not match requirement in protocol 'Camera'; this is an error in the Swift 6 language mode
    - NOTE  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/Camera.swift:74:8: note: expected sendability to match requirement here
    - NOTE  | xcodebuild:  func setZoomLevel(_ zoom: CGFloat, withCompletion: @escaping (_ error: FlutterError?) -> Void)
    - WARN  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/DefaultCamera.swift:12:13: warning: sendability of function types in instance method 'setFlashMode(_:withCompletion:)' does not match requirement in protocol 'Camera'; this is an error in the Swift 6 language mode
    - NOTE  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/Camera.swift:76:8: note: expected sendability to match requirement here
    - WARN  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/DefaultCamera.swift:12:13: warning: sendability of function types in instance method 'setDescriptionWhileRecording(_:withCompletion:)' does not match requirement in protocol 'Camera'; this is an error in the Swift 6 language mode
    - NOTE  | xcodebuild:  /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/Camera.swift:84:8: note: expected sendability to match requirement here
    - NOTE  | [iOS] xcodebuild:  /Users/chrome-bot/Library/Developer/Xcode/DerivedData/App-bonmhlbxscwcgbfkaunfmrgxjenj/Build/Products/Debug-iphonesimulator/camera_avfoundation/camera_avfoundation-umbrella.h:14:9: note: in file included from /Users/chrome-bot/Library/Developer/Xcode/DerivedData/App-bonmhlbxscwcgbfkaunfmrgxjenj/Build/Products/Debug-iphonesimulator/camera_avfoundation/camera_avfoundation-umbrella.h:14:
    - NOTE  | [iOS] xcodebuild:  |         `- note: in file included from /Users/chrome-bot/Library/Developer/Xcode/DerivedData/App-bonmhlbxscwcgbfkaunfmrgxjenj/Build/Products/Debug-iphonesimulator/camera_avfoundation/camera_avfoundation-umbrella.h:14:
    - NOTE  | [iOS] xcodebuild:  note: Using stub executor library with Swift entry point. (in target 'App' from project 'App')
    - NOTE  | [iOS] xcodebuild:  2025-06-10 18:36:41.926 appintentsmetadataprocessor[46625:986507] warning: Metadata extraction skipped. No AppIntents.framework dependency found.
    - NOTE  | [iOS] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 26.0.99. (in target 'Flutter' from project 'Pods')

[!] camera_avfoundation did not pass validation, due to 8 warnings (but you can use `--allow-warnings` to ignore them).

There are also other new warnings, see sub-issues.

Activity

  1. added
    platform-iosiOS applications specifically
    fyi-ecosystemFor the attention of Ecosystem team
    team-iosOwned by iOS platform team
    on Jun 11, 2025
  2. vashworth commented on Jun 11, 2025

    @vashworth
    ContributorAuthor

    @stuartmorgan-g I'm not sure how we want to handle this. Xcode 26.0 now makes usage of deprecated APIs warnings. However, I don't know that we want to remove the usage in all cases. For example, the #170442 ones - I'm pretty sure most of them are StoreKit 1 deprecations. We've made StoreKit2 the default, but you can still opt to use StoreKit 1 I believe.

    Do you have any ideas? It'd be a bummer to disable this test

  3. changed the title [-]Pod validation fails due to deprecation warnings with Xcode 26.0[/-] [+]Pod validation fails due to warnings with Xcode 26.0[/+] on Jun 11, 2025
  4. stuartmorgan-g commented on Jun 11, 2025

    @stuartmorgan-g
    Contributor

    Is there any documentation on what the new rules are for when they show them? It used to be that it was only if you used an API that was deprecated at or before your min iOS deployment version. That's why we have this, which was intended to be something that the iOS team would move forward on a regular basis to stay ahead of deprecation warnings (rather than only finding them when we wanted to drop an iOS version, and then having to scramble). (It hasn't been moved forward for a while; that's something that would be worth doing at some point, and ideally scheduling on a yearly basis.)

    Presumably they don't show them within the else block of an @available check, but is it unconditional other than that? If so, we're probably going to have to add a bunch of warning suppressions inline in the code (example).

  5. stuartmorgan-g commented on Jun 11, 2025

    @stuartmorgan-g
    Contributor

    It used to be that it was only if you used an API that was deprecated at or before your min iOS deployment version.

    Oh wait, I think there's weirdness where the pod validation doesn't always work the way we want it to because it synthetically creates a temporary Xcode project, and runs analysis there. Maybe that project is using the wrong deployment version?

    Ideally we would just turn off the code-level warnings since we run our own analysis run, but I don't see an option for that unfortunately.

  6. stuartmorgan-g commented on Jun 11, 2025

    @stuartmorgan-g
    Contributor

    Maybe we could try --quick?

    Lint skips checks that would require to download and build the spec

    It's not clear to me what the scope of things that we might still want tested would not be tested with that, but it should at least still sanity-check the podspec format I assume. That may be all we need with the current state of Cocoapods?

  7. added
    P1High-priority issues at the top of the work list
    triaged-iosTriaged by iOS platform team
    on Jun 12, 2025
  8. 9 remaining items

  9. vashworth commented on Jul 25, 2025

    @vashworth
    ContributorAuthor

    Rather than --quick, I think we should use --allow-warnings. Then this test will still at least catch problems with the podspec like @stuartmorgan-g mentioned. It seems that --quick doesn't really catch many issues other than some syntax (e.g. incorrect file structure, incorrect dependencies, etc, are not caught)

    pod lib lint camera_avfoundation.podspec --configuration=Debug --skip-tests --use-libraries --allow-warnings
    
  10. jmagman commented on Aug 4, 2025

    @jmagman
    Member

    Alternative suggestion: instead of changing anything with warnings/errors in the podspec, we add "--exclude=script/configs/exclude_xcode_deprecation.yaml" to the podspec-check command:
    https://github.com/flutter/packages/blob/83ae18a4faf6cbd18138d6fe7a20859a28b84166/.ci/targets/macos_repo_checks.yaml#L16

    podspec-check can find issues other than deprecations so more issues in the excluded packages may be missed (for example, Swift 6 errors). However, it will address the Xcode 26 behavior change and unblock testing Xcode 26 in CI.

    I'm already planning on adding camera to the exclusion list in this PR: flutter/packages#9431

  11. lucasjinreal commented on Oct 31, 2025

    @lucasjinreal
  12. added
    P2Important issues not at the top of the work list
    and removed
    P1High-priority issues at the top of the work list
    on Nov 5, 2025
  13. vashworth commented on Sep 28, 2026

    @vashworth
    ContributorAuthor

    We switched podspec linting to --quick, see #178806.

  14. github-actions commented on Oct 12, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  15. locked as resolved and limited conversation to collaborators on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions