Skip to content

@W-24627009 fix: Refresh iOS device hardware identification - #4191

Merged
wmathurin merged 1 commit into
forcedotcom:devfrom
wmathurin:update-device-hardware
Oct 22, 2026
Merged

wmathurin merged 1 commit into
forcedotcom:devfrom
wmathurin:update-device-hardware

Conversation

@wmathurin

Copy link
Copy Markdown
Contributor

Correct hardware identification for supported iPhones and iPads. M2 iPad Pro identifiers previously returned the opposite screen size, the first 11-inch iPad Pro had no display-name case, and several recent iPads had misleading names. Add 23 verified identifiers for released devices through iPhone 18 Pro/Pro Max, iPad Air M4, iPad Pro M5, and iPad (A16).

Correct Neural Engine detection for known A12/A12X-and-newer devices, including models that previously fell through to NO. Keep the A10-based iPad (7th generation), unknown models, simulators, and Apple TV behavior unchanged. Remove the stale duplicate identifier table from the file's introductory comment.

Public API: append 15 model enum cases and name constants while preserving all 64 existing enum values and symbols. Existing device display names are corrected to Apple product naming. The Xcode project change only registers the new Swift test file.

Validation:

  • Regression tests reproduced 105 assertion failures against the unchanged implementation.
  • Five hardware tests exercise all 108 identifiers, existing mapped enum values, unknown-device fallbacks, and simulator behavior.
  • Final SalesforceSDKCore build and all five hardware tests pass on an iOS 18.6 simulator.
  • MobileSync and its SmartStore/core dependencies build successfully for the generic iOS Simulator destination.
  • A full-suite attempt encountered expired access/refresh credentials and REST setup crashes/timeouts. A broader selection excluding the live REST/auth classes ran 970 tests: 968 passed; the account setup crash also reproduced on the unchanged base (964/965 passed, excluding the five new hardware tests). The additional one-second OAuth migration callback failure passed on both base and final builds when run on the same simulator; it remains sensitive to simulator state/timing.
  • git diff --check passes.

Identifier audit: DeviceKit 19528aa, cross-checked against Apple specifications. Announced but unshipped devices are excluded.

Resolves W-24627009. Fixes #4189.

Implemented and validated by Codex on behalf of @wmathurin.

@github-actions

Copy link
Copy Markdown
TestsPassedSkippedFailed ❌️
AuthFlowTester UI Test Results all1 ran1 ❌
TestResult
AuthFlowTester UI Test Results all
AuthFlowTesterUITests.xctest
LegacyLoginTests.testCAOpaque_DefaultScopes_WebServerFlow()❌ failure

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.34%. Comparing base (01930a9) to head (2cf5263).
⚠️ Report is 4 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #4191      +/-   ##
==========================================
- Coverage   72.92%   71.34%   -1.58%     
==========================================
  Files         254      254              
  Lines       23531    23608      +77     
==========================================
- Hits        17160    16844     -316     
- Misses       6371     6764     +393     
Components Coverage Δ
Analytics 70.78% <ø> (ø)
Common 71.20% <ø> (ø)
Core 67.11% <100.00%> (-2.32%) ⬇️
SmartStore 73.45% <ø> (ø)
MobileSync 88.99% <ø> (ø)
Files with missing lines Coverage Δ
...sforceSDKCore/Classes/Common/UIDevice+SFHardware.h 94.87% <100.00%> (+94.87%) ⬆️
...sforceSDKCore/Classes/Common/UIDevice+SFHardware.m 80.91% <100.00%> (+76.09%) ⬆️

... and 30 files with indirect coverage changes

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

@github-actions

Copy link
Copy Markdown
TestsPassed ✅SkippedFailed
SalesforceSDKCore iOS ^18 Test Results1116 ran1116 ✅
TestResult
No test annotations available

@JohnsonEricAtSalesforce JohnsonEricAtSalesforce left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review of PR 4191 at 2cf5263e10ae9b3be175c5b995f9c8e3718d13d5.

Requested Changes

None.

Open Questions

None.

Verdict: Recommend approve on code merits. No blocking findings after the detailed final pass.

Verification: independently inspected the Core CI artifact (1,116 passed, no failures/skips) and ran all five hardware tests at this head on a dedicated iOS 18.6 simulator. Local coverage exercised all 119 changed executable implementation lines. Preserved enum values and device mappings were independently audited.

Limits: no physical-device validation or local full live-org suite run. The range diff check reports trailing whitespace in UIDeviceHardwareTests.swift lines 3 and 14, despite the PR’s clean-check claim; this is formatting only.

This response was generated by an AI agent on behalf of @JohnsonEricAtSalesforce.

@wmathurin
wmathurin merged commit 9b1f546 into forcedotcom:dev Oct 22, 2026
23 of 24 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.

UIDevice+SFHardware.m containes incorrect value

2 participants