Skip to content

[iOS] SFUserAccountManager.m calls internal Swift method invisible to framework/CocoaPods consumers - #4141

Merged
JohnsonEricAtSalesforce merged 1 commit into
forcedotcom:devfrom
JohnsonEricAtSalesforce:bugfix/ios-sfuseraccountmanager-m-calls-internal-swift-method-invisible-to-framework-cocoapods-consumers
Aug 24, 2026
Merged

[iOS] SFUserAccountManager.m calls internal Swift method invisible to framework/CocoaPods consumers#4141
JohnsonEricAtSalesforce merged 1 commit into
forcedotcom:devfrom
JohnsonEricAtSalesforce:bugfix/ios-sfuseraccountmanager-m-calls-internal-swift-method-invisible-to-framework-cocoapods-consumers

Conversation

@JohnsonEricAtSalesforce

@JohnsonEricAtSalesforce JohnsonEricAtSalesforce commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

SFUserAccountManager.m calls consumeBrowserAuthenticationSuppressionForSceneId:, but the Swift method was @objc internal. Same-module CI builds don't notice — internal is visible within the module. Framework/CocoaPods consumers build SalesforceSDKCore as a separate module, so the generated header strips the method and the ObjC call site fails to compile.

Fix: internalpublic on that one method. No behavior change. Sibling suppression methods stay internal — nothing outside the module calls them.

Test plan

  • Same-module SalesforceSDKCore build (regression check)
  • CocoaPods-consumer build (React Native template via use_frameworks!) — original compile error gone
  • Independent end-to-end verification against a generated template app

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

SFUserAccountManager.m calls this Swift method via ObjC, but it was
declared @objc internal. Internal Swift symbols are stripped from the
generated -Swift.h header once SalesforceSDKCore is consumed as a
framework (e.g. via CocoaPods), so the ObjC call site fails to resolve
for any app built via generated templates, even though same-module
builds succeed.
@github-actions

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

@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.41%. Comparing base (1c2dd30) to head (ef2fdc3).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #4141      +/-   ##
==========================================
- Coverage   71.77%   67.41%   -4.36%     
==========================================
  Files         254      254              
  Lines       22804    22804              
==========================================
- Hits        16367    15374     -993     
- Misses       6437     7430     +993     
Components Coverage Δ
Analytics 70.78% <ø> (ø)
Common 70.79% <ø> (-0.19%) ⬇️
Core 61.03% <100.00%> (-6.54%) ⬇️
SmartStore 73.45% <ø> (ø)
MobileSync 88.84% <ø> (ø)
Files with missing lines Coverage Δ
...ation/BiometricAuthenticationManagerInternal.swift 79.39% <100.00%> (ø)

... and 34 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
TestsPassedSkippedFailed ❌️
AuthFlowTester UI Test Results all1 ran1 ❌
TestResult
AuthFlowTester UI Test Results all
AuthFlowTesterUITests.xctest
LegacyLoginTests.testCAOpaque_DefaultScopes_WebServerFlow()❌ failure

@JohnsonEricAtSalesforce

Copy link
Copy Markdown
Contributor Author

The ui-tests-pr (^18) / test-ui failure (LegacyLoginTests.testCAOpaque_DefaultScopes_WebServerFlow) is unrelated to this change — it's a pre-existing, PR-independent flake in the UI test harness.

Confirmed by checking recent CI runs on unrelated branches in the same time window (dpop-jkt-pool-servers, ios-setversion-rc-support, biometric-with-advanced-auth, dpop-default-on, feature/dpop-upgrade-api-and-tests) — all show the same ui-tests-pr job failing, including branches that can't plausibly regress this test. This PR's change (a one-line Swift access-level fix) doesn't touch login flow code.

All other required checks pass, including CodeCov (100% patch coverage on the touched file).

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

@JohnsonEricAtSalesforce
JohnsonEricAtSalesforce merged commit a35bdce into forcedotcom:dev Aug 24, 2026
23 of 24 checks passed
@JohnsonEricAtSalesforce
JohnsonEricAtSalesforce deleted the bugfix/ios-sfuseraccountmanager-m-calls-internal-swift-method-invisible-to-framework-cocoapods-consumers branch August 24, 2026 16:44
Comment on lines 73 to +76
/// Consumes (clears) suppression for `sceneId`, returning whether it was armed. The gate calls
/// this once per browser attempt so suppression is one-shot per scene and one scene's consume
/// can't drain another's.
@objc internal func consumeBrowserAuthenticationSuppression(forSceneId sceneId: String) -> Bool {
@objc public func consumeBrowserAuthenticationSuppression(forSceneId sceneId: String) -> Bool {

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.

NIT: It may have been good to callout in the comment that this function is not intended to be public API.

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.

3 participants