Skip to content

fix: add explicit platform versions to Package.swift#243

Merged
chuckhays merged 1 commit into
google:masterfrom
ncooke3:nc.xcode26.spm
Jun 9, 2026
Merged

fix: add explicit platform versions to Package.swift#243
chuckhays merged 1 commit into
google:masterfrom
ncooke3:nc.xcode26.spm

Conversation

@ncooke3

@ncooke3 ncooke3 commented Jun 9, 2026

Copy link
Copy Markdown
Member

nanopb fix for firebase/firebase-ios-sdk#16244

The Package.swift did not provide an explicit platforms: [SupportedPlatform]?. On Xcode 27 beta, this caused watchOS builds to fail. Only watchOS seems to be affected by not being specified in the platforms array.:

/Users/nickcooke/Library/Developer/Xcode/DerivedData/app-check-bazhoueefjmiowavinzydkvkoqvm/SourcePackages/checkouts/promises/Package.swift: error: The watchOS Simulator deployment target 'WATCHOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 27.0.x. (in target 'Promises' from project 'Promises' at path '/Users/nickcooke/Library/Developer/Xcode/DerivedData/app-check-bazhoueefjmiowavinzydkvkoqvm/SourcePackages/checkouts/promises/Package.swift')

Perhaps we should be setting watchOS(.v9) as we are explicitly specifying a version out of the logged range, but this would violate Firebase's currently watchOS min. supported version.

Observations:

  • watchOS is the only platform complaining about the missing specifier
  • adding the non-watchOS platforms is not necessary for those respective platforms to build
    • to future proof, I'm adding an explicit platforms array with all supported versions
      • this package's swift tools version does not support visionOS or macCatalyst specifiers
        • building visionOS 27 does however pass
        • building macCatalyst 26.5 with Xcode 27 passes (do not have beta macOS installed so can't test macCatalyst 27)

Mirroring the platform support versions from the promises podspec:
From

s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.11'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'
s.visionos.deployment_target = '1.0'

  s.ios.deployment_target  = '9.0'
  s.osx.deployment_target  = '10.11'
  s.tvos.deployment_target = '9.0'
  s.watchos.deployment_target = '2.0'
  s.visionos.deployment_target = '1.0'

Versioning

We should tag this version as a patch release: 2.4**.1**, so existing Firebase versions pick this up.

https://github.com/firebase/firebase-ios-sdk/blob/7f9f7d761627c827a0c6d7a410c9a111bf220f18/Package.swift#L136-L139

   .package(
      url: "https://github.com/google/promises.git",
      "2.4.0" ..< "3.0.0"
    ),

@ncooke3

ncooke3 commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

Tests look like unrelated flakes.

@chuckhays chuckhays merged commit b898aa3 into google:master Jun 9, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants