Skip to content

Bump minimum versions for Xcode 27 support - #972

Open
w-goog wants to merge 13 commits into
masterfrom
chore/xcode-27-deployment-targets
Open

Bump minimum versions for Xcode 27 support#972
w-goog wants to merge 13 commits into
masterfrom
chore/xcode-27-deployment-targets

Conversation

@w-goog

@w-goog w-goog commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

This PR updates all target minimums + SPM tools version to the minimums required by Xcode 27. It does not do any source cleanup. I've tested with local builds, as Xcode 27 on Github Actions is still in preview.

Xcode 27 will be releasing soon, and we're already doing a major version bump for the new required Swift interface - so, might as well do this version bump too.

Several tvOS tests needed updating, in two groups:

  • ~10 tests with an outdated guard, now removed.
  • 3 tests using an old API that did not throw. The new API throws, so an error is passed in. No other changes are made to the test, though it may be prudent in a follow-up to assert the error is nil for more helpful test failure messages.

@w-goog
w-goog requested review from mdmathias and removed request for mdmathias August 12, 2026 17:59
The raised deployment targets (iOS 15, macOS 12, tvOS 15, watchOS 9) put
+archivedDataWithRootObject: and +unarchiveObjectWithData: past their
deprecation points on macOS and tvOS, and the project builds with -Werror.

The @available(iOS 12.0, macOS 10.13, tvOS 11.0, watchOS 4.0) guards in the
NSSecureCoding tests are now always true, so the legacy fallback branches they
guarded are dead code; remove the guards and the branches. The AppAuthTV tests
called the legacy APIs unconditionally, so convert those call sites to
+archivedDataWithRootObject:requiringSecureCoding:error: and
+unarchivedObjectOfClass:fromData:error:.
@w-goog
w-goog requested a review from mdmathias August 12, 2026 18:31
requiringSecureCoding:YES
error:&error];
requestCopy = [NSKeyedUnarchiver unarchivedObjectOfClass:[OIDAuthorizationRequest class]
fromData:data

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: align colons please

@@ -206,16 +206,10 @@ - (void)testNonCompliantNSCodingNSErrors {
[authstate updateWithAuthorizationError:oauthError];
NSError *error;
NSData *data;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can this now just be:

NSData *data = [NSKeyedArchiver archivedDataWithRootObject:authstate
                               requiringSecureCoding:YES
                                               error:&error];

(with correct alignment lol)

Comment on lines 100 to 102
OIDEndSessionRequest *requestCopy;
NSError *error;
NSData *data;

@brnnmrls brnnmrls Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

similar comment as above, can we just set these values when we declare them please?

this comment applies to similar situations below in the other tests

data = [NSKeyedArchiver archivedDataWithRootObject:authstate
requiringSecureCoding:YES
error:&error];
XCTAssertNoThrow(data, @"");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This isn't your code, and we can probably investigate this in a different PR, but I'm wondering if the "new" method would ever even throw and whether we should be check for the error param as well in these asserts.

@brnnmrls brnnmrls left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved as long as the above nits are resolved, thanks! Great job!

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.

2 participants