Skip to content

Comments

Lowered minimum deployment versions for iOS and Mac Catalyst to allow launch on iOS versions 15 and 16#782

Open
adamjansch wants to merge 3 commits intohummingbird-project:mainfrom
adamjansch:adamjansch/781
Open

Lowered minimum deployment versions for iOS and Mac Catalyst to allow launch on iOS versions 15 and 16#782
adamjansch wants to merge 3 commits intohummingbird-project:mainfrom
adamjansch:adamjansch/781

Conversation

@adamjansch
Copy link

Fix for issue 781: #781.

The main changes are lowering the minimum deployment version in the Package.swift files to .v15 for iOS and Mac Catalyst, which are the only two platforms I'm able to test this change on.

These changes then required @available or #available attributes to be added to specific classes, extensions and methods (as dictated by the compiler). In many places, iOS 16 could be used rather than iOS 17, so I used the lower version in these places.

Before this change I was experiencing a crash as detailed in the issue linked above. After this change, my app builds and runs successfully on Apple's iOS 16 simulator, and on an iPhone 6s I have running iOS 15.8.5.

… on iOS 15 and 16

Lowered minimum deployment versions for iOS and Mac Catalyst to allow launch on iOS versions 15 and 16.
Copy link
Member

@adam-fowler adam-fowler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to do this, let's do it properly. I've added a suggestion for platform in the Package.swift. You would then have to tag everything

@available(macOS 15, iOS 18, macCatalyst 18, tvOS 18, visionOS 2, *)

Also can you make sure you've compiled the PerformanceTest target and all the tests

Package.swift Outdated
let package = Package(
name: "hummingbird",
platforms: [.macOS(.v14), .iOS(.v17), .macCatalyst(.v17), .tvOS(.v17), .visionOS(.v1)],
platforms: [.macOS(.v14), .iOS(.v15), .macCatalyst(.v15), .tvOS(.v17), .visionOS(.v1)],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
platforms: [.macOS(.v14), .iOS(.v15), .macCatalyst(.v15), .tvOS(.v17), .visionOS(.v1)],
platforms: [.macOS(.v10_15), .iOS(.v13), .macCatalyst(.v13), .tvOS(.v13), .visionOS(.v1)],

@Joannis
Copy link
Member

Joannis commented Feb 10, 2026

Thanks for the PR! I concur with @adam-fowler too

…l on iOS 15 and 16

Included macOS (native), tvOS, and visionOS into the lower version party.
@adamjansch
Copy link
Author

adamjansch commented Feb 10, 2026

@adam-fowler @Joannis Some notes on the new commit:

  • I went through macOS, tvOS, and visionOS platforms, as well as all the packages separately and believe I got everything.
  • I didn't use the versions in @adam-fowler's comment, as Xcode doesn't provide a selection for those version in the minimum deployment dropdown, and no simulators exist to test those versions.
  • I also didn't add specific Mac Catalyst or visionOS versions in the @available/#available attributes, as the former tracks the iOS version, and the latter is so new that all versions of visionOS are supported.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.00%. Comparing base (12aed8f) to head (ebe3a99).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #782      +/-   ##
==========================================
+ Coverage   82.94%   83.00%   +0.06%     
==========================================
  Files         124      124              
  Lines        6185     6185              
==========================================
+ Hits         5130     5134       +4     
+ Misses       1055     1051       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

let package = Package(
name: "hummingbird",
platforms: [.macOS(.v14), .iOS(.v17), .macCatalyst(.v17), .tvOS(.v17), .visionOS(.v1)],
platforms: [.macOS(.v11), .iOS(.v15), .macCatalyst(.v15), .tvOS(.v15), .visionOS(.v1)],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The equivalent versions of macOS and iOS are three versions apart eg 11 and 14, 12 and 15. Which pair of versions should it be?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've used the earliest versions of each platform that Xcode allowed me to select for minimum deployment version in the project settings. If you want I could raise macOS to 12.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't you set iOS 14?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xcode doesn't have that option in its drop down. All devices that run iOS 14 also run iOS 15, so there shouldn't be a reason for someone to run iOS 14.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't mean those users have iOS 15 installed. You are editing Package.swift with a text editor yeah? You can type whatever you want. I'd prefer to stick to the three versions apart and upping the requirement for macOS doesn't seem very sensible.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package.swift may be editable in a text editor, but someone integrating Hummingbird into an iOS app will very likely be doing that in Xcode, and there's no option in Xcode for them to select a version iOS 14 as minimum.

I'm assuming the lowest version selectable in Xcode would be the minimum that Apple are willing to support, so is this 3-version difference relevant in that case?

… on iOS 15 and 16

Code review changes – applied version restrictions to ApplicationProtocol and Application types.
Copy link
Member

@adam-fowler adam-fowler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PerformanceTest target requires macOS 14 etc
Also HummingbirdTesting needs @available(macOS 14, iOS 17, tvOS 17, *) wherever ApplicationProtocol is referenced
And finally you need to run swift format on the code

swift format format -ir Sources

After that we should be good


struct Object: ResponseEncodable {
let message: String
if #available(macOS 13, iOS 16, tvOS 16, *) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if #available(macOS 13, iOS 16, tvOS 16, *) {
if #available(macOS 14, iOS 17, tvOS 17, *) {


// run app
try await app.runService()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
} else {
fatalError("Hummingbird requires macOS 14, iOS 17 or tvOS 17")
}

}

/// Extends `ApplicationProtocol` to support testing of applications
@available(macOS 13, iOS 16, tvOS 16, *)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@available(macOS 13, iOS 16, tvOS 16, *)
@available(macOS 14, iOS 17, tvOS 17, *)

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