[minor][feature]: Import bridging header according to where common-core is a submodule#1678
Open
[minor][feature]: Import bridging header according to where common-core is a submodule#1678
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a common header to abstract which generated Swift-to-Objective-C header (*-Swift.h) should be imported when common-core is consumed as a submodule (IdentityCore standalone vs inside MSAL/oneAuth), and wires JWE decryption ObjC code to use it.
Changes:
- Introduce
MSIDSwiftBridgingHeader.hto select the correct*-Swift.himport via build macros. - Update JWE decryption Objective-C code to import the new bridging header and call the Swift decryptor via a new ObjC selector.
- Expose Swift classes to Objective-C (and tweak Xcode build settings) to ensure Swift implementations are reachable from ObjC.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| changelog.txt | Adds an entry describing the new bridging-header selection behavior. |
| IdentityCore/src/util/MSIDConcatKdfProvider.swift | Adds ObjC exposure annotation to make the Swift KDF provider usable from ObjC. |
| IdentityCore/src/MSIDSwiftBridgingHeader.h | New shared header that conditionally imports the correct generated *-Swift.h. |
| IdentityCore/src/JWEResponse/MSIDJweResponse+EcdhAesGcm.m | Switches to the shared bridging header and updates the Swift decryptor call-site. |
| IdentityCore/src/JWEResponse/MSIDAesGcmDecryptor.swift | Adds ObjC exposure and a custom ObjC selector for the decrypt method. |
| IdentityCore/src/IdentityCore_Internal.h | Removes the MSID_IDENTITYCORE_SWIFT_AVAILABLE macro block. |
| IdentityCore/IdentityCore.xcodeproj/project.pbxproj | Registers the new header and enables installing the generated ObjC header for iOS configs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
josephpab
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Title Format
Required Format:
[Keyword1] [Keyword2]: Descriptionmajor,minor, orpatch(case-insensitive)feature,bugfix,engg, ortests(case-insensitive)Examples:
[MAJOR] [Feature]: new API[minor] [bugfix]: fix crash[PATCH][tests]:add coverageProposed changes
Xcode generates bridging header for swift classes to be available in Objective C classes in derived data. The obj C classes must import this header when using the swift classes. If common-core is a submodule in MSAL, it should import MSAL-Swift.h and if in oneAuth, it should import oneAuth-Swift.h
This PR adds a header that makes that determination during pod creation in a common header.
Type of change
Risk
Additional information