Skip to content

Specify Swift names for GIDClaim methods - #627

Merged
w-goog merged 2 commits into
mainfrom
feature/gidclaim-swift-names
Aug 28, 2026
Merged

w-goog merged 2 commits into
mainfrom
feature/gidclaim-swift-names

Conversation

@w-goog

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

Copy link
Copy Markdown
Contributor

The Obj-C method - (instancetype)AMRClaim; gets rewritten to GIDClaim.amr() by Swift's Obj-C importer. This is ~fine, but a) not discoverable by reading the file and b) could plausibly change if the Obj-C importer changes its behaviour. That is not very nice, so, this PR pins the names.

(Does this seem like a silly thing to spend time on? Yes. Did it already bite once and require a developer docs update? Also yes)

@w-goog
w-goog requested a review from AkshatG6 August 27, 2026 01:13
@w-goog

w-goog commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Here is the pre- post- diff of the API, to ensure that it is identical:

$ xcrun swift-api-digester -dump-sdk -module GoogleSignIn -I before -I $FETCHER_HEADERS -o before.json …
$ xcrun swift-api-digester -dump-sdk -module GoogleSignIn -I after -I $FETCHER_HEADERS -o after.json …

PRE (origin/main, 0 annotations):
authTimeClaim -> authTime()
essentialAuthTimeClaim -> essentialAuthTime()
AMRClaim -> amr()
essentialAMRClaim -> essentialAMR()

POST (branch, 4 annotations):
authTimeClaim -> authTime()
essentialAuthTimeClaim -> essentialAuthTime()
AMRClaim -> amr()
essentialAMRClaim -> essentialAMR()

@w-goog
w-goog force-pushed the feature/gidclaim-swift-names branch from 29dc70c to 013a799 Compare August 27, 2026 23:06
@w-goog
w-goog merged commit 47f7be2 into main Aug 28, 2026
21 checks passed
@w-goog
w-goog deleted the feature/gidclaim-swift-names branch August 28, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants