Skip to content

iOS: honor ios.teamId in locally-generated Xcode projects (#4941)#4945

Merged
shai-almog merged 1 commit into
masterfrom
ios-teamid-local-xcodeproj
May 14, 2026
Merged

iOS: honor ios.teamId in locally-generated Xcode projects (#4941)#4945
shai-almog merged 1 commit into
masterfrom
ios-teamid-local-xcodeproj

Conversation

@shai-almog
Copy link
Copy Markdown
Collaborator

Summary

  • The ios.teamId build hint is read by the cloud BuildDaemon (where it lands in the embedded *.mobileprovision plist), but the local Xcode project generator (maven/codenameone-maven-plugin/.../IPhoneBuilder.java, build target ios-source and local-*) never consulted it. The pbxproj template in vm/ByteCodeTranslator/src/template/template.xcodeproj/project.pbxproj has no DEVELOPMENT_TEAM either, so every locally generated project opened in Xcode with Team: None — exactly the symptom in Build hint ios.teamId is not used in Xcode #4941.
  • Inject DEVELOPMENT_TEAM = <id>; into the two project-level XCBuildConfiguration blocks (anchored next to SDKROOT = iphoneos;), so the value is inherited by every target. Resolution mirrors the cloud builder's precedence: ios.debug.teamId / ios.release.teamId falling back to ios.teamId, applied to the matching name = Debug; / name = Release; block.
  • Idempotent (skips blocks that already declare DEVELOPMENT_TEAM) and validates input is [A-Za-z0-9]+ so a malformed hint can't corrupt the pbxproj.

Test plan

  • mvn -pl codenameone-maven-plugin -DskipTests -Plocal-dev-javase compile → BUILD SUCCESS.
  • Standalone harness against the real template.xcodeproj/project.pbxproj:
    • split debug/release values → 1 occurrence each in the right blocks
    • second invocation on already-injected file → still 2 (idempotent)
    • invalid input (bad-id!) → logged + skipped, 0 injections
    • empty input → no I/O
    • single ios.teamId=2K4UGY23XQ → both Debug and Release configs get it
  • End-to-end: run mvn cn1:buildIosXcodeProject on a project with codename1.arg.ios.teamId=<your-id> set, open the resulting .xcodeproj in Xcode, confirm Signing & Capabilities shows the team for the app target.

Fixes #4941

🤖 Generated with Claude Code

The build hint was wired only into the cloud builder's provisioning-profile
plist, so locally generated projects always opened with Team: None. Inject
DEVELOPMENT_TEAM into the project-level Debug/Release XCBuildConfiguration
blocks, resolving ios.debug.teamId / ios.release.teamId with fallback to
ios.teamId — matching the cloud builder's precedence.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 14, 2026

Compared 16 screenshots: 16 matched.
✅ JavaScript-port screenshot tests passed.

@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 14, 2026

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

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 62000 ms
Simulator Boot (Run) 1000 ms
App Install 12000 ms
App Launch 4000 ms
Test Execution 239000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 1162.000 ms
Base64 CN1 encode 1289.000 ms
Base64 encode ratio (CN1/native) 1.109x (10.9% slower)
Base64 native decode 764.000 ms
Base64 CN1 decode 1068.000 ms
Base64 decode ratio (CN1/native) 1.398x (39.8% slower)
Base64 SIMD encode 508.000 ms
Base64 encode ratio (SIMD/native) 0.437x (56.3% faster)
Base64 encode ratio (SIMD/CN1) 0.394x (60.6% faster)
Base64 SIMD decode 472.000 ms
Base64 decode ratio (SIMD/native) 0.618x (38.2% faster)
Base64 decode ratio (SIMD/CN1) 0.442x (55.8% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 56.000 ms
Image createMask (SIMD on) 9.000 ms
Image createMask ratio (SIMD on/off) 0.161x (83.9% faster)
Image applyMask (SIMD off) 118.000 ms
Image applyMask (SIMD on) 52.000 ms
Image applyMask ratio (SIMD on/off) 0.441x (55.9% faster)
Image modifyAlpha (SIMD off) 115.000 ms
Image modifyAlpha (SIMD on) 57.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.496x (50.4% faster)
Image modifyAlpha removeColor (SIMD off) 139.000 ms
Image modifyAlpha removeColor (SIMD on) 60.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.432x (56.8% faster)
Image PNG encode (SIMD off) 917.000 ms
Image PNG encode (SIMD on) 903.000 ms
Image PNG encode ratio (SIMD on/off) 0.985x (1.5% faster)
Image JPEG encode 513.000 ms

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 14, 2026

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

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 68000 ms
Simulator Boot (Run) 0 ms
App Install 15000 ms
App Launch 8000 ms
Test Execution 291000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 1565.000 ms
Base64 CN1 encode 1321.000 ms
Base64 encode ratio (CN1/native) 0.844x (15.6% faster)
Base64 native decode 852.000 ms
Base64 CN1 decode 1540.000 ms
Base64 decode ratio (CN1/native) 1.808x (80.8% slower)
Base64 SIMD encode 453.000 ms
Base64 encode ratio (SIMD/native) 0.289x (71.1% faster)
Base64 encode ratio (SIMD/CN1) 0.343x (65.7% faster)
Base64 SIMD decode 741.000 ms
Base64 decode ratio (SIMD/native) 0.870x (13.0% faster)
Base64 decode ratio (SIMD/CN1) 0.481x (51.9% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 99.000 ms
Image createMask (SIMD on) 28.000 ms
Image createMask ratio (SIMD on/off) 0.283x (71.7% faster)
Image applyMask (SIMD off) 197.000 ms
Image applyMask (SIMD on) 60.000 ms
Image applyMask ratio (SIMD on/off) 0.305x (69.5% faster)
Image modifyAlpha (SIMD off) 123.000 ms
Image modifyAlpha (SIMD on) 76.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.618x (38.2% faster)
Image modifyAlpha removeColor (SIMD off) 353.000 ms
Image modifyAlpha removeColor (SIMD on) 132.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.374x (62.6% faster)
Image PNG encode (SIMD off) 1052.000 ms
Image PNG encode (SIMD on) 787.000 ms
Image PNG encode ratio (SIMD on/off) 0.748x (25.2% faster)
Image JPEG encode 762.000 ms

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 14, 2026

Compared 106 screenshots: 106 matched.

Native Android coverage

  • 📊 Line coverage: 11.44% (6330/55313 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 9.09% (31317/344567), branch 3.99% (1307/32768), complexity 5.05% (1586/31420), method 8.77% (1290/14701), class 14.81% (295/1992)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 11.44% (6330/55313 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 9.09% (31317/344567), branch 3.99% (1307/32768), complexity 5.05% (1586/31420), method 8.77% (1290/14701), class 14.81% (295/1992)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 893.000 ms
Base64 CN1 encode 188.000 ms
Base64 encode ratio (CN1/native) 0.211x (78.9% faster)
Base64 native decode 748.000 ms
Base64 CN1 decode 169.000 ms
Base64 decode ratio (CN1/native) 0.226x (77.4% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog shai-almog merged commit 9fe5eb6 into master May 14, 2026
22 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.

Build hint ios.teamId is not used in Xcode

1 participant