Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New macOS 13 runners default to iOS 17 beta simulators for Xcode 14.3.1 CI jobs. #8023

Closed
3 of 10 tasks
mluisbrown opened this issue Aug 2, 2023 · 41 comments
Closed
3 of 10 tasks

Comments

@mluisbrown
Copy link

mluisbrown commented Aug 2, 2023

Description

The latest macOS 13 runners enable the iOS 17 beta simulators that come with Xcode 15.

This means that any Xcode test action which specifies the device name only (without an OS specifier) will run using the iOS 17 simulator by default instead of the latest iOS 16 simulator. This will cause many CI actions to fail as code has not yet been adapted for iOS 17.

Moreover, it is a failure that is not obvious and very hard to debug, as it's completely unexpected that an Xcode 14.3.1 CI job would use beta iOS 17 simulators from Xcode 15.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Current runner version: '2.307.1'
Operating System
macOS
13.5
22G74
Runner Image
Image: macos-13
Version: 20230801.2
Included Software: https://github.com/actions/runner-images/blob/macos-13/20230801.2/images/macos/macos-13-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macos-13%2F20230801.2
Runner Image Provisioner
2.0.264.1

Unfortunately I cannot include a link to a build as it's a private repo.

Is it regression?

20230611.2

Expected behavior

iOS 17 beta simulators should only be selected if explicitly specified, instead of by default.

Actual behavior

iOS 17 beta simulators are selected by default, if no other OS specifier is used.

Repro steps

Run any Xcode CI job which selects a test device (eg using fastlane run_tests and selecting iPhone SE (3rd generation) as the test device.

For example, in our project we have the following Fastlane lane which we use for CI:

lane :tests do
    run_tests(project: "<redacted>.xcodeproj",
        scheme: "<redacted>",
        devices: ["iPhone SE (3rd generation)"],
        result_bundle: true
    )
end

This is now selecting an iOS 17 version of the simulator when previously it was selecting an iOS 16.4 simulator. The potential workaround is to specify the device as "iPhone SE (3rd generation) (16.4)" to fix the iOS version at 16.4, but that should not be necessary.

@mluisbrown mluisbrown changed the title New macOS-13 runners break CI for scripts which don't specify the OS version New macOS 13 runners break CI for scripts which don't specify iOS Simulator OS version Aug 2, 2023
@mluisbrown mluisbrown changed the title New macOS 13 runners break CI for scripts which don't specify iOS Simulator OS version New macOS 13 runners default to iOS 17 beta simulators for Xcode 14.3.1 CI jobs. Aug 2, 2023
@joshuapoq
Copy link

joshuapoq commented Aug 2, 2023

This probably explains why our builds are now reaching an hour and timing out. It's taking from 2 to 11 minutes of time between each test bundle for our frameworks (24 test bundles). It was previously taking between 3 and 15 seconds.

@mluisbrown
Copy link
Author

I have been able to confirm that adding the OS version in the device string, eg: "iPhone SE (3rd generation) (16.4)" is a workaround for this problem.

@ilia-shipitsin
Copy link
Contributor

@mluisbrown , we added simulators for XCode-15 yesterday. MacOs-13 currently is shipped with simulators for XCode-14 and XCode-15 as well. Whichever is "default", I'm afraid someone will complain.

I'm not sure what would be an approach to make everyone happy, some people may want to be "iOS 17" as default, other "iOS 16.4".

Maybe, the best approach would be to specify explicitly, what do you think ?

@Vyazovoy
Copy link

Vyazovoy commented Aug 2, 2023

I think this is the problem:
Screenshot 2023-08-02 at 10 34 35

iOS 17 simulators hava to be installed only for Xcode 15. So if it is true that the default selected Xcode version is 14.2 then it should not see any iOS 17 simulators. The runtime should be marked as "unavailable". You can see that if you open Xcode 14.2 settings. So it is definitely a regression.

@mluisbrown
Copy link
Author

mluisbrown commented Aug 2, 2023

@ilia-shipitsin as @Vyazovoy points out, the defaults for Xcode 14.3.1 should be the iOS 16 runtimes and the defaults for Xcode 15 should be the iOS 17 runtimes.
It makes no sense at all to use the iOS 17 runtimes with Xcode 14.3.1.

It's a regression as absolutely no one expects that Xcode 14.x would have iOS 17 runtimes installed.

@Baza207
Copy link

Baza207 commented Aug 2, 2023

This does seem to be a regression, but it feels like it's maybe an Apple/Xcode issue. You can actually use the iOS 17 sim from Xcode 14.3.1, I tried it locally and it works fine. However because iOS 17 is still beta, it's buggy. 🙃 It's a bad default and should be fixed, but we should probably submit Apple feedbacks for it. Also, I could be wrong but I don't think it's possible to install sims for just one version of Xcode anymore. Locally for me at least they seem to sync between 14 and 15 of Xcode (add/delete in one place, it's available/gone from the other) and I'm guessing having a macOS-13 agent per Xcode major version would also not be on anyones list of requests.

The above mentioned work-around of adding (16.4) to the end of the sim name didn't work, but checking out the docs you can do something like iPhone 14,OS=16.4 and it seems to be working for us now. (Converts to -destination platform=iOS Simulator,name=iPhone 14,OS=16.4 for xcodebuild.)
Look for destinationSimulators here.

Really not the greatest, but I guess that's what happens when we work with a beta. Better case would be macOS wasn't still in beta, and this could be tested in a separate beta. But I'd much prefer having Xcode 15 beta available now, rather than after it's released. 🙈

Let's hope the next Xcode beta sorts things out. 🤞😅

@ilia-shipitsin
Copy link
Contributor

@Vyazovoy , @mluisbrown I need your help.

do you have (locally) installed both XCode-14.X and XCode-15.X and all working in the expected way ?
if so, please share details how did you get it working.

for image generating we use https://github.com/actions/runner-images/blob/main/images/macos/provision/core/xcode.ps1#L30-L39

which invokes xcodebuild -downloadAllPlatforms in loop.
if you have other steps, we'll adjust our steps

@mluisbrown
Copy link
Author

@ilia-shipitsin I just installed Xcode 15 beta to check this. Now all my iOS 16.4 simulators have (16.4) appended to the end of their description. So apparently with both versions installed you must specify the OS version. It's not clear what determines the default if no OS version is specified.

Nevertheless, I imagine this will be an issue for a lot of projects. At this moment I can't think of a good solution 😞

@2sem
Copy link

2sem commented Aug 3, 2023

Suddenly Archiving Not working
스크린샷 2023-08-03 오후 2 41 41

Working
스크린샷 2023-08-03 오후 2 44 23

How can I downgrade with run-on??
like run-on: macos-13.4 ???

@ilia-shipitsin
Copy link
Contributor

Suddenly Archiving Not working 스크린샷 2023-08-03 오후 2 41 41

Working 스크린샷 2023-08-03 오후 2 44 23

How can I downgrade with run-on?? like run-on: macos-13.4 ???

@2sem , looks like your issue is not related to XCode simulators. Please open dedicated issue and provide repro steps

@joshuapoq
Copy link

The above mentioned work-around of adding (16.4) to the end of the sim name didn't work, but checking out the docs you can do something like iPhone 14,OS=16.4 and it seems to be working for us now.

Thank you @Baza207! This was the solution for us.

@mluisbrown
Copy link
Author

The above mentioned work-around of adding (16.4) to the end of the sim name didn't work, but checking out the docs you can do something like iPhone 14,OS=16.4 and it seems to be working for us now.

The suggestion of adding (16.4) to the end of the sim name is what works if you are using Fastlane with the run_tests command, where you have to pass a literal simulator name, including the OS version, exactly as it would appear in the run destination at the top of the Xcode window.

@joshuapoq @Baza207 it looks like you are using a different tool?

@mluisbrown
Copy link
Author

@ilia-shipitsin I think a potential solution would be to have 2 distinct runner images for macOS 13, one with only the currently shipping production version of Xcode (currently 14.3.1) and another which also includes the current beta version (currently Xcode 15).

I realise that may be too much to ask, and have other issues, so I'm just throwing it out there as a potential option.

@Baza207
Copy link

Baza207 commented Aug 3, 2023

@joshuapoq @Baza207 it looks like you are using a different tool?

Using Azure DevOps pipelines, which uses Fastlane under the hood (which in turn uses xcodebuild), but as MS own Azure and GitHub both run off of the same agents. 🙃

@Vyazovoy
Copy link

Vyazovoy commented Aug 3, 2023

My previous comment is not fully correct. I've made some experiments and here is what I've found:
(precondition: Xcode 14 and Xcode 15 installed and iOS 17 sim runtime installed)

  • If you open Xcode 14 and go to Settings->Platform you will see a warning that "iOS 17 beta X Simulator" is not compatible with Xcode 14.x
  • According to xcodebuild documentation when you use -destination parameter with platform=iOS Simulator and name=... keys but does not provide OS key (it uses latest by default) xcodebuild will pick the first simulator with "the most recent version of iOS supported by this version of Xcode." So we would expect that the latest supported one should be iOS 16.x
  • Since Xcode 15 it does not contain a default sim runtime so we have to install it explicitly (like @ilia-shipitsin mentioned by running xcodebuild -downloadAllPlatforms) and it installs the runtimes in global /Library/Developer/CoreSimulator/... location. And it makes it visible for all installed Xcode versions (see xcrun simctl runtime list -v)

Taking into an account everything mentioned above looks like there is a bug/feature of xcodebuild/simctl that despite promising to use "the most recent version of iOS supported by this version of Xcode." actually uses literally the most recent version that is visible to the tool. But this weird behavior gets more problematic after Xcode 15 stopped providing a default iOS simulator runtime.

So it is not a runner image regression but more like a new discovered bug/feature of Xcode.

@mluisbrown
Copy link
Author

mluisbrown commented Aug 3, 2023

So it is not a runner image regression but more like a new discovered bug/feature of Xcode.

Thanks for the very detailed explanation @Vyazovoy 🙏

Whilst this does appear to be a bug with xcodebuild, it is still also a runner image regression, even if the problem is not directly in the runner itself. CI jobs which were working fine with the old runner are now broken.

As I suggested above, the best fix would be to have two separate macOS runners, one with only released versions of Xcode and one with only the current beta version of Xcode. That may be too much to ask though.

@Vyazovoy
Copy link

Vyazovoy commented Aug 3, 2023

the best fix would be to have two separate macOS runners

Totally agree with you, @mluisbrown. Ideally it should be a runner with the macOS 14 Sonoma Beta with Xcode 15 Beta and iOS 17 Beta 😊 But unlikely that we will have it especially taking into an account that we are ~ one month from the betas will become GM.

@Vyazovoy
Copy link

Vyazovoy commented Aug 3, 2023

@ilia-shipitsin, I think this issue will happen with all Xcode 15+ unless Apple fix the behavior. Imagine that Xcode 15.3 will install iOS 17.3 runtime globally and it will be used by default even if you have selected Xcode 15.1 with xcode-select. Maybe in some cases it won't cause any issues but at least it won't be what people expect. So consider investigating potential solutions. At least it worth to report to Apple.

@Steve-Glass
Copy link
Contributor

👋 @Vyazovoy This is something we can bring to Apple. In the past, I've found it helpful to bring feedback directly from customers to Apple. Would you be open to submitting an issue via Feedback Assistant and providing us with the issue number?

@lucascorrea
Copy link

The above mentioned work-around of adding (16.4) to the end of the sim name didn't work, but checking out the docs you can do something like iPhone 14,OS=16.4 and it seems to be working for us now. (Converts to -destination platform=iOS Simulator,name=iPhone 14,OS=16.4 for xcodebuild.)

We have the same problem in CI, this Xcode issue of allowing Xcode 14.3.1 to run the simulator with iOS 17 is a critical issue.

Let's try this solution.
Thanks

@stephencelis
Copy link

The new Xcode images seem to have a lot of strange issues. After xcode-selecting a particular version, xcodebuild doesn't resolve:

https://github.com/pointfreeco/swift-dependencies/actions/runs/5823359023/job/15790061504

$ sudo xcode-select -s /Applications/Xcode_14.3.app
$ xcodebuild …
error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch

@mluisbrown
Copy link
Author

@stephencelis I think you need to specify /Applications/Xcode_14.3.1.app (add the .1) for it to work. Or .0 if you want 14.3.

@stephencelis
Copy link

@mluisbrown I bumped versions coincidentally, but the path to 14.3.0 should simply be 14.3:

image

And this worked in the past. I had to change xcodebuild to xcrun xcodebuild to get things working again.

@mluisbrown
Copy link
Author

@stephencelis it's true that 14.3 without the 0 should work.
It's really weird that you needed to add xcrun 😕

@ilia-shipitsin
Copy link
Contributor

Hello,

XCode 15 Beta 6 was deployed.

@Brett-Best
Copy link

Brett-Best commented Aug 20, 2023

@stephencelis

The new Xcode images seem to have a lot of strange issues. After xcode-selecting a particular version, xcodebuild doesn't resolve:

https://github.com/pointfreeco/swift-dependencies/actions/runs/5823359023/job/15790061504

$ sudo xcode-select -s /Applications/Xcode_14.3.app
$ xcodebuild …
error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch

You actually need to point to the developer directory within the Xcode you want to use.
So try:

$ sudo xcode-select -s /Applications/Xcode_14.3.app/Contents/Developer

@tristangrichard
Copy link

tristangrichard commented Sep 19, 2023

I am experiencing the same issue.

None of the Xcode-select steps work for me either

UI tests are failing since August. They simply fail to launch.

Any way I can specify simulator running iOS 16.4 without using fastlane

@amilton-camargo-ext
Copy link

Does anybody know if Xcode 15 is already available?

$ sudo xcode-select -s /Applications/Xcode_15.app/Contents/Developer

@JUSTINMKAUFMAN
Copy link

Does anybody know if Xcode 15 is already available?

$ sudo xcode-select -s /Applications/Xcode_15.app/Contents/Developer

This command (above) selects Xcode 15 Beta, which can not be used to deploy to App Store Connect.

Is there a different location for the release version?

Do we need to use macOS 14 runners for this? And if so, are they already available (because there is no mention of them in the docs yet)?

Hopefully the docs are updated soon since Xcode 15 has been out of beta for a few weeks now.

@amilton-camargo-ext
Copy link

I did set the system to macos-13 and Xcode to sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer and it worked. But I'm not deploying to the Store, just running the tests.

@JUSTINMKAUFMAN
Copy link

I did set the system to macos-13 and Xcode to sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer and it worked. But I'm not deploying to the Store, just running the tests.

It will work fine for running tests but App Store Connect will complain that it is in an invalid toolchain for production.

@Vyazovoy
Copy link

@JUSTINMKAUFMAN, take a look at #8282 please

@dk53
Copy link

dk53 commented Sep 27, 2023

Bumping this, as build using iOS 17 simulators are enormously long

@patrickhartling
Copy link

I've been testing Xcode 15.0 and iOS 17.0 simulators, and the simulator is very slow. Everything else is about the same speed as using Xcode 14.3.1 and iOS 16.4. Execution of tests with an iOS 17.0 takes about twice as long as with an iOS 16.4 simulator.

@mluisbrown
Copy link
Author

I've been testing Xcode 15.0 and iOS 17.0 simulators, and the simulator is very slow. Everything else is about the same speed as using Xcode 14.3.1 and iOS 16.4. Execution of tests with an iOS 17.0 takes about twice as long as with an iOS 16.4 simulator.

I have the same issue. See #8434

@stephencelis
Copy link

@mluisbrown @patrickhartling This is a known issue in Xcode 15 that was fixed in 15.0.1 and 15.1. From the release notes:

Fixed: Executing Unit/UI tests from Xcode on the iOS Simulator takes an extended time to launch on first run of the suite. (115187363) (110330776) (FB12237092)

@mluisbrown
Copy link
Author

@stephencelis I saw that issue and wondered if it was the cause. It's just weird that running the test suite locally on my M1 MacBook Pro doesn't seem to have these issues.

But I hope this is the issue, as it means there's a solution in sight 👍

@mluisbrown
Copy link
Author

It's just weird that running the test suite locally on my M1 MacBook Pro doesn't seem to have these issues.

Turns out I did... a full test suite was taking 6-7 minutes and with Xcode 15.0.1 and iOS 17.0.1 simulators it only takes 2-3 minutes 😄

@svenmuennich
Copy link

with Xcode 15.0.1 and iOS 17.0.1 simulators it only takes 2-3 minutes

@mluisbrown Does that mean that with Xcode 15.0.1 execution time is roughly the same as with Xcode 14 for your test suite?

@mluisbrown
Copy link
Author

@svenmuennich on my local machine, yes.

antrix1989 pushed a commit to AzureAD/microsoft-authentication-library-for-objc that referenced this issue Dec 11, 2023
* check that codeLength is not nil

* Initial depth first doc comments for Sign In public interface

* Quick fixes to sign in docs

* Initial sign up doc comments

* Two small fixes

* Typos

* Just adding some fullstops

* Doc comments for getCurrentAccount and result

* Added SSPR doc comments

* Fixed doc comment for sign up

* Updated top level documentation

* Add doc comments for init methdos

* Merged PR 9103: Fix sign out e2e tests for mock API, skip for test tenant

## Proposed changes

Small PR to fix sign out e2e tests for mock API, skip for test tenant.

Now that we no longer go straight to the token endpoint when signing in with a password, we need to provide queue up the mock responses for the /initiate and /challenge endpoints too.

Also, as this flow isn't supported in the test tenant at the moment we need to skip running this if it is not a Mock API test configuration.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [X] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [X] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Fix sign out e2e tests for mock API, skip for test tenant

* Initial depth first doc comments for Sign In public interface

* Quick fixes to sign in docs

* Initial sign up doc comments

* Two small fixes

* Typos

* Just adding some fullstops

* Doc comments for getCurrentAccount and result

* Added SSPR doc comments

* Fixed doc comment for sign up

* Updated top level documentation

* Add doc comments for init methdos

* PR Comments

* PR Comments

* PR Comments

* Removed not needed configuration parameter

* Added Notes about optional delegate parameters

* Used consistent parameter groups for documentation when more than 1 parameter

* Added note and corrected error

* Changed description of `newState` parameter in docc comments

* Removed mention of text message from docc comments

* Doc comment updates

* Added some missing doc comments

* Added optional label to optional parameters in doc comments

* Updated comment

* Updated initial text in markdown about Native Auth

* PR comment

* PR comment

* Updated PCA initialiser to take clientId, tenantName and challengeTypes as parameters

* Fixed bad commit

* - Added a slice config property to MSALNativeAuthConfiguration
- Changed MSALNativeAuthRequestable default implementation to inject the slice information in an url query
- All controllers that want to point to a specific test slice need to first set the sliceConfig property (in MSALNativeAuthClientApplicationConfig) before constructing an instance of MSALNativeAuthPublicClientApplication

* Fixed capitalisation

* Fixed reference to password error delegate in code comment

* Fixed typos in doc comments

* Updated error description in doc comments

* Updated delegate description in doc comments

* Updated doc comment for account result

* Added missing doc comments for some error types

* Merged PR 9102: Add default error descriptions for all MSALNativeAuthError subclasses

## Proposed changes

This PR adds default error descriptions for all `MSALNativeAuthError` subclasses. If an error already has a non-nil `errorDescription` then that is returned, otherwise we return a string based on the `type`.

## Type of change

- [X] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Before:
![CleanShot 2023-07-14 at 07.11.10@2x.png](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_apis/git/repositories/616da9d3-8336-4562-811a-581d9a5cbe9c/pullRequests/9102/attachments/CleanShot%202023-07-14%20at%2007.11.10%402x.png)

After:
![CleanShot 2023-07-14 at 07.10.36@2x.png](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_apis/git/repositories/616da9d3-8336-4562-811a-581d9a5cbe9c/pullRequests/9102/attachments/CleanShot%202023-07-14%20at%2007.10.36%402x.png)

* - Added unit test for MSALNativeAuthRequestable default implementation

* - Using url components to construct endpoints

* Updated PCA initialiser to take clientId, tenantName and challengeTypes as parameters

* Fixed bad commit

* Removed debug code

* Fixed doc comment for new initialiser

* - Removed changes done in view controllers, since Sample App is going to use a different initialiser

* Added back redirectUri parameter

* - Fixing url component to resolve against base url

* - Added new unit test for when test slice is not used

* - Fixing merge issues

* - Fixing more merge issues

* Changing parameter from NULL to nil when constructing MSALNativeAuthPublicClientApplication in objc view controller

* make account accessible from external dev, update unit tests

* remove accountClaims and fix swift lint warnings

* update signUp integration tests

* make account a constant and remove private(set)

* call SDK signOut method when pressing signOut button

* submodule update

* Update readme

* Merged PR 9199: Update MSAL podspec to enable installation of Native Auth with Cocoapods

## Proposed changes

- Added updates to MSAL.podspec needed to compile the Swift files that were added to the project:
-- Disabled MACos build as it's outside the private preview scope
-- Added the 'HEADER_SEARCH_PATHS' => __dir__  to the pod_target_xcconfig to allow for the Pod Project to compile the modulemap
-- Added the Swift extension to the list of source files for both iOS and MacOS (app.source_files / ext.source_files)
-- Added the new MSAL Native Auth public headers to both subspecs and both platforms - "MSAL/src/native_auth/public/*.h"
- The swift files removed were still present in the folders even though they were not use inside the xcodeproj, but because Cocoapods was picking them up as Swift files, they needed to be removed.

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [x] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

To test:
- Create a new App
- Install Cocoapods
- Go to the folder of the app in terminal and execute "pod init"
- Edit the Podfile and set your pulled branch as the local path to the folder:
`pod 'MSAL' , :path => '/Users/<username>/Desktop/Projects/MSAL'` (or wherever your project is)
- Go to the folder of the app in terminal and execute "pod install"
- Import MSAL, make sure you can access the MSALNativeAuthPublicClientApplication class
- To build be sure to be on the iOS framework, not the MACos one

Related work items: #2621133

* Merged PR 9342: Fix Build for Azure Pipelines

## Proposed changes

Fix project so pipeline builds successfully
Following fixes were applied:
-Because of this [issue](actions/runner-images#8023) where the latest MacOS 13 image uses XCode 15 with the iOS 17 beta simulator, the "latest" iPhone 14 simulator is now 17. Due to this, the build is very slow which makes multiple tests fail due to timeouts
-The iOS simulator that is now launched is the iOS 16.4 one instead of the 17 one
-The GUID used for code coverage is the one of the iOS 16.4 simulator to allow the code coverage to work properly
-Swiftlint appears to be running on all the code now, so fixed swiftlint issues on the Native Auth Sample app

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2655681

* Merged PR 9259: ResetPassword-start. Not all invalidRequest are related to "UserDoesNotHaveAPassword" error

## Proposed changes

Highlights:
- Created new custom validated error enum for resetPassword start
- update unit tests

## Type of change

- [ ] Feature work
- [X] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
We don't need to log the unexpected error codes

Related work items: #2640267

* Merged PR 9426: Include errorDescription, when available, on log message

## Proposed changes

- Whenever an error gets logged it's errorDescription should be logged rather than the description of the Object. `error.errorDescription` vs 'error.description'
- The change to the `MSALNativeAuthPublicClientApplication.swift` is due to an Swiftlint issue that doesn't get picked up by the git difference.
- The cases where an errorType or error as part of a do/try was logged didn't need change.
## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [x] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
This can be tested by replacing this function in AppDelegate.swift on the NativeAuthSampleApp and then calling an API
```
func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        MSALGlobalConfig.loggerConfig.setLogCallback {
            (level: MSALLogLevel, message: String?, containsPII: Bool) in
            // If PiiLoggingEnabled is set YES, this block will potentially contain sensitive information (Personally Identifiable Information), but not all messages will contain it.
            // containsPII == YES indicates if a particular message contains PII.
            // You might want to capture PII only in debug builds, or only if you take necessary actions to handle PII properly according to legal requirements of the region
            if let displayableMessage = message {
                if (!containsPII) {
#if DEBUG
                    // NB! This sample uses print just for testing purposes
                    // You should only ever log to NSLog in debug mode to prevent leaking potentially sensitive information
                    print(displayableMessage)
#endif
                }
            }
        }
        return true
    }
```

Related work items: #2641240

* points to latests commit on IdentityCore/ciam-master

* increase timeout cause the mac agent uses beta version simulator

* - Added two new delegates to sign up, to be triggered instead of returning errors: `onSignUpAttributesRequired` and `onSignUpAttributesInvalid`
- Parsing error responses from sign up /start and /continue endpoints
- Adjusted spies and tests accordingly

* add new otp error codes, parse error code for invalid request, add new unit tests

* Merged PR 9568: - Fix re-encoding of attributes in MSALNativeAuthSignUpRequestProvider

## Proposed changes

Describe what this PR is trying to do.

## Type of change

- [ ] Feature work
- [X] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

- Fix re-encoding of attributes in MSALNativeAuthSignUpRequestProvider

Related work items: #2670284

* Merged PR 9542: iOS - Use error description from API when available

## Proposed changes

Whenever API sends error descriptions, they should be returned to the developer integrating the SDK to better debug the issues they are facing
-Changed how errors are returned
-Changed unit tests to use the new functionality
-Added unit tests for the Enums and new functions

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [x] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2610913

* - Removed unnecessary statement in MSALNativeAuthErrorRequiredAttributes string description

* - Fixed unit testes for MSALNativeAuthErrorRequiredAttributes

* - Removed public access tp MSALNativeAuthErrorRequiredAttributes initialiser

* i Improved methods description in SignUpAttributesRequiredDelegate

* - Methods description fix

* - Removed error assertion

* - Made property "regex" of RequiredAttributeOptions access public as well

* - Moved MSALNativeAuthErrorBasicAttributes and RequiredAttributeOptions to separate files

* - Fixed file headers
- Fixed SwiftLint warnings
- Changed MSALNativeAuthSignUpContinueResponseError to use MSALNativeAuthErrorBasicAttributes instead of dictionary in unverifiedAttributes

* handle new otp error codes for signIn token endpoint result

* handle invalid request for otp error codes in signUp

* send invalid user input result instead of generic error

* - Created RequiredAttributesError to separate MSALNativeAuthErrorRequiredAttributes from the SDK's external interface

* test all error cases for invalid grant

* add new tests for invalid request-otp error codes in signUp validator class

* return invalidRequest instead of general error when invalidRequest is received

* - Added list of attributes required to SignUpVerifyCodeDelegate and SignUpPasswordRequiredDelegate

* no message

* Rename file

* Fixed white space

* Fixed attributeValidationFailed case on submitCode and submitPassword

* Grouped cases together

* Merged PR 9618: Provide username for signin with slt via SignUpController

## Proposed changes

Now we keep the username in memory between calls. I'm carrying over every call in order to avoid having state in the Controller.

I've added an integration test at the end of `MSALNativeAuthSignUpControllerTests` because although we have the E2E test for signUp, the mock api is not updated and I'm not sure if the parameter is mandatory at the moment.

Apart from the test in code, I've retested the following tests of the [Native Auth Private Preview test cases](https://microsofteur.sharepoint.com/:x:/t/DevExDublin/ESLT-SpZO7dEpuN4aLIiB9MBMPeJ94oJWIy8vFEa4Jsimg?e=enJcyV) sheet:

- Test 1 (also tried re-sending the oob code and continuing from there)
- Test 3
- Test 13
- Test 17

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2670401

* remove swiftlint warinings, copy all error fields, add new unit tests related to the changes

* Add new eSTS error for sign-up flow. However, this will need to be refactored since we shouldn't be creating API Models on our own (IMO). API Models should reflect API. I'm making this change now to avoid creating another "middle" model for the sign-up errors, which would lead to a few changes in tests. Options to solve this problem in the future would be:

1) Create a new validated error enum in the SignUpValidator
2) Perform some conversion logic from the eSTS error to our error inside the error API models via a method or computed property.

* Fix test

* Add integration test to mock api

* remove invalid and required attributes error

* update and add unit tests

* remove newState from attributesRequiredError callback. update unit and integration tests

* Add new case to handle invalidUsername error in MSALNativeAuthSignUpStartValidatedResponse

* remove invalid attributes for signUpStart error enums, use optional delegate methods

* update sample app

* remove swiftlint warnings

* update unit tests

* add new unit tests

* update log message for invalid attributes

* Merged PR 9669: Change API error invalid_client to unauthorized_client

## Proposed changes

-For SignUp Start/Challenge/Continue and SignIn Initiate/Challenge the error code for invalid_client should be changed to unauthorized_client
-For Token unauthorized_client should be added to the possible list of error codes

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [x] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
-Integration tests don't work anymore as the Mock API is not updated so they were disabled

Related work items: #2654063

* Update submodules

* Merged PR 9687: Change auth_not_supported to unsupported_auth_method

## Proposed changes

Changed auth_not_supported to unsupported_auth_method

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2673106

* update configuration file

* do not show cached user username. log accountId instead of username

* use sample placeholders as specified in the document

* rename tenantName to tenantSubdomain

* remove client id

* add default value for redirectUri and bypass redirect URI validation when needed

* Merged PR 9738: Update IdentityCore submodule

## Proposed changes

Update submodules in the project to include our [latest changes](https://identitydivision.visualstudio.com/Engineering/_git/devexdub-microsoft-authentication-library-common-for-objc/pullrequest/9737) from IdentityCore.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Update submodules

Related work items: #2643139

* add new unit test, remove unwanted characters

* Remove old sample app and rename proper sample app folder

* remove raw tenant from MSIDCIAMAuthotiry initialisation

* remove doc folder

* remove old sample app from build script and rename folder

* update build script, remove simple word from

* remove blank lines to make swiftlint happy

* Merged PR 9759: Treat InvalidClientId correctly

## Proposed changes

Because both invalid client id and invalid username API errors generate a invalidRequest error with an error code of 90100, we have to check the error_description to see why it happens
-Invalid username is now mapped to public error invalidUsername
-Invalid client id is now mapped to public error generalError but we log the client id error
## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2685134

* set correct name for attributes required method name

* remove optional methods from sample app

* Merged PR 9768: Update MSALNativeAuthServerTelemetry to include optional errors

## Proposed changes

We need to merge !9767 before merging this one.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Update MSALNativeAuthServerTelemetry to include optional errors

Related work items: #2643139

* remove empty implementation of optional methods

* update readme doc

* update readme file, add new images

* address comments

* modifications to let xcode 13.4.1 works

* update SDK version for private preview

* skip test for private preview versioning

* Merged PR 9361: Refactor controllers to enable new public interfaces

## Proposed changes

- Refactor the controllers to return a response to the public interface (and the public interface will return to the developer). This makes the task of creating public interfaces (such as async/await, combine, etc.) easier because the controller is not tightly coupled to the interface.
- Unit tests updated.

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [x] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Related work items: #2635763

* Merged PR 9843: Changes to NativeAuthSampleApp for Xcode 13.4 compatibility

## Proposed changes

Changes that remove Swift features specific to Xcode 14 to allow building NativeAuthSampleApp on Xcode 13.4.
The 2 Swift changes needed to build on Xcode 13.4 are
1. Providing initializers in if/guard statements when unwrapping optionals
2. Explicit use of "self"

The project format has been changed to "Xcode 13.0-compatible"

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

* Fix for account claims

* Made the initialiser easier to use

* Merged PR 9900: Fix Cocoapods to work with Git installations

## Proposed changes

- Fixed Cocoapods so that when users use
`pod 'MSAL', :git => "https://github.com/AzureAD/msal-objc-native-auth-preview"`
in their pod file it works as intended
- This change means the local install with path doesn't work as both relative and absolute paths can't work at the same time (there could be a configuration that we are unaware of which might make both work but the git one is more important)
-To test from ADO set
`pod 'MSAL', :git => "https://identitydivision.visualstudio.com/DefaultCollection/Engineering/_git/devexdub-microsoft-authentication-library-for-objc", :branch => "spetrescu/cocoapods-git-fix", :submodules => true
`
## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [x] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
- Changed modulemap to use Relative Path instead of Absolute
- Added modulemap file to source files so it gets downloaded as we use a private module map rather than a normal one (where all files are public)
- Split modulemap file into two modules for files that are not added to the target
- Modified unit tests to load needed modules based on requirements

Related work items: #2697240

* - Added Native Auth base classes that interact with MSAL

* - Added Native Auth network classes that interact with MSAL

* - Added unit tests

* - Added unit tests

* -Fixed unit tests
-PR Comments

* - Added Native Auth Sign Up files

* - Added Native Auth Sign In

* - Added Native Auth Password Reset files

* Merged PR 9949: [iOS SDK] Make the SDK build for Release and Profiling

## Proposed changes

Fix the build error around the `performTokenRequest` function in `MSALNativeAuthTokenController`
The linker, when optimizing for speed or size, doesn't process the function
`private func performTokenRequest(_ request: MSIDHttpRequest, context: MSIDRequestContext) async -> Result<MSIDCIAMTokenResponse, Error> {` properly.
The only workaround found so far was to move all private functions into an extension in the same file

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Created extension to circumvent undefined symbol error

Related work items: #2694846

* - Clearing cache in setup and teardown methods only (MSALNativeAuthCacheAccessorTests)
- Added full SLT naming

* Merged PR 10009: Fix imports for new MSAL private module in integration tests

## Proposed changes

Quick fix to two places in the integration tests that required the MSAL_Unit_Test_Private instead of MSAL_Private

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [X] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [X] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Fix imports for new MSAL private module in integration tests

* Merged PR 9998: [iOS SDK] Make changes to project and Cocoapods to allow building the MAC Framework

## Proposed changes

-There were no changes needed to the project as they were already done previously and MacOS MSAL framework builds properly
-The Podspec file has been changed to build properly

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
To test properly, create a XCode Project with a Mac target which uses Cocoapods
Set the Podfile as follows:
```
target 'TestAppMac' do
   pod 'MSAL', :git => "https://identitydivision.visualstudio.com/Engineering/_git/devexdub-microsoft-authentication-library-for-objc", :branch => "spetrescu/msal-mac-cocoapods", :submodules => true
end
```

Related work items: #2652866

* Merged PR 10087: [iOS SDK] Fix Sample App pipeline build

## Proposed changes

Swiftlint added a rule to check if functions that `override` only call the super, which in the end indeed does nothing.
For example:
```
override func viewDidLoad() {
        super.viewDidLoad()
    }
```
Because the sample app had 3 such functions the PR validation failed
Furthermore our PR validation script runs Swiftlint on the Native Sample App but we didn't have that so the script was added

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
-Added swiftlint to Sample App
-Disabled warnings for Sample App

* Merged PR 10086: [IOS SDK] Remove unused getAccount function from Cache Interface

## Proposed changes

Because the function getAccount was unused as we don't have multiple accounts yet we need to remove it from the Accessor, Protocol and unit tests

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2644201

* Merged PR 10133: Update position of "delegate" parameter in public interfaces for consistency

## Proposed changes

This pull request is about changing the position of the `delegate` parameter in public interface method calls, for consistency.
Modified interfaces:
- MSALNativeAuthUserAccountResult
- SignUpStates
- SignInStates
- ResetPasswordStates

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [X] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [X] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

- Changed public interface to be consistent and always have the delegate as the last parameter of method calls
- Changed sample app to reflect the changes

Related work items: #2690285

* Merged PR 10194: Fix inline documentation in public delegates

## Proposed changes

Add missing inline documentation for parameters in ResetPasswordDelegates, SignInDelegates and SignUpDelegates that were found while working [this ticket](https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2711520/).

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [x] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

----
#### AI-Generated Description
This pull request modifies three files related to the native authentication state machine delegates in MSAL. The main changes are:

- Adding parameters to some delegate methods to provide more information about the new state of the flow and the required attributes.
- Changing the error parameter type in some delegate methods to include the new state of the flow as an optional value.
- Adding some optional methods to some delegate protocols to handle different scenarios that may require a code or a password from the user.

Related work items: #2711520

* - Refactor of MSALNativeAuthResponseErrorHandler to remove duplicated code with IdetityCore

* - Added MSIDAADRequestErrorHandler to module map

* - Changed method name from "handleAPIError" to "handleCustomError" to be more concise with IdentityCore implementation.

* - Added NativeAuthCustomErrorSerializer to deal with Native Auth custom errors serialization
- Refactor of MSALNativeAuthResponseErrorHandler

* - Removed unused property

* - Changed class name to add "MSAL" prefix

* - Added a comment explaining the "throw" command in MSALNativeAuthCustomErrorSerializer method

* Merged PR 10303: Ciam Master updated to MSAL 1.2.18

## Proposed changes

Update with MSAL 1.2.18 from GitHub

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [X] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

----
#### AI-Generated Description
This pull request updates the MSAL library for iOS and Mac to version 1.2.18. The main changes are:

- Fixed duplicate values for error JIT codes (#1893)
- Added ccs request id header (#1844)
- Added separate error code for OneAuth telemetry purpose (common core #1292)
- Exposed APIs for manually setting time_Interval for request and session resource (#1288)
- Updated the iOS simulator device and OS version for testing
- Updated the Package.swift and MSAL.podspec files with the new version number
- Fixed some linting and code coverage issues

Related work items: #2726861

* Merged PR 10343: [iOS SDK] SignUp error API responses are parsed to general SDK error

## Proposed changes

Problem:
MSALNativeAuthResponseErrorHandler was changed during merging to use the responseSerializer passed into the handleError function resulting in the incorrect serializer parsing API response errors.

Solution:
Always use MSALNativeAuthCustomErrorSerializer<T> as the responseSerializer to ensure API errors are parsed as expected.

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

----
#### AI-Generated Description
This pull request adds a new unit test case for the MSALNativeAuthResponseErrorHandler class, which handles errors from native auth requests. The test case checks that the error handler uses the correct response serializer when the status code is 400 and the error is verification_required. The pull request also modifies the error handler to always use the MSALNativeAuthCustomErrorSerializer instead of the response serializer passed as an argument.

Related work items: #2727783

* PR comments

* Files changed/removed during private preview
Removed documentation for NativeAuth
Removed NativeAuthSampleApp

* - Restored changes based on code review

* - Removed extra space

* - Restored original README.md

* Spacing on Pr-Validation.yml

* Changed Mock API url

* Switched to Environment variable

* - Created cgmanifest.json file to add SwiftLint to component governance verification

* - Updated CODEOWNERS file to give AppleCIAMTeam onwnership over Native Auth code.

* - Updated description

* - Changed CIAM team

* - Fixed text description

* Removed MSALNativeAuthInternalChallengeType.swift from being added twice to the Project

---------

Co-authored-by: Danilo Raspa <daniloraspa@microsoft.com>
Co-authored-by: Silviu Petrescu <spetrescu@microsoft.com>
Co-authored-by: Rodhan Hickey <rodhanhickey@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Ameya <>
Co-authored-by: Ameya Patil <amepatil@microsoft.com>
Co-authored-by: Diego Jerez Barroso <diegoje@microsoft.com>
Co-authored-by: Dualtagh Murray <duamurray@microsoft.com>
Co-authored-by: Danilo Raspa <105228698+nilo-ms@users.noreply.github.com>
@erik-bershel
Copy link
Contributor

Hello @mluisbrown!
Unfortunately, it is now impossible to associate specific runtimes with a specific Xcode in image directly. Thus, no matter what basic simulator we choose, such changes will break workflows without pre-build settings.
In this regard, I am going to close this issue.

kaisong1990 added a commit to AzureAD/microsoft-authentication-library-for-objc that referenced this issue Feb 23, 2024
* Update submodule

* Update submodule

* Get token operation for BrowserCore (#1862)

* Update core.

* Update msal.

* Update core.

* update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update submodule

* Updated submodule

* Updated submodule

* Update submodule

* update submodule for current key change

* New error message when device is not PSSO registered.

* Merge release 1220 into dev (#1934)

* Release MSAL 1.2.20 (#1930)

* Update submodule

* Update submodule

* Get token operation for BrowserCore (#1862)

* Update core.

* Update msal.

* Update core.

* update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update submodule

* Updated submodule

* Updated submodule

* Update submodule

* update submodule for current key change

* New error message when device is not PSSO registered.

* Release MSAL 1.2.20

* Align with latest main (#1933)

---------

Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>
Co-authored-by: Kai <kaisong1990@gmail.com>

* Updating MSAL framework checksum & url for 1.2.20 [skip ci]

* Update CommonCore to latest dev

---------

Co-authored-by: Veena Soman <veenasoman@microsoft.com>
Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>

* Native Auth features (#1911)

* check that codeLength is not nil

* Initial depth first doc comments for Sign In public interface

* Quick fixes to sign in docs

* Initial sign up doc comments

* Two small fixes

* Typos

* Just adding some fullstops

* Doc comments for getCurrentAccount and result

* Added SSPR doc comments

* Fixed doc comment for sign up

* Updated top level documentation

* Add doc comments for init methdos

* Merged PR 9103: Fix sign out e2e tests for mock API, skip for test tenant

## Proposed changes

Small PR to fix sign out e2e tests for mock API, skip for test tenant.

Now that we no longer go straight to the token endpoint when signing in with a password, we need to provide queue up the mock responses for the /initiate and /challenge endpoints too.

Also, as this flow isn't supported in the test tenant at the moment we need to skip running this if it is not a Mock API test configuration.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [X] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [X] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Fix sign out e2e tests for mock API, skip for test tenant

* Initial depth first doc comments for Sign In public interface

* Quick fixes to sign in docs

* Initial sign up doc comments

* Two small fixes

* Typos

* Just adding some fullstops

* Doc comments for getCurrentAccount and result

* Added SSPR doc comments

* Fixed doc comment for sign up

* Updated top level documentation

* Add doc comments for init methdos

* PR Comments

* PR Comments

* PR Comments

* Removed not needed configuration parameter

* Added Notes about optional delegate parameters

* Used consistent parameter groups for documentation when more than 1 parameter

* Added note and corrected error

* Changed description of `newState` parameter in docc comments

* Removed mention of text message from docc comments

* Doc comment updates

* Added some missing doc comments

* Added optional label to optional parameters in doc comments

* Updated comment

* Updated initial text in markdown about Native Auth

* PR comment

* PR comment

* Updated PCA initialiser to take clientId, tenantName and challengeTypes as parameters

* Fixed bad commit

* - Added a slice config property to MSALNativeAuthConfiguration
- Changed MSALNativeAuthRequestable default implementation to inject the slice information in an url query
- All controllers that want to point to a specific test slice need to first set the sliceConfig property (in MSALNativeAuthClientApplicationConfig) before constructing an instance of MSALNativeAuthPublicClientApplication

* Fixed capitalisation

* Fixed reference to password error delegate in code comment

* Fixed typos in doc comments

* Updated error description in doc comments

* Updated delegate description in doc comments

* Updated doc comment for account result

* Added missing doc comments for some error types

* Merged PR 9102: Add default error descriptions for all MSALNativeAuthError subclasses

## Proposed changes

This PR adds default error descriptions for all `MSALNativeAuthError` subclasses. If an error already has a non-nil `errorDescription` then that is returned, otherwise we return a string based on the `type`.

## Type of change

- [X] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Before:
![CleanShot 2023-07-14 at 07.11.10@2x.png](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_apis/git/repositories/616da9d3-8336-4562-811a-581d9a5cbe9c/pullRequests/9102/attachments/CleanShot%202023-07-14%20at%2007.11.10%402x.png)

After:
![CleanShot 2023-07-14 at 07.10.36@2x.png](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_apis/git/repositories/616da9d3-8336-4562-811a-581d9a5cbe9c/pullRequests/9102/attachments/CleanShot%202023-07-14%20at%2007.10.36%402x.png)

* - Added unit test for MSALNativeAuthRequestable default implementation

* - Using url components to construct endpoints

* Updated PCA initialiser to take clientId, tenantName and challengeTypes as parameters

* Fixed bad commit

* Removed debug code

* Fixed doc comment for new initialiser

* - Removed changes done in view controllers, since Sample App is going to use a different initialiser

* Added back redirectUri parameter

* - Fixing url component to resolve against base url

* - Added new unit test for when test slice is not used

* - Fixing merge issues

* - Fixing more merge issues

* Changing parameter from NULL to nil when constructing MSALNativeAuthPublicClientApplication in objc view controller

* make account accessible from external dev, update unit tests

* remove accountClaims and fix swift lint warnings

* update signUp integration tests

* make account a constant and remove private(set)

* call SDK signOut method when pressing signOut button

* submodule update

* Update readme

* Merged PR 9199: Update MSAL podspec to enable installation of Native Auth with Cocoapods

## Proposed changes

- Added updates to MSAL.podspec needed to compile the Swift files that were added to the project:
-- Disabled MACos build as it's outside the private preview scope
-- Added the 'HEADER_SEARCH_PATHS' => __dir__  to the pod_target_xcconfig to allow for the Pod Project to compile the modulemap
-- Added the Swift extension to the list of source files for both iOS and MacOS (app.source_files / ext.source_files)
-- Added the new MSAL Native Auth public headers to both subspecs and both platforms - "MSAL/src/native_auth/public/*.h"
- The swift files removed were still present in the folders even though they were not use inside the xcodeproj, but because Cocoapods was picking them up as Swift files, they needed to be removed.

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [x] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

To test:
- Create a new App
- Install Cocoapods
- Go to the folder of the app in terminal and execute "pod init"
- Edit the Podfile and set your pulled branch as the local path to the folder:
`pod 'MSAL' , :path => '/Users/<username>/Desktop/Projects/MSAL'` (or wherever your project is)
- Go to the folder of the app in terminal and execute "pod install"
- Import MSAL, make sure you can access the MSALNativeAuthPublicClientApplication class
- To build be sure to be on the iOS framework, not the MACos one

Related work items: #2621133

* Merged PR 9342: Fix Build for Azure Pipelines

## Proposed changes

Fix project so pipeline builds successfully
Following fixes were applied:
-Because of this [issue](https://github.com/actions/runner-images/issues/8023) where the latest MacOS 13 image uses XCode 15 with the iOS 17 beta simulator, the "latest" iPhone 14 simulator is now 17. Due to this, the build is very slow which makes multiple tests fail due to timeouts
-The iOS simulator that is now launched is the iOS 16.4 one instead of the 17 one
-The GUID used for code coverage is the one of the iOS 16.4 simulator to allow the code coverage to work properly
-Swiftlint appears to be running on all the code now, so fixed swiftlint issues on the Native Auth Sample app

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2655681

* Merged PR 9259: ResetPassword-start. Not all invalidRequest are related to "UserDoesNotHaveAPassword" error

## Proposed changes

Highlights:
- Created new custom validated error enum for resetPassword start
- update unit tests

## Type of change

- [ ] Feature work
- [X] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
We don't need to log the unexpected error codes

Related work items: #2640267

* Merged PR 9426: Include errorDescription, when available, on log message

## Proposed changes

- Whenever an error gets logged it's errorDescription should be logged rather than the description of the Object. `error.errorDescription` vs 'error.description'
- The change to the `MSALNativeAuthPublicClientApplication.swift` is due to an Swiftlint issue that doesn't get picked up by the git difference.
- The cases where an errorType or error as part of a do/try was logged didn't need change.
## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [x] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
This can be tested by replacing this function in AppDelegate.swift on the NativeAuthSampleApp and then calling an API
```
func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        MSALGlobalConfig.loggerConfig.setLogCallback {
            (level: MSALLogLevel, message: String?, containsPII: Bool) in
            // If PiiLoggingEnabled is set YES, this block will potentially contain sensitive information (Personally Identifiable Information), but not all messages will contain it.
            // containsPII == YES indicates if a particular message contains PII.
            // You might want to capture PII only in debug builds, or only if you take necessary actions to handle PII properly according to legal requirements of the region
            if let displayableMessage = message {
                if (!containsPII) {
#if DEBUG
                    // NB! This sample uses print just for testing purposes
                    // You should only ever log to NSLog in debug mode to prevent leaking potentially sensitive information
                    print(displayableMessage)
#endif
                }
            }
        }
        return true
    }
```

Related work items: #2641240

* points to latests commit on IdentityCore/ciam-master

* increase timeout cause the mac agent uses beta version simulator

* - Added two new delegates to sign up, to be triggered instead of returning errors: `onSignUpAttributesRequired` and `onSignUpAttributesInvalid`
- Parsing error responses from sign up /start and /continue endpoints
- Adjusted spies and tests accordingly

* add new otp error codes, parse error code for invalid request, add new unit tests

* Merged PR 9568: - Fix re-encoding of attributes in MSALNativeAuthSignUpRequestProvider

## Proposed changes

Describe what this PR is trying to do.

## Type of change

- [ ] Feature work
- [X] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

- Fix re-encoding of attributes in MSALNativeAuthSignUpRequestProvider

Related work items: #2670284

* Merged PR 9542: iOS - Use error description from API when available

## Proposed changes

Whenever API sends error descriptions, they should be returned to the developer integrating the SDK to better debug the issues they are facing
-Changed how errors are returned
-Changed unit tests to use the new functionality
-Added unit tests for the Enums and new functions

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [x] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2610913

* - Removed unnecessary statement in MSALNativeAuthErrorRequiredAttributes string description

* - Fixed unit testes for MSALNativeAuthErrorRequiredAttributes

* - Removed public access tp MSALNativeAuthErrorRequiredAttributes initialiser

* i Improved methods description in SignUpAttributesRequiredDelegate

* - Methods description fix

* - Removed error assertion

* - Made property "regex" of RequiredAttributeOptions access public as well

* - Moved MSALNativeAuthErrorBasicAttributes and RequiredAttributeOptions to separate files

* - Fixed file headers
- Fixed SwiftLint warnings
- Changed MSALNativeAuthSignUpContinueResponseError to use MSALNativeAuthErrorBasicAttributes instead of dictionary in unverifiedAttributes

* handle new otp error codes for signIn token endpoint result

* handle invalid request for otp error codes in signUp

* send invalid user input result instead of generic error

* - Created RequiredAttributesError to separate MSALNativeAuthErrorRequiredAttributes from the SDK's external interface

* test all error cases for invalid grant

* add new tests for invalid request-otp error codes in signUp validator class

* return invalidRequest instead of general error when invalidRequest is received

* - Added list of attributes required to SignUpVerifyCodeDelegate and SignUpPasswordRequiredDelegate

* no message

* Rename file

* Fixed white space

* Fixed attributeValidationFailed case on submitCode and submitPassword

* Grouped cases together

* Merged PR 9618: Provide username for signin with slt via SignUpController

## Proposed changes

Now we keep the username in memory between calls. I'm carrying over every call in order to avoid having state in the Controller.

I've added an integration test at the end of `MSALNativeAuthSignUpControllerTests` because although we have the E2E test for signUp, the mock api is not updated and I'm not sure if the parameter is mandatory at the moment.

Apart from the test in code, I've retested the following tests of the [Native Auth Private Preview test cases](https://microsofteur.sharepoint.com/:x:/t/DevExDublin/ESLT-SpZO7dEpuN4aLIiB9MBMPeJ94oJWIy8vFEa4Jsimg?e=enJcyV) sheet:

- Test 1 (also tried re-sending the oob code and continuing from there)
- Test 3
- Test 13
- Test 17

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2670401

* remove swiftlint warinings, copy all error fields, add new unit tests related to the changes

* Add new eSTS error for sign-up flow. However, this will need to be refactored since we shouldn't be creating API Models on our own (IMO). API Models should reflect API. I'm making this change now to avoid creating another "middle" model for the sign-up errors, which would lead to a few changes in tests. Options to solve this problem in the future would be:

1) Create a new validated error enum in the SignUpValidator
2) Perform some conversion logic from the eSTS error to our error inside the error API models via a method or computed property.

* Fix test

* Add integration test to mock api

* remove invalid and required attributes error

* update and add unit tests

* remove newState from attributesRequiredError callback. update unit and integration tests

* Add new case to handle invalidUsername error in MSALNativeAuthSignUpStartValidatedResponse

* remove invalid attributes for signUpStart error enums, use optional delegate methods

* update sample app

* remove swiftlint warnings

* update unit tests

* add new unit tests

* update log message for invalid attributes

* Merged PR 9669: Change API error invalid_client to unauthorized_client

## Proposed changes

-For SignUp Start/Challenge/Continue and SignIn Initiate/Challenge the error code for invalid_client should be changed to unauthorized_client
-For Token unauthorized_client should be added to the possible list of error codes

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [x] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
-Integration tests don't work anymore as the Mock API is not updated so they were disabled

Related work items: #2654063

* Update submodules

* Merged PR 9687: Change auth_not_supported to unsupported_auth_method

## Proposed changes

Changed auth_not_supported to unsupported_auth_method

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2673106

* update configuration file

* do not show cached user username. log accountId instead of username

* use sample placeholders as specified in the document

* rename tenantName to tenantSubdomain

* remove client id

* add default value for redirectUri and bypass redirect URI validation when needed

* Merged PR 9738: Update IdentityCore submodule

## Proposed changes

Update submodules in the project to include our [latest changes](https://identitydivision.visualstudio.com/Engineering/_git/devexdub-microsoft-authentication-library-common-for-objc/pullrequest/9737) from IdentityCore.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Update submodules

Related work items: #2643139

* add new unit test, remove unwanted characters

* Remove old sample app and rename proper sample app folder

* remove raw tenant from MSIDCIAMAuthotiry initialisation

* remove doc folder

* remove old sample app from build script and rename folder

* update build script, remove simple word from

* remove blank lines to make swiftlint happy

* Merged PR 9759: Treat InvalidClientId correctly

## Proposed changes

Because both invalid client id and invalid username API errors generate a invalidRequest error with an error code of 90100, we have to check the error_description to see why it happens
-Invalid username is now mapped to public error invalidUsername
-Invalid client id is now mapped to public error generalError but we log the client id error
## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2685134

* set correct name for attributes required method name

* remove optional methods from sample app

* Merged PR 9768: Update MSALNativeAuthServerTelemetry to include optional errors

## Proposed changes

We need to merge !9767 before merging this one.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Update MSALNativeAuthServerTelemetry to include optional errors

Related work items: #2643139

* remove empty implementation of optional methods

* update readme doc

* update readme file, add new images

* address comments

* modifications to let xcode 13.4.1 works

* update SDK version for private preview

* skip test for private preview versioning

* Merged PR 9361: Refactor controllers to enable new public interfaces

## Proposed changes

- Refactor the controllers to return a response to the public interface (and the public interface will return to the developer). This makes the task of creating public interfaces (such as async/await, combine, etc.) easier because the controller is not tightly coupled to the interface.
- Unit tests updated.

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [x] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Related work items: #2635763

* Merged PR 9843: Changes to NativeAuthSampleApp for Xcode 13.4 compatibility

## Proposed changes

Changes that remove Swift features specific to Xcode 14 to allow building NativeAuthSampleApp on Xcode 13.4.
The 2 Swift changes needed to build on Xcode 13.4 are
1. Providing initializers in if/guard statements when unwrapping optionals
2. Explicit use of "self"

The project format has been changed to "Xcode 13.0-compatible"

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

* Fix for account claims

* Made the initialiser easier to use

* Merged PR 9900: Fix Cocoapods to work with Git installations

## Proposed changes

- Fixed Cocoapods so that when users use
`pod 'MSAL', :git => "https://github.com/AzureAD/msal-objc-native-auth-preview"`
in their pod file it works as intended
- This change means the local install with path doesn't work as both relative and absolute paths can't work at the same time (there could be a configuration that we are unaware of which might make both work but the git one is more important)
-To test from ADO set
`pod 'MSAL', :git => "https://identitydivision.visualstudio.com/DefaultCollection/Engineering/_git/devexdub-microsoft-authentication-library-for-objc", :branch => "spetrescu/cocoapods-git-fix", :submodules => true
`
## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [x] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
- Changed modulemap to use Relative Path instead of Absolute
- Added modulemap file to source files so it gets downloaded as we use a private module map rather than a normal one (where all files are public)
- Split modulemap file into two modules for files that are not added to the target
- Modified unit tests to load needed modules based on requirements

Related work items: #2697240

* - Added Native Auth base classes that interact with MSAL

* - Added Native Auth network classes that interact with MSAL

* - Added unit tests

* - Added unit tests

* -Fixed unit tests
-PR Comments

* - Added Native Auth Sign Up files

* - Added Native Auth Sign In

* - Added Native Auth Password Reset files

* Merged PR 9949: [iOS SDK] Make the SDK build for Release and Profiling

## Proposed changes

Fix the build error around the `performTokenRequest` function in `MSALNativeAuthTokenController`
The linker, when optimizing for speed or size, doesn't process the function
`private func performTokenRequest(_ request: MSIDHttpRequest, context: MSIDRequestContext) async -> Result<MSIDCIAMTokenResponse, Error> {` properly.
The only workaround found so far was to move all private functions into an extension in the same file

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Created extension to circumvent undefined symbol error

Related work items: #2694846

* - Clearing cache in setup and teardown methods only (MSALNativeAuthCacheAccessorTests)
- Added full SLT naming

* Merged PR 10009: Fix imports for new MSAL private module in integration tests

## Proposed changes

Quick fix to two places in the integration tests that required the MSAL_Unit_Test_Private instead of MSAL_Private

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [X] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [X] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Fix imports for new MSAL private module in integration tests

* Merged PR 9998: [iOS SDK] Make changes to project and Cocoapods to allow building the MAC Framework

## Proposed changes

-There were no changes needed to the project as they were already done previously and MacOS MSAL framework builds properly
-The Podspec file has been changed to build properly

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
To test properly, create a XCode Project with a Mac target which uses Cocoapods
Set the Podfile as follows:
```
target 'TestAppMac' do
   pod 'MSAL', :git => "https://identitydivision.visualstudio.com/Engineering/_git/devexdub-microsoft-authentication-library-for-objc", :branch => "spetrescu/msal-mac-cocoapods", :submodules => true
end
```

Related work items: #2652866

* Merged PR 10087: [iOS SDK] Fix Sample App pipeline build

## Proposed changes

Swiftlint added a rule to check if functions that `override` only call the super, which in the end indeed does nothing.
For example:
```
override func viewDidLoad() {
        super.viewDidLoad()
    }
```
Because the sample app had 3 such functions the PR validation failed
Furthermore our PR validation script runs Swiftlint on the Native Sample App but we didn't have that so the script was added

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
-Added swiftlint to Sample App
-Disabled warnings for Sample App

* Merged PR 10086: [IOS SDK] Remove unused getAccount function from Cache Interface

## Proposed changes

Because the function getAccount was unused as we don't have multiple accounts yet we need to remove it from the Accessor, Protocol and unit tests

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2644201

* Merged PR 10133: Update position of "delegate" parameter in public interfaces for consistency

## Proposed changes

This pull request is about changing the position of the `delegate` parameter in public interface method calls, for consistency.
Modified interfaces:
- MSALNativeAuthUserAccountResult
- SignUpStates
- SignInStates
- ResetPasswordStates

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [X] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [X] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

- Changed public interface to be consistent and always have the delegate as the last parameter of method calls
- Changed sample app to reflect the changes

Related work items: #2690285

* Merged PR 10194: Fix inline documentation in public delegates

## Proposed changes

Add missing inline documentation for parameters in ResetPasswordDelegates, SignInDelegates and SignUpDelegates that were found while working [this ticket](https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2711520/).

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [x] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

----
#### AI-Generated Description
This pull request modifies three files related to the native authentication state machine delegates in MSAL. The main changes are:

- Adding parameters to some delegate methods to provide more information about the new state of the flow and the required attributes.
- Changing the error parameter type in some delegate methods to include the new state of the flow as an optional value.
- Adding some optional methods to some delegate protocols to handle different scenarios that may require a code or a password from the user.

Related work items: #2711520

* - Refactor of MSALNativeAuthResponseErrorHandler to remove duplicated code with IdetityCore

* - Added MSIDAADRequestErrorHandler to module map

* - Changed method name from "handleAPIError" to "handleCustomError" to be more concise with IdentityCore implementation.

* - Added NativeAuthCustomErrorSerializer to deal with Native Auth custom errors serialization
- Refactor of MSALNativeAuthResponseErrorHandler

* - Removed unused property

* - Changed class name to add "MSAL" prefix

* - Added a comment explaining the "throw" command in MSALNativeAuthCustomErrorSerializer method

* Merged PR 10303: Ciam Master updated to MSAL 1.2.18

## Proposed changes

Update with MSAL 1.2.18 from GitHub

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [X] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

----
#### AI-Generated Description
This pull request updates the MSAL library for iOS and Mac to version 1.2.18. The main changes are:

- Fixed duplicate values for error JIT codes (#1893)
- Added ccs request id header (#1844)
- Added separate error code for OneAuth telemetry purpose (common core #1292)
- Exposed APIs for manually setting time_Interval for request and session resource (#1288)
- Updated the iOS simulator device and OS version for testing
- Updated the Package.swift and MSAL.podspec files with the new version number
- Fixed some linting and code coverage issues

Related work items: #2726861

* Merged PR 10343: [iOS SDK] SignUp error API responses are parsed to general SDK error

## Proposed changes

Problem:
MSALNativeAuthResponseErrorHandler was changed during merging to use the responseSerializer passed into the handleError function resulting in the incorrect serializer parsing API response errors.

Solution:
Always use MSALNativeAuthCustomErrorSerializer<T> as the responseSerializer to ensure API errors are parsed as expected.

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

----
#### AI-Generated Description
This pull request adds a new unit test case for the MSALNativeAuthResponseErrorHandler class, which handles errors from native auth requests. The test case checks that the error handler uses the correct response serializer when the status code is 400 and the error is verification_required. The pull request also modifies the error handler to always use the MSALNativeAuthCustomErrorSerializer instead of the response serializer passed as an argument.

Related work items: #2727783

* PR comments

* Files changed/removed during private preview
Removed documentation for NativeAuth
Removed NativeAuthSampleApp

* - Restored changes based on code review

* - Removed extra space

* - Restored original README.md

* Spacing on Pr-Validation.yml

* Changed Mock API url

* Switched to Environment variable

* - Created cgmanifest.json file to add SwiftLint to component governance verification

* - Updated CODEOWNERS file to give AppleCIAMTeam onwnership over Native Auth code.

* - Updated description

* - Changed CIAM team

* - Fixed text description

* Removed MSALNativeAuthInternalChallengeType.swift from being added twice to the Project

---------

Co-authored-by: Danilo Raspa <daniloraspa@microsoft.com>
Co-authored-by: Silviu Petrescu <spetrescu@microsoft.com>
Co-authored-by: Rodhan Hickey <rodhanhickey@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Ameya <>
Co-authored-by: Ameya Patil <amepatil@microsoft.com>
Co-authored-by: Diego Jerez Barroso <diegoje@microsoft.com>
Co-authored-by: Dualtagh Murray <duamurray@microsoft.com>
Co-authored-by: Danilo Raspa <105228698+nilo-ms@users.noreply.github.com>

* Add co-ownership of MSAL project file

* Check if attributes are parsable to JSON before to parse

* - Added correlationId to MSALNativeAuthBaseState (#1915)

- Removed correlationId from state actions
- Adjusted tests accordingly

- Removed correlation id from `SignInAfterSignUpState` action method
- Fixed SwiftLint warnings
- Tidy up

Unit tests for correlation ids

Renamed MSALNativeAuthControllerFactoryRequestProviderMock to MSALNativeAuthControllerRequestProviderFactoryMock

PR comments

Made prepareMockRequest more flexible

Renamed MSALNativeAuthControllerRequestProviderFactoryMock to MSALNativeAuthControllerProtocolFactoryMock

PR Comments

Clarified where parameters are checked internally

PR comment about signInRequestProviderMock.expectedContext = contextMock

Updated end to end tests to not use correlation id's

Update submodule

Update submodule

Update submodule

New error message when device is not PSSO registered.

Hotfix 1.2.19 (#1909)

* Update release config

* point to latest main from cc

---------

Co-authored-by: Yong Zeng <zeyong@microsoft.com>

Updating MSAL framework checksum & url for 1.2.19 [skip ci]

Merge release 1220 into dev (#1934)

* Release MSAL 1.2.20 (#1930)

* Update submodule

* Update submodule

* Get token operation for BrowserCore (#1862)

* Update core.

* Update msal.

* Update core.

* update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update submodule

* Updated submodule

* Updated submodule

* Update submodule

* update submodule for current key change

* New error message when device is not PSSO registered.

* Release MSAL 1.2.20

* Align with latest main (#1933)

---------

Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>
Co-authored-by: Kai <kaisong1990@gmail.com>

* Updating MSAL framework checksum & url for 1.2.20 [skip ci]

* Update CommonCore to latest dev

---------

Co-authored-by: Veena Soman <veenasoman@microsoft.com>
Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>

- Changed submodule

* Removed all Native Auth files from iOS Static Library target (#1916)

Removed MSALLogMask.h & MSALLogMask.m from Static Libary

* Add optional delegates everywhere (keep delegates that return errors as mandatory). (#1914)

Add DelegateDispatchers to handle optional delegate methods

Add newState parameter to onSignUpResendCodeError

Add comments to clarify why the telemetry event always fails

Remove comments because this class will remain internal

Rename error methods in SignUpPasswordStartDelegate, SignUpStartDelegate, SignInPasswordStartDelegate, SignInStartDelegate and ResetPasswordStartDelegate.

Fix inline doc

Updated end to end tests to not use correlation id's

Updated End To End tests to use latest delegates

* Make errors extensible (#1923)

Fix broken tests. Add tests for public errors

PR code review

Change the `identifier` variable from String to Int. This allows us to enable the public ErrorType enums for objc developers.

Rename SignInPasswordStartError's invalidPassword to invalidCredentials

Fix failing test. Update inline documentation for isBrowserRequired error

Remove error.identifier from public interface.

Update inline doc to use "username" instead of "email".

Fixed integration tests

Renamed MockAPIURL env variable to authorityURL to work with the test case

* Don't send empty attribute list in SignUp/start (#1940)

* do not create an empty list of attributes when no attributes are available

* check that request parameter is not nil

* fix unit tests after dev merge

* Add SignInAfterResetPassword (#1932)

* - Added correlationId to MSALNativeAuthBaseState
- Removed correlationId from state actions
- Adjusted tests accordingly

- Removed correlation id from `SignInAfterSignUpState` action method
- Fixed SwiftLint warnings
- Tidy up

Unit tests for correlation ids

Renamed MSALNativeAuthControllerFactoryRequestProviderMock to MSALNativeAuthControllerRequestProviderFactoryMock

PR comments

Made prepareMockRequest more flexible

Renamed MSALNativeAuthControllerRequestProviderFactoryMock to MSALNativeAuthControllerProtocolFactoryMock

PR Comments

Clarified where parameters are checked internally

PR comment about signInRequestProviderMock.expectedContext = contextMock

Updated end to end tests to not use correlation id's

Update submodule

Update submodule

Update submodule

New error message when device is not PSSO registered.

Hotfix 1.2.19 (#1909)

* Update release config

* point to latest main from cc

---------

Co-authored-by: Yong Zeng <zeyong@microsoft.com>

Updating MSAL framework checksum & url for 1.2.19 [skip ci]

Merge release 1220 into dev (#1934)

* Release MSAL 1.2.20 (#1930)

* Update submodule

* Update submodule

* Get token operation for BrowserCore (#1862)

* Update core.

* Update msal.

* Update core.

* update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update submodule

* Updated submodule

* Updated submodule

* Update submodule

* update submodule for current key change

* New error message when device is not PSSO registered.

* Release MSAL 1.2.20

* Align with latest main (#1933)

---------

Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>
Co-authored-by: Kai <kaisong1990@gmail.com>

* Updating MSAL framework checksum & url for 1.2.20 [skip ci]

* Update CommonCore to latest dev

---------

Co-authored-by: Veena Soman <veenasoman@microsoft.com>
Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>

- Changed submodule

* Add optional delegates everywhere (keep delegates that return errors as mandatory).
Add DelegateDispatchers to handle optional delegate methods

PR code review

Add newState parameter to onSignUpResendCodeError

Add comments to clarify why the telemetry event always fails

Remove comments because this class will remain internal

PR comments

Rename error methods in SignUpPasswordStartDelegate, SignUpStartDelegate, SignInPasswordStartDelegate, SignInStartDelegate and ResetPasswordStartDelegate.

Fix inline doc

Updated end to end tests to not use correlation id's

Updated End To End tests to use latest delegates

* Make errors extensible

Fix broken tests. Add tests for public errors

PR code review

Change the `identifier` variable from String to Int. This allows us to enable the public ErrorType enums for objc developers.

Rename SignInPasswordStartError's invalidPassword to invalidCredentials

Fix failing test. Update inline documentation for isBrowserRequired error

Remove error.identifier from public interface.

Update inline doc to use "username" instead of "email".

Fixed integration tests

Renamed MockAPIURL env variable to authorityURL to work with the test case

* Add SignInAfterResetPassword

rename slt to continuation token for reset password poll complete, fix swiftlint warning

update submodules

---------

Co-authored-by: Marcos Borges <marcosborges@microsoft.com>
Co-authored-by: Danilo Raspa <daniloraspa@microsoft.com>

* Update MacOS readme webviewparameters

* Added optional password parameter to signUp/signIn methods (#1942)

* - Added optional password parameter to signUp/signIn methods
- Removed SignUpUsingPassword method from public interface
- Removed SignInUsingPassword method from public interface
- Unified SignUpPasswordStartError and SignUpStartError
- Unified SignUpPasswordStartError and SignUpStartError
- Unified SignInStartDelegate and SignInPasswordStartDelegate
- Unified SignUpStartDelegate and SignUpPasswordStartDelegate
- Unified SignInPasswordStartResult and SignInStartResult
- Unified SignUpPasswordStartResult and SignUpStartResult
- Unified SignUpPasswordStartDelegateDispatcher and SignUpStartDelegateDispatcher
- Unified SignInPasswordStartDelegateDispatcher and SignInStartDelegateDispatcher

* - Fixed unit test.

* - Fixed unit test.

* address comments, remove duplicated code, update unit tests

* delete unused public parameter classes

* unify signIn with code and password controller methods, update unit tests

* fix warnings

* unify signUp methods, update unit tests

* fix swiflint warnings

* remove unused method

* Update SignUpStartErrorTests.swift

* Update SignUpStartErrorTests.swift

---------

Co-authored-by: Danilo Raspa <daniloraspa@microsoft.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>

* Capitalised logs, added context where missing, clarified them

* PR comments

* Rename all tokens to continuation token (#1963)

* rename various tokens to continuation token

* rename some other tokens to continuation token

* fix integration test

* rename some more vars to continuation token

* remove not needed coding keys and rename tokens

* rename internal variable to avoid shadowing

* Update api errors (#1943)

* Update api errors

* PR comments. Remove invalid_grant error handling from signin/initiate

* Updated common core submodule

* Reuse MSAL initialised cache for Native Auth flows (#1958)

* Reuse MSAL initialised cache for Native Auth flows

* Added test for cacheAccessor to public client application test (and related changes)

* Reuse existing MSALNativeAuthCacheAccessorMock in tests

* Add documentation needed for NativeAuth (#1968)

* - Added documentation for all public classes, methods, enums and properties
- Renamed MSALNativeAuthRequiredAttributes to MSALNativeAuthRequiredAttribute as it's a singular object rather than multiple ones

* PR comments

* PR  comments

* PR comments

* Changed MSALNativeAuthErrorBasicAttributes to MSALNativeAuthErrorBasicAttribute

* Reverted changes to MSALNativeAuthErrorBasicAttributes and MSALNativeAuthRequiredAttributes

* Reverted more things

* Revert project.pbxproj

* Reverted MSALNativeAuthRequiredAttributesOptions to MSALNativeAuthRequiredAttributeOptions

* Reverted MSALNativeAuthRequiredAttributesOptions

* PR comments

* Renamed MSALNativeAuthErrorBasicAttributes to MSALNativeAuthErrorBasicAttribute (#1971)

Renamed MSALNativeAuthRequiredAttributes to MSALNativeAuthRequiredAttribute
Renamed MSALNativeAuthRequiredAttributesInternal to MSALNativeAuthRequiredAttributeInternal

* Print warning on console if URL scheme is not configured (#1970)

* Updated public initializers of MSALNativeAuthPublicClientApplication to output a message when redirectUri is not set

* Use MSALLogger instead of print to display warning about redirectUri not set

* Rename invalid client to unauthorized client (#1972)

* Renamed invalidClient to unauthorizedClient

* Added back the skipping of the test

* Renamed all internal invalidClient references to unauthorizedClient except for the /token endpoint

* Added unauthorizedClient to responses from MockAPI

* Skipping unauthorizedClient as the response is not yet implemented

* Support dual headed acount hint in broker

* Updated variable name

* Fixed indent

* When SDK receives an unexpected Error type, the error description is returned to the developer (#1974)

* -Allowed decoding of errors even if the type is cannot be decoded
-Made the API message to be sent back all the way to the developer

Fixed failing unit tests

PR Comments

PR comments

changed invalidServerResponse to unexpectedError

* Add errorDescription check to SignInDelegateSpy for passwordError

* PR comments

* PR comments

---------

Co-authored-by: Diego Jerez <diegoje@microsoft.com>

* Update CommonCore submodule to latest (#1983)

* Update CommonCore submodule to latest

* dummy chang to trigger pipelines

* Added SSO ext property

* Renamed dual headed param

* Added privacy manifest

* mark MSAL-ObjC-CIAM team as owner of the modulemap file (#1987)

* Latest version of build_docs.sh (#1973)

* Read correlationId from server on 2xx and 4xx responses. Add correlationId and errorCodes to public errors. (#1981)

* Read correlationId from server on 2xx and 4xx responses. Add correlationId and errorCodes to sign-up flow.

* Add check for correlationId in every test of the `toPublic...` methods.

* Use correlationId instead of MSIDRequestContext. Update tests. PR comments

* Add handling of correlationId for 2xx and 4xx responses that can't be deserialized

* Return correlationId from the controllers

* Skipping Account Validation based on request parameters

* update submodule after fixing unit tests

* Added phone number

* Fix unknown cases in Oauth2ErrorCode and SubErrorCode enums (#1994)

* Add UnknownCaseProtocol

* Remove CaseIterable from errors. Make tests more domain specific

* Make `error` property non-optional.

* Updated common core for ADBNTLMHandler PR

* updated common core after merging PR

* updated to latest dev of common core

* update submodule

* Update core. (#1975)

* Update core.

* Update core.

* Update iOS version to test on

* Update xctestrun file name

* Fix static framework - Add dedicated pod subspec for native auth code (#2019)

* Testing cocoapod

* nww file

* New podfile

* remove swift files from extension, add OBJC native auth files to all subspecs

* remove native auth header files for osx

* no need to specify native auth objC files because already included in the first include

* remove trailing spaces

---------

Co-authored-by: Silviu Petrescu <spetrescu@microsoft.com>

* update IdentityCore reference to match main branch (#2034)

* Merge MSAL main(hotfix/1.2.22) back to dev (#2033)

* Added privacy manifest

* Added phone number

* cherry picking from msal

* resolving unit test failure

* updating version numbers

* updating changelog

* updating xcode version

* adding updated common core submodule

* Updating MSAL framework checksum & url for 1.2.22 [skip ci]

---------

Co-authored-by: Olga Dalton <oldalton@microsoft.com>
Co-authored-by: Fidelia Nawar <fidelia.m589@gmail.com>
Co-authored-by: Hieu Nguyen <65981263+hieunguyenmsft@users.noreply.github.com>
Co-authored-by: Fidelia Nawar <89487029+fidelianawar@users.noreply.github.com>

* Update version to 1.3.0

* Fix automation yml

---------

Co-authored-by: Veena Soman <veenasoman@microsoft.com>
Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>
Co-authored-by: Kai <kaisong1990@gmail.com>
Co-authored-by: Marcos Borges <116104275+borgesmb@users.noreply.github.com>
Co-authored-by: Silviu Petrescu <spetrescu@microsoft.com>
Co-authored-by: Rodhan Hickey <rodhanhickey@microsoft.com>
Co-authored-by: Ameya Patil <amepatil@microsoft.com>
Co-authored-by: Diego Jerez Barroso <diegoje@microsoft.com>
Co-authored-by: Dualtagh Murray <duamurray@microsoft.com>
Co-authored-by: Silviu Petrescu <111577419+spetrescu84@users.noreply.github.com>
Co-authored-by: Diego Jerez Barroso <109726904+diegojerezba@users.noreply.github.com>
Co-authored-by: Marcos Borges <marcosborges@microsoft.com>
Co-authored-by: Olga Dalton <oldalton@microsoft.com>
Co-authored-by: Chase Hawthorne <chawt@microsoft.com>
Co-authored-by: Rodhán Hickey <110929942+rodhan-ms@users.noreply.github.com>
Co-authored-by: mipetriu <mipetriu@microsoft.com>
Co-authored-by: mipetriu <62564090+mipetriu@users.noreply.github.com>
Co-authored-by: Ameya Patil <ameyapat@buffalo.edu>
Co-authored-by: Fidelia Nawar <fidelia.m589@gmail.com>
Co-authored-by: Hieu Nguyen <65981263+hieunguyenmsft@users.noreply.github.com>
Co-authored-by: Fidelia Nawar <89487029+fidelianawar@users.noreply.github.com>
nilo-ms added a commit to AzureAD/microsoft-authentication-library-for-objc that referenced this issue Feb 27, 2024
* Added privacy manifest

* Added phone number

* cherry picking from msal

* resolving unit test failure

* updating version numbers

* updating changelog

* updating xcode version

* adding updated common core submodule

* Updating MSAL framework checksum & url for 1.2.22 [skip ci]

* use common core dev

* Release/1.3.0 (#2039)

* Update submodule

* Update submodule

* Get token operation for BrowserCore (#1862)

* Update core.

* Update msal.

* Update core.

* update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update submodule

* Updated submodule

* Updated submodule

* Update submodule

* update submodule for current key change

* New error message when device is not PSSO registered.

* Merge release 1220 into dev (#1934)

* Release MSAL 1.2.20 (#1930)

* Update submodule

* Update submodule

* Get token operation for BrowserCore (#1862)

* Update core.

* Update msal.

* Update core.

* update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update submodule

* Updated submodule

* Updated submodule

* Update submodule

* update submodule for current key change

* New error message when device is not PSSO registered.

* Release MSAL 1.2.20

* Align with latest main (#1933)

---------

Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>
Co-authored-by: Kai <kaisong1990@gmail.com>

* Updating MSAL framework checksum & url for 1.2.20 [skip ci]

* Update CommonCore to latest dev

---------

Co-authored-by: Veena Soman <veenasoman@microsoft.com>
Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>

* Native Auth features (#1911)

* check that codeLength is not nil

* Initial depth first doc comments for Sign In public interface

* Quick fixes to sign in docs

* Initial sign up doc comments

* Two small fixes

* Typos

* Just adding some fullstops

* Doc comments for getCurrentAccount and result

* Added SSPR doc comments

* Fixed doc comment for sign up

* Updated top level documentation

* Add doc comments for init methdos

* Merged PR 9103: Fix sign out e2e tests for mock API, skip for test tenant

## Proposed changes

Small PR to fix sign out e2e tests for mock API, skip for test tenant.

Now that we no longer go straight to the token endpoint when signing in with a password, we need to provide queue up the mock responses for the /initiate and /challenge endpoints too.

Also, as this flow isn't supported in the test tenant at the moment we need to skip running this if it is not a Mock API test configuration.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [X] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [X] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Fix sign out e2e tests for mock API, skip for test tenant

* Initial depth first doc comments for Sign In public interface

* Quick fixes to sign in docs

* Initial sign up doc comments

* Two small fixes

* Typos

* Just adding some fullstops

* Doc comments for getCurrentAccount and result

* Added SSPR doc comments

* Fixed doc comment for sign up

* Updated top level documentation

* Add doc comments for init methdos

* PR Comments

* PR Comments

* PR Comments

* Removed not needed configuration parameter

* Added Notes about optional delegate parameters

* Used consistent parameter groups for documentation when more than 1 parameter

* Added note and corrected error

* Changed description of `newState` parameter in docc comments

* Removed mention of text message from docc comments

* Doc comment updates

* Added some missing doc comments

* Added optional label to optional parameters in doc comments

* Updated comment

* Updated initial text in markdown about Native Auth

* PR comment

* PR comment

* Updated PCA initialiser to take clientId, tenantName and challengeTypes as parameters

* Fixed bad commit

* - Added a slice config property to MSALNativeAuthConfiguration
- Changed MSALNativeAuthRequestable default implementation to inject the slice information in an url query
- All controllers that want to point to a specific test slice need to first set the sliceConfig property (in MSALNativeAuthClientApplicationConfig) before constructing an instance of MSALNativeAuthPublicClientApplication

* Fixed capitalisation

* Fixed reference to password error delegate in code comment

* Fixed typos in doc comments

* Updated error description in doc comments

* Updated delegate description in doc comments

* Updated doc comment for account result

* Added missing doc comments for some error types

* Merged PR 9102: Add default error descriptions for all MSALNativeAuthError subclasses

## Proposed changes

This PR adds default error descriptions for all `MSALNativeAuthError` subclasses. If an error already has a non-nil `errorDescription` then that is returned, otherwise we return a string based on the `type`.

## Type of change

- [X] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Before:
![CleanShot 2023-07-14 at 07.11.10@2x.png](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_apis/git/repositories/616da9d3-8336-4562-811a-581d9a5cbe9c/pullRequests/9102/attachments/CleanShot%202023-07-14%20at%2007.11.10%402x.png)

After:
![CleanShot 2023-07-14 at 07.10.36@2x.png](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_apis/git/repositories/616da9d3-8336-4562-811a-581d9a5cbe9c/pullRequests/9102/attachments/CleanShot%202023-07-14%20at%2007.10.36%402x.png)

* - Added unit test for MSALNativeAuthRequestable default implementation

* - Using url components to construct endpoints

* Updated PCA initialiser to take clientId, tenantName and challengeTypes as parameters

* Fixed bad commit

* Removed debug code

* Fixed doc comment for new initialiser

* - Removed changes done in view controllers, since Sample App is going to use a different initialiser

* Added back redirectUri parameter

* - Fixing url component to resolve against base url

* - Added new unit test for when test slice is not used

* - Fixing merge issues

* - Fixing more merge issues

* Changing parameter from NULL to nil when constructing MSALNativeAuthPublicClientApplication in objc view controller

* make account accessible from external dev, update unit tests

* remove accountClaims and fix swift lint warnings

* update signUp integration tests

* make account a constant and remove private(set)

* call SDK signOut method when pressing signOut button

* submodule update

* Update readme

* Merged PR 9199: Update MSAL podspec to enable installation of Native Auth with Cocoapods

## Proposed changes

- Added updates to MSAL.podspec needed to compile the Swift files that were added to the project:
-- Disabled MACos build as it's outside the private preview scope
-- Added the 'HEADER_SEARCH_PATHS' => __dir__  to the pod_target_xcconfig to allow for the Pod Project to compile the modulemap
-- Added the Swift extension to the list of source files for both iOS and MacOS (app.source_files / ext.source_files)
-- Added the new MSAL Native Auth public headers to both subspecs and both platforms - "MSAL/src/native_auth/public/*.h"
- The swift files removed were still present in the folders even though they were not use inside the xcodeproj, but because Cocoapods was picking them up as Swift files, they needed to be removed.

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [x] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

To test:
- Create a new App
- Install Cocoapods
- Go to the folder of the app in terminal and execute "pod init"
- Edit the Podfile and set your pulled branch as the local path to the folder:
`pod 'MSAL' , :path => '/Users/<username>/Desktop/Projects/MSAL'` (or wherever your project is)
- Go to the folder of the app in terminal and execute "pod install"
- Import MSAL, make sure you can access the MSALNativeAuthPublicClientApplication class
- To build be sure to be on the iOS framework, not the MACos one

Related work items: #2621133

* Merged PR 9342: Fix Build for Azure Pipelines

## Proposed changes

Fix project so pipeline builds successfully
Following fixes were applied:
-Because of this [issue](https://github.com/actions/runner-images/issues/8023) where the latest MacOS 13 image uses XCode 15 with the iOS 17 beta simulator, the "latest" iPhone 14 simulator is now 17. Due to this, the build is very slow which makes multiple tests fail due to timeouts
-The iOS simulator that is now launched is the iOS 16.4 one instead of the 17 one
-The GUID used for code coverage is the one of the iOS 16.4 simulator to allow the code coverage to work properly
-Swiftlint appears to be running on all the code now, so fixed swiftlint issues on the Native Auth Sample app

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2655681

* Merged PR 9259: ResetPassword-start. Not all invalidRequest are related to "UserDoesNotHaveAPassword" error

## Proposed changes

Highlights:
- Created new custom validated error enum for resetPassword start
- update unit tests

## Type of change

- [ ] Feature work
- [X] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
We don't need to log the unexpected error codes

Related work items: #2640267

* Merged PR 9426: Include errorDescription, when available, on log message

## Proposed changes

- Whenever an error gets logged it's errorDescription should be logged rather than the description of the Object. `error.errorDescription` vs 'error.description'
- The change to the `MSALNativeAuthPublicClientApplication.swift` is due to an Swiftlint issue that doesn't get picked up by the git difference.
- The cases where an errorType or error as part of a do/try was logged didn't need change.
## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [x] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
This can be tested by replacing this function in AppDelegate.swift on the NativeAuthSampleApp and then calling an API
```
func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        MSALGlobalConfig.loggerConfig.setLogCallback {
            (level: MSALLogLevel, message: String?, containsPII: Bool) in
            // If PiiLoggingEnabled is set YES, this block will potentially contain sensitive information (Personally Identifiable Information), but not all messages will contain it.
            // containsPII == YES indicates if a particular message contains PII.
            // You might want to capture PII only in debug builds, or only if you take necessary actions to handle PII properly according to legal requirements of the region
            if let displayableMessage = message {
                if (!containsPII) {
#if DEBUG
                    // NB! This sample uses print just for testing purposes
                    // You should only ever log to NSLog in debug mode to prevent leaking potentially sensitive information
                    print(displayableMessage)
#endif
                }
            }
        }
        return true
    }
```

Related work items: #2641240

* points to latests commit on IdentityCore/ciam-master

* increase timeout cause the mac agent uses beta version simulator

* - Added two new delegates to sign up, to be triggered instead of returning errors: `onSignUpAttributesRequired` and `onSignUpAttributesInvalid`
- Parsing error responses from sign up /start and /continue endpoints
- Adjusted spies and tests accordingly

* add new otp error codes, parse error code for invalid request, add new unit tests

* Merged PR 9568: - Fix re-encoding of attributes in MSALNativeAuthSignUpRequestProvider

## Proposed changes

Describe what this PR is trying to do.

## Type of change

- [ ] Feature work
- [X] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

- Fix re-encoding of attributes in MSALNativeAuthSignUpRequestProvider

Related work items: #2670284

* Merged PR 9542: iOS - Use error description from API when available

## Proposed changes

Whenever API sends error descriptions, they should be returned to the developer integrating the SDK to better debug the issues they are facing
-Changed how errors are returned
-Changed unit tests to use the new functionality
-Added unit tests for the Enums and new functions

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [x] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2610913

* - Removed unnecessary statement in MSALNativeAuthErrorRequiredAttributes string description

* - Fixed unit testes for MSALNativeAuthErrorRequiredAttributes

* - Removed public access tp MSALNativeAuthErrorRequiredAttributes initialiser

* i Improved methods description in SignUpAttributesRequiredDelegate

* - Methods description fix

* - Removed error assertion

* - Made property "regex" of RequiredAttributeOptions access public as well

* - Moved MSALNativeAuthErrorBasicAttributes and RequiredAttributeOptions to separate files

* - Fixed file headers
- Fixed SwiftLint warnings
- Changed MSALNativeAuthSignUpContinueResponseError to use MSALNativeAuthErrorBasicAttributes instead of dictionary in unverifiedAttributes

* handle new otp error codes for signIn token endpoint result

* handle invalid request for otp error codes in signUp

* send invalid user input result instead of generic error

* - Created RequiredAttributesError to separate MSALNativeAuthErrorRequiredAttributes from the SDK's external interface

* test all error cases for invalid grant

* add new tests for invalid request-otp error codes in signUp validator class

* return invalidRequest instead of general error when invalidRequest is received

* - Added list of attributes required to SignUpVerifyCodeDelegate and SignUpPasswordRequiredDelegate

* no message

* Rename file

* Fixed white space

* Fixed attributeValidationFailed case on submitCode and submitPassword

* Grouped cases together

* Merged PR 9618: Provide username for signin with slt via SignUpController

## Proposed changes

Now we keep the username in memory between calls. I'm carrying over every call in order to avoid having state in the Controller.

I've added an integration test at the end of `MSALNativeAuthSignUpControllerTests` because although we have the E2E test for signUp, the mock api is not updated and I'm not sure if the parameter is mandatory at the moment.

Apart from the test in code, I've retested the following tests of the [Native Auth Private Preview test cases](https://microsofteur.sharepoint.com/:x:/t/DevExDublin/ESLT-SpZO7dEpuN4aLIiB9MBMPeJ94oJWIy8vFEa4Jsimg?e=enJcyV) sheet:

- Test 1 (also tried re-sending the oob code and continuing from there)
- Test 3
- Test 13
- Test 17

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2670401

* remove swiftlint warinings, copy all error fields, add new unit tests related to the changes

* Add new eSTS error for sign-up flow. However, this will need to be refactored since we shouldn't be creating API Models on our own (IMO). API Models should reflect API. I'm making this change now to avoid creating another "middle" model for the sign-up errors, which would lead to a few changes in tests. Options to solve this problem in the future would be:

1) Create a new validated error enum in the SignUpValidator
2) Perform some conversion logic from the eSTS error to our error inside the error API models via a method or computed property.

* Fix test

* Add integration test to mock api

* remove invalid and required attributes error

* update and add unit tests

* remove newState from attributesRequiredError callback. update unit and integration tests

* Add new case to handle invalidUsername error in MSALNativeAuthSignUpStartValidatedResponse

* remove invalid attributes for signUpStart error enums, use optional delegate methods

* update sample app

* remove swiftlint warnings

* update unit tests

* add new unit tests

* update log message for invalid attributes

* Merged PR 9669: Change API error invalid_client to unauthorized_client

## Proposed changes

-For SignUp Start/Challenge/Continue and SignIn Initiate/Challenge the error code for invalid_client should be changed to unauthorized_client
-For Token unauthorized_client should be added to the possible list of error codes

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [x] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
-Integration tests don't work anymore as the Mock API is not updated so they were disabled

Related work items: #2654063

* Update submodules

* Merged PR 9687: Change auth_not_supported to unsupported_auth_method

## Proposed changes

Changed auth_not_supported to unsupported_auth_method

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2673106

* update configuration file

* do not show cached user username. log accountId instead of username

* use sample placeholders as specified in the document

* rename tenantName to tenantSubdomain

* remove client id

* add default value for redirectUri and bypass redirect URI validation when needed

* Merged PR 9738: Update IdentityCore submodule

## Proposed changes

Update submodules in the project to include our [latest changes](https://identitydivision.visualstudio.com/Engineering/_git/devexdub-microsoft-authentication-library-common-for-objc/pullrequest/9737) from IdentityCore.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Update submodules

Related work items: #2643139

* add new unit test, remove unwanted characters

* Remove old sample app and rename proper sample app folder

* remove raw tenant from MSIDCIAMAuthotiry initialisation

* remove doc folder

* remove old sample app from build script and rename folder

* update build script, remove simple word from

* remove blank lines to make swiftlint happy

* Merged PR 9759: Treat InvalidClientId correctly

## Proposed changes

Because both invalid client id and invalid username API errors generate a invalidRequest error with an error code of 90100, we have to check the error_description to see why it happens
-Invalid username is now mapped to public error invalidUsername
-Invalid client id is now mapped to public error generalError but we log the client id error
## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2685134

* set correct name for attributes required method name

* remove optional methods from sample app

* Merged PR 9768: Update MSALNativeAuthServerTelemetry to include optional errors

## Proposed changes

We need to merge !9767 before merging this one.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Update MSALNativeAuthServerTelemetry to include optional errors

Related work items: #2643139

* remove empty implementation of optional methods

* update readme doc

* update readme file, add new images

* address comments

* modifications to let xcode 13.4.1 works

* update SDK version for private preview

* skip test for private preview versioning

* Merged PR 9361: Refactor controllers to enable new public interfaces

## Proposed changes

- Refactor the controllers to return a response to the public interface (and the public interface will return to the developer). This makes the task of creating public interfaces (such as async/await, combine, etc.) easier because the controller is not tightly coupled to the interface.
- Unit tests updated.

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [x] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Related work items: #2635763

* Merged PR 9843: Changes to NativeAuthSampleApp for Xcode 13.4 compatibility

## Proposed changes

Changes that remove Swift features specific to Xcode 14 to allow building NativeAuthSampleApp on Xcode 13.4.
The 2 Swift changes needed to build on Xcode 13.4 are
1. Providing initializers in if/guard statements when unwrapping optionals
2. Explicit use of "self"

The project format has been changed to "Xcode 13.0-compatible"

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

* Fix for account claims

* Made the initialiser easier to use

* Merged PR 9900: Fix Cocoapods to work with Git installations

## Proposed changes

- Fixed Cocoapods so that when users use
`pod 'MSAL', :git => "https://github.com/AzureAD/msal-objc-native-auth-preview"`
in their pod file it works as intended
- This change means the local install with path doesn't work as both relative and absolute paths can't work at the same time (there could be a configuration that we are unaware of which might make both work but the git one is more important)
-To test from ADO set
`pod 'MSAL', :git => "https://identitydivision.visualstudio.com/DefaultCollection/Engineering/_git/devexdub-microsoft-authentication-library-for-objc", :branch => "spetrescu/cocoapods-git-fix", :submodules => true
`
## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [x] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
- Changed modulemap to use Relative Path instead of Absolute
- Added modulemap file to source files so it gets downloaded as we use a private module map rather than a normal one (where all files are public)
- Split modulemap file into two modules for files that are not added to the target
- Modified unit tests to load needed modules based on requirements

Related work items: #2697240

* - Added Native Auth base classes that interact with MSAL

* - Added Native Auth network classes that interact with MSAL

* - Added unit tests

* - Added unit tests

* -Fixed unit tests
-PR Comments

* - Added Native Auth Sign Up files

* - Added Native Auth Sign In

* - Added Native Auth Password Reset files

* Merged PR 9949: [iOS SDK] Make the SDK build for Release and Profiling

## Proposed changes

Fix the build error around the `performTokenRequest` function in `MSALNativeAuthTokenController`
The linker, when optimizing for speed or size, doesn't process the function
`private func performTokenRequest(_ request: MSIDHttpRequest, context: MSIDRequestContext) async -> Result<MSIDCIAMTokenResponse, Error> {` properly.
The only workaround found so far was to move all private functions into an extension in the same file

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Created extension to circumvent undefined symbol error

Related work items: #2694846

* - Clearing cache in setup and teardown methods only (MSALNativeAuthCacheAccessorTests)
- Added full SLT naming

* Merged PR 10009: Fix imports for new MSAL private module in integration tests

## Proposed changes

Quick fix to two places in the integration tests that required the MSAL_Unit_Test_Private instead of MSAL_Private

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [X] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [X] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Fix imports for new MSAL private module in integration tests

* Merged PR 9998: [iOS SDK] Make changes to project and Cocoapods to allow building the MAC Framework

## Proposed changes

-There were no changes needed to the project as they were already done previously and MacOS MSAL framework builds properly
-The Podspec file has been changed to build properly

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
To test properly, create a XCode Project with a Mac target which uses Cocoapods
Set the Podfile as follows:
```
target 'TestAppMac' do
   pod 'MSAL', :git => "https://identitydivision.visualstudio.com/Engineering/_git/devexdub-microsoft-authentication-library-for-objc", :branch => "spetrescu/msal-mac-cocoapods", :submodules => true
end
```

Related work items: #2652866

* Merged PR 10087: [iOS SDK] Fix Sample App pipeline build

## Proposed changes

Swiftlint added a rule to check if functions that `override` only call the super, which in the end indeed does nothing.
For example:
```
override func viewDidLoad() {
        super.viewDidLoad()
    }
```
Because the sample app had 3 such functions the PR validation failed
Furthermore our PR validation script runs Swiftlint on the Native Sample App but we didn't have that so the script was added

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information
-Added swiftlint to Sample App
-Disabled warnings for Sample App

* Merged PR 10086: [IOS SDK] Remove unused getAccount function from Cache Interface

## Proposed changes

Because the function getAccount was unused as we don't have multiple accounts yet we need to remove it from the Accessor, Protocol and unit tests

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

Related work items: #2644201

* Merged PR 10133: Update position of "delegate" parameter in public interfaces for consistency

## Proposed changes

This pull request is about changing the position of the `delegate` parameter in public interface method calls, for consistency.
Modified interfaces:
- MSALNativeAuthUserAccountResult
- SignUpStates
- SignInStates
- ResetPasswordStates

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [X] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [X] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

- Changed public interface to be consistent and always have the delegate as the last parameter of method calls
- Changed sample app to reflect the changes

Related work items: #2690285

* Merged PR 10194: Fix inline documentation in public delegates

## Proposed changes

Add missing inline documentation for parameters in ResetPasswordDelegates, SignInDelegates and SignUpDelegates that were found while working [this ticket](https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2711520/).

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [x] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

----
#### AI-Generated Description
This pull request modifies three files related to the native authentication state machine delegates in MSAL. The main changes are:

- Adding parameters to some delegate methods to provide more information about the new state of the flow and the required attributes.
- Changing the error parameter type in some delegate methods to include the new state of the flow as an optional value.
- Adding some optional methods to some delegate protocols to handle different scenarios that may require a code or a password from the user.

Related work items: #2711520

* - Refactor of MSALNativeAuthResponseErrorHandler to remove duplicated code with IdetityCore

* - Added MSIDAADRequestErrorHandler to module map

* - Changed method name from "handleAPIError" to "handleCustomError" to be more concise with IdentityCore implementation.

* - Added NativeAuthCustomErrorSerializer to deal with Native Auth custom errors serialization
- Refactor of MSALNativeAuthResponseErrorHandler

* - Removed unused property

* - Changed class name to add "MSAL" prefix

* - Added a comment explaining the "throw" command in MSALNativeAuthCustomErrorSerializer method

* Merged PR 10303: Ciam Master updated to MSAL 1.2.18

## Proposed changes

Update with MSAL 1.2.18 from GitHub

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [X] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [X] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

----
#### AI-Generated Description
This pull request updates the MSAL library for iOS and Mac to version 1.2.18. The main changes are:

- Fixed duplicate values for error JIT codes (#1893)
- Added ccs request id header (#1844)
- Added separate error code for OneAuth telemetry purpose (common core #1292)
- Exposed APIs for manually setting time_Interval for request and session resource (#1288)
- Updated the iOS simulator device and OS version for testing
- Updated the Package.swift and MSAL.podspec files with the new version number
- Fixed some linting and code coverage issues

Related work items: #2726861

* Merged PR 10343: [iOS SDK] SignUp error API responses are parsed to general SDK error

## Proposed changes

Problem:
MSALNativeAuthResponseErrorHandler was changed during merging to use the responseSerializer passed into the handleError function resulting in the incorrect serializer parsing API response errors.

Solution:
Always use MSALNativeAuthCustomErrorSerializer<T> as the responseSerializer to ensure API errors are parsed as expected.

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

## Additional information

----
#### AI-Generated Description
This pull request adds a new unit test case for the MSALNativeAuthResponseErrorHandler class, which handles errors from native auth requests. The test case checks that the error handler uses the correct response serializer when the status code is 400 and the error is verification_required. The pull request also modifies the error handler to always use the MSALNativeAuthCustomErrorSerializer instead of the response serializer passed as an argument.

Related work items: #2727783

* PR comments

* Files changed/removed during private preview
Removed documentation for NativeAuth
Removed NativeAuthSampleApp

* - Restored changes based on code review

* - Removed extra space

* - Restored original README.md

* Spacing on Pr-Validation.yml

* Changed Mock API url

* Switched to Environment variable

* - Created cgmanifest.json file to add SwiftLint to component governance verification

* - Updated CODEOWNERS file to give AppleCIAMTeam onwnership over Native Auth code.

* - Updated description

* - Changed CIAM team

* - Fixed text description

* Removed MSALNativeAuthInternalChallengeType.swift from being added twice to the Project

---------

Co-authored-by: Danilo Raspa <daniloraspa@microsoft.com>
Co-authored-by: Silviu Petrescu <spetrescu@microsoft.com>
Co-authored-by: Rodhan Hickey <rodhanhickey@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Ameya <>
Co-authored-by: Ameya Patil <amepatil@microsoft.com>
Co-authored-by: Diego Jerez Barroso <diegoje@microsoft.com>
Co-authored-by: Dualtagh Murray <duamurray@microsoft.com>
Co-authored-by: Danilo Raspa <105228698+nilo-ms@users.noreply.github.com>

* Add co-ownership of MSAL project file

* Check if attributes are parsable to JSON before to parse

* - Added correlationId to MSALNativeAuthBaseState (#1915)

- Removed correlationId from state actions
- Adjusted tests accordingly

- Removed correlation id from `SignInAfterSignUpState` action method
- Fixed SwiftLint warnings
- Tidy up

Unit tests for correlation ids

Renamed MSALNativeAuthControllerFactoryRequestProviderMock to MSALNativeAuthControllerRequestProviderFactoryMock

PR comments

Made prepareMockRequest more flexible

Renamed MSALNativeAuthControllerRequestProviderFactoryMock to MSALNativeAuthControllerProtocolFactoryMock

PR Comments

Clarified where parameters are checked internally

PR comment about signInRequestProviderMock.expectedContext = contextMock

Updated end to end tests to not use correlation id's

Update submodule

Update submodule

Update submodule

New error message when device is not PSSO registered.

Hotfix 1.2.19 (#1909)

* Update release config

* point to latest main from cc

---------

Co-authored-by: Yong Zeng <zeyong@microsoft.com>

Updating MSAL framework checksum & url for 1.2.19 [skip ci]

Merge release 1220 into dev (#1934)

* Release MSAL 1.2.20 (#1930)

* Update submodule

* Update submodule

* Get token operation for BrowserCore (#1862)

* Update core.

* Update msal.

* Update core.

* update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update submodule

* Updated submodule

* Updated submodule

* Update submodule

* update submodule for current key change

* New error message when device is not PSSO registered.

* Release MSAL 1.2.20

* Align with latest main (#1933)

---------

Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>
Co-authored-by: Kai <kaisong1990@gmail.com>

* Updating MSAL framework checksum & url for 1.2.20 [skip ci]

* Update CommonCore to latest dev

---------

Co-authored-by: Veena Soman <veenasoman@microsoft.com>
Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>

- Changed submodule

* Removed all Native Auth files from iOS Static Library target (#1916)

Removed MSALLogMask.h & MSALLogMask.m from Static Libary

* Add optional delegates everywhere (keep delegates that return errors as mandatory). (#1914)

Add DelegateDispatchers to handle optional delegate methods

Add newState parameter to onSignUpResendCodeError

Add comments to clarify why the telemetry event always fails

Remove comments because this class will remain internal

Rename error methods in SignUpPasswordStartDelegate, SignUpStartDelegate, SignInPasswordStartDelegate, SignInStartDelegate and ResetPasswordStartDelegate.

Fix inline doc

Updated end to end tests to not use correlation id's

Updated End To End tests to use latest delegates

* Make errors extensible (#1923)

Fix broken tests. Add tests for public errors

PR code review

Change the `identifier` variable from String to Int. This allows us to enable the public ErrorType enums for objc developers.

Rename SignInPasswordStartError's invalidPassword to invalidCredentials

Fix failing test. Update inline documentation for isBrowserRequired error

Remove error.identifier from public interface.

Update inline doc to use "username" instead of "email".

Fixed integration tests

Renamed MockAPIURL env variable to authorityURL to work with the test case

* Don't send empty attribute list in SignUp/start (#1940)

* do not create an empty list of attributes when no attributes are available

* check that request parameter is not nil

* fix unit tests after dev merge

* Add SignInAfterResetPassword (#1932)

* - Added correlationId to MSALNativeAuthBaseState
- Removed correlationId from state actions
- Adjusted tests accordingly

- Removed correlation id from `SignInAfterSignUpState` action method
- Fixed SwiftLint warnings
- Tidy up

Unit tests for correlation ids

Renamed MSALNativeAuthControllerFactoryRequestProviderMock to MSALNativeAuthControllerRequestProviderFactoryMock

PR comments

Made prepareMockRequest more flexible

Renamed MSALNativeAuthControllerRequestProviderFactoryMock to MSALNativeAuthControllerProtocolFactoryMock

PR Comments

Clarified where parameters are checked internally

PR comment about signInRequestProviderMock.expectedContext = contextMock

Updated end to end tests to not use correlation id's

Update submodule

Update submodule

Update submodule

New error message when device is not PSSO registered.

Hotfix 1.2.19 (#1909)

* Update release config

* point to latest main from cc

---------

Co-authored-by: Yong Zeng <zeyong@microsoft.com>

Updating MSAL framework checksum & url for 1.2.19 [skip ci]

Merge release 1220 into dev (#1934)

* Release MSAL 1.2.20 (#1930)

* Update submodule

* Update submodule

* Get token operation for BrowserCore (#1862)

* Update core.

* Update msal.

* Update core.

* update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update core.

* Update submodule

* Updated submodule

* Updated submodule

* Update submodule

* update submodule for current key change

* New error message when device is not PSSO registered.

* Release MSAL 1.2.20

* Align with latest main (#1933)

---------

Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>
Co-authored-by: Kai <kaisong1990@gmail.com>

* Updating MSAL framework checksum & url for 1.2.20 [skip ci]

* Update CommonCore to latest dev

---------

Co-authored-by: Veena Soman <veenasoman@microsoft.com>
Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>

- Changed submodule

* Add optional delegates everywhere (keep delegates that return errors as mandatory).
Add DelegateDispatchers to handle optional delegate methods

PR code review

Add newState parameter to onSignUpResendCodeError

Add comments to clarify why the telemetry event always fails

Remove comments because this class will remain internal

PR comments

Rename error methods in SignUpPasswordStartDelegate, SignUpStartDelegate, SignInPasswordStartDelegate, SignInStartDelegate and ResetPasswordStartDelegate.

Fix inline doc

Updated end to end tests to not use correlation id's

Updated End To End tests to use latest delegates

* Make errors extensible

Fix broken tests. Add tests for public errors

PR code review

Change the `identifier` variable from String to Int. This allows us to enable the public ErrorType enums for objc developers.

Rename SignInPasswordStartError's invalidPassword to invalidCredentials

Fix failing test. Update inline documentation for isBrowserRequired error

Remove error.identifier from public interface.

Update inline doc to use "username" instead of "email".

Fixed integration tests

Renamed MockAPIURL env variable to authorityURL to work with the test case

* Add SignInAfterResetPassword

rename slt to continuation token for reset password poll complete, fix swiftlint warning

update submodules

---------

Co-authored-by: Marcos Borges <marcosborges@microsoft.com>
Co-authored-by: Danilo Raspa <daniloraspa@microsoft.com>

* Update MacOS readme webviewparameters

* Added optional password parameter to signUp/signIn methods (#1942)

* - Added optional password parameter to signUp/signIn methods
- Removed SignUpUsingPassword method from public interface
- Removed SignInUsingPassword method from public interface
- Unified SignUpPasswordStartError and SignUpStartError
- Unified SignUpPasswordStartError and SignUpStartError
- Unified SignInStartDelegate and SignInPasswordStartDelegate
- Unified SignUpStartDelegate and SignUpPasswordStartDelegate
- Unified SignInPasswordStartResult and SignInStartResult
- Unified SignUpPasswordStartResult and SignUpStartResult
- Unified SignUpPasswordStartDelegateDispatcher and SignUpStartDelegateDispatcher
- Unified SignInPasswordStartDelegateDispatcher and SignInStartDelegateDispatcher

* - Fixed unit test.

* - Fixed unit test.

* address comments, remove duplicated code, update unit tests

* delete unused public parameter classes

* unify signIn with code and password controller methods, update unit tests

* fix warnings

* unify signUp methods, update unit tests

* fix swiflint warnings

* remove unused method

* Update SignUpStartErrorTests.swift

* Update SignUpStartErrorTests.swift

---------

Co-authored-by: Danilo Raspa <daniloraspa@microsoft.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>

* Capitalised logs, added context where missing, clarified them

* PR comments

* Rename all tokens to continuation token (#1963)

* rename various tokens to continuation token

* rename some other tokens to continuation token

* fix integration test

* rename some more vars to continuation token

* remove not needed coding keys and rename tokens

* rename internal variable to avoid shadowing

* Update api errors (#1943)

* Update api errors

* PR comments. Remove invalid_grant error handling from signin/initiate

* Updated common core submodule

* Reuse MSAL initialised cache for Native Auth flows (#1958)

* Reuse MSAL initialised cache for Native Auth flows

* Added test for cacheAccessor to public client application test (and related changes)

* Reuse existing MSALNativeAuthCacheAccessorMock in tests

* Add documentation needed for NativeAuth (#1968)

* - Added documentation for all public classes, methods, enums and properties
- Renamed MSALNativeAuthRequiredAttributes to MSALNativeAuthRequiredAttribute as it's a singular object rather than multiple ones

* PR comments

* PR  comments

* PR comments

* Changed MSALNativeAuthErrorBasicAttributes to MSALNativeAuthErrorBasicAttribute

* Reverted changes to MSALNativeAuthErrorBasicAttributes and MSALNativeAuthRequiredAttributes

* Reverted more things

* Revert project.pbxproj

* Reverted MSALNativeAuthRequiredAttributesOptions to MSALNativeAuthRequiredAttributeOptions

* Reverted MSALNativeAuthRequiredAttributesOptions

* PR comments

* Renamed MSALNativeAuthErrorBasicAttributes to MSALNativeAuthErrorBasicAttribute (#1971)

Renamed MSALNativeAuthRequiredAttributes to MSALNativeAuthRequiredAttribute
Renamed MSALNativeAuthRequiredAttributesInternal to MSALNativeAuthRequiredAttributeInternal

* Print warning on console if URL scheme is not configured (#1970)

* Updated public initializers of MSALNativeAuthPublicClientApplication to output a message when redirectUri is not set

* Use MSALLogger instead of print to display warning about redirectUri not set

* Rename invalid client to unauthorized client (#1972)

* Renamed invalidClient to unauthorizedClient

* Added back the skipping of the test

* Renamed all internal invalidClient references to unauthorizedClient except for the /token endpoint

* Added unauthorizedClient to responses from MockAPI

* Skipping unauthorizedClient as the response is not yet implemented

* Support dual headed acount hint in broker

* Updated variable name

* Fixed indent

* When SDK receives an unexpected Error type, the error description is returned to the developer (#1974)

* -Allowed decoding of errors even if the type is cannot be decoded
-Made the API message to be sent back all the way to the developer

Fixed failing unit tests

PR Comments

PR comments

changed invalidServerResponse to unexpectedError

* Add errorDescription check to SignInDelegateSpy for passwordError

* PR comments

* PR comments

---------

Co-authored-by: Diego Jerez <diegoje@microsoft.com>

* Update CommonCore submodule to latest (#1983)

* Update CommonCore submodule to latest

* dummy chang to trigger pipelines

* Added SSO ext property

* Renamed dual headed param

* Added privacy manifest

* mark MSAL-ObjC-CIAM team as owner of the modulemap file (#1987)

* Latest version of build_docs.sh (#1973)

* Read correlationId from server on 2xx and 4xx responses. Add correlationId and errorCodes to public errors. (#1981)

* Read correlationId from server on 2xx and 4xx responses. Add correlationId and errorCodes to sign-up flow.

* Add check for correlationId in every test of the `toPublic...` methods.

* Use correlationId instead of MSIDRequestContext. Update tests. PR comments

* Add handling of correlationId for 2xx and 4xx responses that can't be deserialized

* Return correlationId from the controllers

* Skipping Account Validation based on request parameters

* update submodule after fixing unit tests

* Added phone number

* Fix unknown cases in Oauth2ErrorCode and SubErrorCode enums (#1994)

* Add UnknownCaseProtocol

* Remove CaseIterable from errors. Make tests more domain specific

* Make `error` property non-optional.

* Updated common core for ADBNTLMHandler PR

* updated common core after merging PR

* updated to latest dev of common core

* update submodule

* Update core. (#1975)

* Update core.

* Update core.

* Update iOS version to test on

* Update xctestrun file name

* Fix static framework - Add dedicated pod subspec for native auth code (#2019)

* Testing cocoapod

* nww file

* New podfile

* remove swift files from extension, add OBJC native auth files to all subspecs

* remove native auth header files for osx

* no need to specify native auth objC files because already included in the first include

* remove trailing spaces

---------

Co-authored-by: Silviu Petrescu <spetrescu@microsoft.com>

* update IdentityCore reference to match main branch (#2034)

* Merge MSAL main(hotfix/1.2.22) back to dev (#2033)

* Added privacy manifest

* Added phone number

* cherry picking from msal

* resolving unit test failure

* updating version numbers

* updating changelog

* updating xcode version

* adding updated common core submodule

* Updating MSAL framework checksum & url for 1.2.22 [skip ci]

---------

Co-authored-by: Olga Dalton <oldalton@microsoft.com>
Co-authored-by: Fidelia Nawar <fidelia.m589@gmail.com>
Co-authored-by: Hieu Nguyen <65981263+hieunguyenmsft@users.noreply.github.com>
Co-authored-by: Fidelia Nawar <89487029+fidelianawar@users.noreply.github.com>

* Update version to 1.3.0

* Fix automation yml

---------

Co-authored-by: Veena Soman <veenasoman@microsoft.com>
Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>
Co-authored-by: Kai <kaisong1990@gmail.com>
Co-authored-by: Marcos Borges <116104275+borgesmb@users.noreply.github.com>
Co-authored-by: Silviu Petrescu <spetrescu@microsoft.com>
Co-authored-by: Rodhan Hickey <rodhanhickey@microsoft.com>
Co-authored-by: Ameya Patil <amepatil@microsoft.com>
Co-authored-by: Diego Jerez Barroso <diegoje@microsoft.com>
Co-authored-by: Dualtagh Murray <duamurray@microsoft.com>
Co-authored-by: Silviu Petrescu <111577419+spetrescu84@users.noreply.github.com>
Co-authored-by: Diego Jerez Barroso <109726904+diegojerezba@users.noreply.github.com>
Co-authored-by: Marcos Borges <marcosborges@microsoft.com>
Co-authored-by: Olga Dalton <oldalton@microsoft.com>
Co-authored-by: Chase Hawthorne <chawt@microsoft.com>
Co-authored-by: Rodhán Hickey <110929942+rodhan-ms@users.noreply.github.com>
Co-authored-by: mipetriu <mipetriu@microsoft.com>
Co-authored-by: mipetriu <62564090+mipetriu@users.noreply.github.com>
Co-authored-by: Ameya Patil <ameyapat@buffalo.edu>
Co-authored-by: Fidelia Nawar <fidelia.m589@gmail.com>
Co-authored-by: Hieu Nguyen <65981263+hieunguyenmsft@users.noreply.github.com>
Co-authored-by: Fidelia Nawar <89487029+fidelianawar@users.noreply.github.com>

* Updating MSAL framework checksum & url for 1.3.0 [skip ci]

---------

Co-authored-by: Olga Dalton <oldalton@microsoft.com>
Co-authored-by: Fidelia Nawar <fidelia.m589@gmail.com>
Co-authored-by: Hieu Nguyen <65981263+hieunguyenmsft@users.noreply.github.com>
Co-authored-by: Fidelia Nawar <89487029+fidelianawar@users.noreply.github.com>
Co-authored-by: Hieu Nguyen <hiengu@microsoft.com>
Co-authored-by: Veena Soman <veenasoman@microsoft.com>
Co-authored-by: Juan Arias Roldan <1686668+juan-arias@users.noreply.github.com>
Co-authored-by: Sergei Demchenko <sedemche@microsoft.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Juan Arias <juan-arias@users.noreply.github.com>
Co-authored-by: Kai <kaisong1990@gmail.com>
Co-authored-by: Marcos Borges <116104275+borgesmb@users.noreply.github.com>
Co-authored-by: Silviu Petrescu <spetrescu@microsoft.com>
Co-authored-by: Rodhan Hickey <rodhanhickey@microsoft.com>
Co-authored-by: Ameya Patil <amepatil@microsoft.com>
Co-authored-by: Diego Jerez Barroso <diegoje@microsoft.com>
Co-authored-by: Dualtagh Murray <duamurray@microsoft.com>
Co-authored-by: Silviu Petrescu <111577419+spetrescu84@users.noreply.github.com>
Co-authored-by: Diego Jerez Barroso <109726904+diegojerezba@users.noreply.github.com>
Co-authored-by: Marcos Borges <marcosborges@microsoft.com>
Co-authored-by: Chase Hawthorne <chawt@microsoft.com>
Co-authored-by: Rodhán Hickey <110929942+rodhan-ms@users.noreply.github.com>
Co-authored-by: mipetriu <mipetriu@microsoft.com>
Co-authored-by: mipetriu <62564090+mipetriu@users.noreply.github.com>
Co-authored-by: Ameya Patil <ameyapat@buffalo.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests