[Major][Engg]: Update min ios and Xcode versions#2918
Conversation
Update Xcode project settings to raise the iOS minimum deployment target to 17.0 across MSAL and sample apps. Also remove explicit ENABLE_BITCODE = NO entries where present. Files updated: MSAL/MSAL.xcodeproj/project.pbxproj, Samples/ios/SampleApp/SampleAppiOS.xcodeproj/project.pbxproj, and Samples/ios/SampleAppiOS-Swift/SampleAppiOS-Swift.xcodeproj/project.pbxproj to align targets and clean up deprecated bitcode flags.
Increase iOS deployment target to 17.0 (MSAL.podspec and Package.swift) and update Azure Pipelines to use macos-latest images and Xcode_26.3. Adjust simulator destinations to iPhone 17 Pro Max and update xcode-select invocations across automation, broker_submodule_check, pr-validation, tests-with-conf-file, and visionos-validation pipeline files to align CI with the newer Xcode/macOS environment.
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s minimum iOS deployment target and attempts to align CI/build tooling to newer Apple toolchain settings across MSAL, distribution manifests (SPM/CocoaPods), sample apps, and Azure Pipelines.
Changes:
- Bump
IPHONEOS_DEPLOYMENT_TARGETto iOS 17.0 across MSAL and sample Xcode projects. - Update distribution minimums (SPM
Package.swift, CocoaPodsMSAL.podspec) to iOS 17.0. - Adjust Azure Pipelines to use
macos-latest, switch to a newer Xcode selection, and update iOS simulator destinations.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Samples/ios/SampleAppiOS-Swift/SampleAppiOS-Swift.xcodeproj/project.pbxproj | Raises sample Swift app deployment target(s) to iOS 17.0. |
| Samples/ios/SampleApp/SampleAppiOS.xcodeproj/project.pbxproj | Raises sample ObjC app deployment target(s) to iOS 17.0. |
| Package.swift | Updates SPM platform minimum to iOS 17 (and keeps macOS/visionOS entries). |
| MSAL/MSAL.xcodeproj/project.pbxproj | Raises MSAL iOS deployment target(s) to 17.0 and removes explicit Bitcode settings. |
| MSAL.podspec | Raises CocoaPods iOS deployment target to 17.0. |
| azure_pipelines/visionos-validation.yml | Switches pool image to macos-latest and updates Xcode selection in visionOS validation jobs. |
| azure_pipelines/templates/tests-with-conf-file.yml | Updates Xcode selection used by automation test template. |
| azure_pipelines/pr-validation.yml | Switches pool image to macos-latest, updates Xcode selection, and changes iOS simulator destination used for E2E runs. |
| azure_pipelines/broker_submodule_check.yml | Switches pool image to macos-latest and updates Xcode selection. |
| azure_pipelines/automation.yml | Switches pool image to macos-latest and changes iOS simulator destination used for scheduled automation runs. |
Update Azure Pipelines YAML to select Xcode 26.3 and create a stable /Applications/Xcode.app symlink. Replaces the single-line '/bin/bash -c' invocations with multiline script blocks and adds `sudo ln -sfn /Applications/Xcode_26.3.app /Applications/Xcode.app` to ensure CI tools reference the intended Xcode installation. Modified files: broker_submodule_check.yml, pr-validation.yml, templates/tests-with-conf-file.yml, visionos-validation.yml.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Add a Bash step to locate the generated .xctestrun in build/Build/Products, set XCTESTRUN_PATH as a pipeline variable, and fail with a clear error if none is found. Replace hardcoded full_path parameters in automation and pr-validation pipelines with the discovered $(XCTESTRUN_PATH) so xcodebuild uses the dynamically found file. This removes brittle, machine-specific xctestrun paths and improves pipeline resilience.
Update simulator device and OS version used for tests. Modified azure_pipelines/automation.yml and azure_pipelines/pr-validation.yml to include OS=26.2 in the simulator -destination, and updated build.py simulator constants (device type, exact name, and destination string) to match iPhone 17 Pro Max (26.2). This aligns CI and local build scripts to run against the same simulator version.
Broaden and harden .xctestrun discovery in the Azure Pipelines test template: print search results, search the entire build tree for .xctestrun files, and provide clearer error logging and recursive listing when none are found. Also update the SPM integration test xcodebuild destination to an iPhone 17 Pro Max with iOS 26.2 to use the newer simulator configuration.
Update Azure Pipelines to use macOS-26.3.0 instead of macos-latest across pipeline files. Provide explicit full_path parameters for generated .xctestrun files in automation and PR validation jobs and use that parameter in the tests-with-conf-file template instead of dynamically discovering the file. Improve the xcodebuild step by enabling pipefail and redirecting stderr to tee|xcpretty for better logging, and remove the separate discovery step. Files updated: azure_pipelines/{automation.yml,broker_submodule_check.yml,pr-validation.yml,visionos-validation.yml,templates/tests-with-conf-file.yml}.
Replace explicit 'macOS-26.3.0' vmImage with the generic 'macOS-26' across Azure Pipeline YAMLs. Updated azure_pipelines/automation.yml, broker_submodule_check.yml, pr-validation.yml, and visionos-validation.yml to standardize the macOS agent image reference.
Replace occurrences of 'macOS-26' with 'macos-26' in Azure Pipelines YAML files to ensure consistent VM image identifiers and avoid potential agent pool lookup issues. Changes applied to azure_pipelines/automation.yml, broker_submodule_check.yml, pr-validation.yml, and visionos-validation.yml.
Drop ,OS=26.2 from test destinations in automation.yml, pr-validation.yml, and build.py so Xcode uses the latest available runtime for the device. This avoids CI breakage when agent images update simulator runtimes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
iPhone 17 Pro Max requires macOS 26 runtimes which aren't available on macos-15 CI agents. Switch to iPhone 16 Pro Max and remove hardcoded OS version from device_exact_name so device_guids.py dynamically finds the latest available runtime. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- build.py: query xcrun simctl for the latest available iPhone simulator at runtime, fall back to iPhone 16 Pro Max - tests-with-conf-file.yml: add 'Detect iOS simulator' step that sets SIM_DEVICE pipeline variable from available simulators - automation.yml, pr-validation.yml: use $(SIM_DEVICE) instead of hardcoded device name in test destinations This prevents CI breakage when agent images add/remove simulator runtimes or device types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align spm-integration-test.sh with the rest of CI: use iPhone 16 Pro Max (available on macos-15) and drop OS=26.2 so Xcode picks the latest runtime. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use xcodebuild -showdestinations to find a valid iPhone simulator from the actual workspace, rather than parsing simctl output which can return devices not compatible with the scheme's deployment target. Falls back to 'Any iOS Simulator Device' if no iPhone is found. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The previous detection picked iPhone SE which is incompatible with the scheme's deployment target. Now prefers Pro Max > Pro > any non-SE iPhone. Reverted build.py and spm-integration-test.sh back to iPhone 17 Pro Max since it's confirmed available on the macos-15 CI agent. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The previous sed 's/(.*//' stripped parenthetical parts of device names like '(3rd generation)' from 'iPhone SE (3rd generation)', producing bare 'iPhone SE' which doesn't exist. Now strips only UUID and status parentheticals, preserving name suffixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Agents with multiple iOS runtimes can have the same device name across runtimes, causing 'multiple destinations match' failures. - tests-with-conf-file.yml: detect step now parses simctl JSON to extract the UDID of the latest runtime for iPhone 17 Pro Max, sets SIM_DESTINATION with id=<udid> for unique targeting - build.py: get_latest_iphone_simulator() returns (name, udid), builds destination with id=<udid> when available - automation.yml, pr-validation.yml: pass $(SIM_DESTINATION) as the full destination string instead of building from name Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ction - CHANGELOG.md: mention both iOS 17.0 and macOS 14.0 minimum versions - tests-with-conf-file.yml: fix Python indentation (was IndentationError), replace broken sed-based fallback with JSON-based UDID lookup, redirect python3 stderr to /dev/null for clean output Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…stall, improve simctl error handling - spm-integration-test.sh: resolve simulator UDID dynamically instead of name-only destination - broker_submodule_check.yml: remove xcbeautify install (broker's build.py handles its own formatting) - build.py: check simctl returncode and log stderr on failure Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Xcode 26.3 treats 'const int' as a VLA size with -Werror. Replace with #define kBufferLength so the array size is a compile-time constant. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| #define kBufferLength 16 | ||
| const int lastIndex = kBufferLength - 1; | ||
| const int bitsInByte = 8; | ||
| char buffer[16]; | ||
| char buffer[kBufferLength]; |
There was a problem hiding this comment.
kBufferLength is introduced via #define inside the method body. Preprocessor macros are file-scoped (not block-scoped), can unintentionally affect the rest of the file, and are harder to debug than a typed constant. Recommendation: replace the macro with a local const/static const typed constant (e.g., const NSUInteger bufferLength = 16;) and use that for the array size and NSMutableData length.
Summary
Raises the minimum deployment targets to iOS 17.0 and macOS 14.0 for MSAL, updates all CI pipelines to use Xcode 26.3 on macos-15, and adds dynamic simulator detection for resilient CI.
Deployment Target Updates
iOS → 17.0
MSAL.xcodeproj: AllIPHONEOS_DEPLOYMENT_TARGET→17.0MSAL.podspec:s.ios.deployment_target→"17.0"Package.swift:.iOS(.v17)SampleAppiOS,SampleAppiOS-Swift) updated to matchENABLE_BITCODE = NOentriesmacOS → 14.0
MSAL.xcodeproj: AllMACOSX_DEPLOYMENT_TARGETvalues below 14.0 bumped to14.0. Targets at 14.4 left unchanged.MSAL.podspec:s.osx.deployment_target→"14.0"Package.swift:.macOS(.v14)CI Pipeline Updates (Xcode 26.3 on macos-15)
pr-validation.yml,automation.yml,visionos-validation.yml:vmImage→macos-15, xcode-select →Xcode_26.3broker_submodule_check.yml: Updated tomacos-15/Xcode 26.3, timeout increased to 120 min, switched from xcpretty to xcbeautifybuild.py: Simulator dynamically resolved viasimctlJSON, uses UDID-based destination (id=<udid>) for unambiguous targeting; falls back to name-based destinationspm-integration-test.sh: Updated simulator device, removed pinned OS versionDynamic Simulator Detection
tests-with-conf-file.yml: Added "Detect iOS simulator" step that queriessimctlJSON to find the UDID of the latestiPhone 17 Pro Maxruntime, sets$(SIM_DESTINATION)withid=<udid>for unique targetingautomation.yml,pr-validation.yml: Pass$(SIM_DESTINATION)as the full destination stringType of change
Risk
Additional information