Skip to content

Fix Xcode 26 Google sign-in build break + CI guard#4937

Merged
shai-almog merged 1 commit into
masterfrom
fix-google-signin-setter-args
May 13, 2026
Merged

Fix Xcode 26 Google sign-in build break + CI guard#4937
shai-almog merged 1 commit into
masterfrom
fix-google-signin-setter-args

Conversation

@shai-almog
Copy link
Copy Markdown
Collaborator

Summary

  • Customer reported a Google sign-in iOS build failure on Xcode 26 / iOS SDK 26.2 and suspected a CocoaPods regression. The pods install cleanly (AppAuth 1.7.6, GTMAppAuth 1.3.1, GoogleSignIn 5.0.2); the real failure is in hand-written Ports/iOSPort/nativeSources/GoogleConnectImpl.m:

    GoogleConnectImpl.m:73: error: too many arguments to function call, expected 2, have 3
      set_field_com_codename1_social_GoogleImpl_loginMessage(
          CN1_THREAD_GET_STATE_PASS_ARG fromNSString(... ), googleLoginCallback);
    

    The ParparVM translator's instance-field setters take (value, instance)vm/ByteCodeTranslator/.../ByteCodeClass.java:909 literally comments "Instance field setters don't use thread context directly." But the call sites prepend CN1_THREAD_GET_STATE_PASS_ARG (which expands to getThreadLocalData(),), so the call passes 3 args. The bug has been latent since commit 922f946 (2020); older clang accepted it with a warning, Xcode 26's clang rejects it as a hard error.

  • Removed CN1_THREAD_GET_STATE_PASS_ARG/threadStateData from the 10 set_field_* call sites in GoogleConnectImpl.m and the 2 identical-pattern call sites in FacebookImpl.m.

  • Extended .github/workflows/ios-packaging.yml to set ios.gplus.clientId, which flips on INCLUDE_GOOGLE_CONNECT + GOOGLE_SIGNIN and pulls in the GoogleSignIn pod. From now on, every PR that touches Ports/iOSPort/** actually compiles GoogleConnectImpl.m under Xcode 26 — so any future signature drift between hand-written .m files and translator-generated set_field_* headers fails CI immediately.

Test plan

  • CI: ios-packaging workflow runs build-ios-app.sh and xcodebuild on a project with Google sign-in enabled; the new client-ID arg should cause GoogleConnectImpl.m to compile (would have caught this bug pre-fix)
  • Customer rebuild on Xcode 26 with ios.pods=AppAuth + Google sign-in succeeds
  • Existing AFNetworking / SPM coexistence path still green
  • Quick local check (optional): generate an ios-source build with ios.gplus.clientId=... set, open in Xcode 26, confirm GoogleConnectImpl.m compiles

🤖 Generated with Claude Code

GoogleConnectImpl.m and FacebookImpl.m pass `CN1_THREAD_GET_STATE_PASS_ARG`
(or `threadStateData`) as the first argument to `set_field_com_codename1_social_*`
setters, but those ParparVM-generated instance-field setters take only
`(value, instance)` -- the translator's `ByteCodeClass` emit comment even
spells this out: "Instance field setters don't use thread context directly."

The extra arg has been there since the GoogleSignIn 5.0 migration in 2020;
older clang accepted it with a warning, but Xcode 26's clang now rejects
it as `error: too many arguments to function call, expected 2, have 3`,
breaking every Google sign-in iOS source build (and every Facebook one
with NEW_CODENAME_ONE_VM).

Also extends the ios-packaging CI to enable Google sign-in via
`ios.gplus.clientId`, so GoogleConnectImpl.m is exercised under Xcode 26
on every PR -- the same class of signature drift would otherwise stay
invisible until a customer turns the feature on.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ByteCodeTranslator: 0 findings (no issues)
    • android: 0 findings (no issues)
    • codenameone-maven-plugin: 0 findings (no issues)
    • core-unittests: 0 findings (no issues)
    • ios: 0 findings (no issues)
  • PMD: 0 findings (no issues) [Report archive]
  • Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 13, 2026

Compared 106 screenshots: 106 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 304 seconds

Build and Run Timing

Metric Duration
Simulator Boot 103000 ms
Simulator Boot (Run) 1000 ms
App Install 20000 ms
App Launch 8000 ms
Test Execution 321000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 1873.000 ms
Base64 CN1 encode 1917.000 ms
Base64 encode ratio (CN1/native) 1.023x (2.3% slower)
Base64 native decode 1092.000 ms
Base64 CN1 decode 1211.000 ms
Base64 decode ratio (CN1/native) 1.109x (10.9% slower)
Base64 SIMD encode 484.000 ms
Base64 encode ratio (SIMD/native) 0.258x (74.2% faster)
Base64 encode ratio (SIMD/CN1) 0.252x (74.8% faster)
Base64 SIMD decode 524.000 ms
Base64 decode ratio (SIMD/native) 0.480x (52.0% faster)
Base64 decode ratio (SIMD/CN1) 0.433x (56.7% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 88.000 ms
Image createMask (SIMD on) 13.000 ms
Image createMask ratio (SIMD on/off) 0.148x (85.2% faster)
Image applyMask (SIMD off) 181.000 ms
Image applyMask (SIMD on) 69.000 ms
Image applyMask ratio (SIMD on/off) 0.381x (61.9% faster)
Image modifyAlpha (SIMD off) 163.000 ms
Image modifyAlpha (SIMD on) 114.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.699x (30.1% faster)
Image modifyAlpha removeColor (SIMD off) 178.000 ms
Image modifyAlpha removeColor (SIMD on) 84.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.472x (52.8% faster)
Image PNG encode (SIMD off) 1243.000 ms
Image PNG encode (SIMD on) 1146.000 ms
Image PNG encode ratio (SIMD on/off) 0.922x (7.8% faster)
Image JPEG encode 763.000 ms

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 13, 2026

Compared 106 screenshots: 106 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 336 seconds

Build and Run Timing

Metric Duration
Simulator Boot 109000 ms
Simulator Boot (Run) 1000 ms
App Install 19000 ms
App Launch 12000 ms
Test Execution 289000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 2328.000 ms
Base64 CN1 encode 1707.000 ms
Base64 encode ratio (CN1/native) 0.733x (26.7% faster)
Base64 native decode 1031.000 ms
Base64 CN1 decode 1437.000 ms
Base64 decode ratio (CN1/native) 1.394x (39.4% slower)
Base64 SIMD encode 548.000 ms
Base64 encode ratio (SIMD/native) 0.235x (76.5% faster)
Base64 encode ratio (SIMD/CN1) 0.321x (67.9% faster)
Base64 SIMD decode 730.000 ms
Base64 decode ratio (SIMD/native) 0.708x (29.2% faster)
Base64 decode ratio (SIMD/CN1) 0.508x (49.2% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 74.000 ms
Image createMask (SIMD on) 10.000 ms
Image createMask ratio (SIMD on/off) 0.135x (86.5% faster)
Image applyMask (SIMD off) 210.000 ms
Image applyMask (SIMD on) 155.000 ms
Image applyMask ratio (SIMD on/off) 0.738x (26.2% faster)
Image modifyAlpha (SIMD off) 204.000 ms
Image modifyAlpha (SIMD on) 153.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.750x (25.0% faster)
Image modifyAlpha removeColor (SIMD off) 303.000 ms
Image modifyAlpha removeColor (SIMD on) 108.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.356x (64.4% faster)
Image PNG encode (SIMD off) 2314.000 ms
Image PNG encode (SIMD on) 1546.000 ms
Image PNG encode ratio (SIMD on/off) 0.668x (33.2% faster)
Image JPEG encode 1031.000 ms

@shai-almog shai-almog merged commit 14a160a into master May 13, 2026
16 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.

1 participant