[iOS] SFUserAccountManager.m calls internal Swift method invisible to framework/CocoaPods consumers - #4141
Conversation
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.
|
||||||||||||||
Codecov Report✅ All modified and coverable lines are covered by tests. 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
🚀 New features to boost your workflow:
|
|
||||||||||||||||||
|
The Confirmed by checking recent CI runs on unrelated branches in the same time window ( 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. |
a35bdce
into
forcedotcom:dev
| /// 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 { |
There was a problem hiding this comment.
NIT: It may have been good to callout in the comment that this function is not intended to be public API.
Summary
SFUserAccountManager.mcallsconsumeBrowserAuthenticationSuppressionForSceneId:, but the Swift method was@objc internal. Same-module CI builds don't notice —internalis visible within the module. Framework/CocoaPods consumers buildSalesforceSDKCoreas a separate module, so the generated header strips the method and the ObjC call site fails to compile.Fix:
internal→publicon that one method. No behavior change. Sibling suppression methods stayinternal— nothing outside the module calls them.Test plan
SalesforceSDKCorebuild (regression check)use_frameworks!) — original compile error goneThis response was generated by an AI agent on behalf of @JohnsonEricAtSalesforce.