Skip to content

[Major][Engg]: Update min ios and Xcode versions#2918

Open
josephpab wants to merge 38 commits into
devfrom
josephpab/minVersionBump
Open

[Major][Engg]: Update min ios and Xcode versions#2918
josephpab wants to merge 38 commits into
devfrom
josephpab/minVersionBump

Conversation

@josephpab
Copy link
Copy Markdown
Contributor

@josephpab josephpab commented Apr 1, 2026

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: All IPHONEOS_DEPLOYMENT_TARGET17.0
  • MSAL.podspec: s.ios.deployment_target"17.0"
  • Package.swift: .iOS(.v17)
  • Sample app projects (SampleAppiOS, SampleAppiOS-Swift) updated to match
  • Removed deprecated ENABLE_BITCODE = NO entries

macOS → 14.0

  • MSAL.xcodeproj: All MACOSX_DEPLOYMENT_TARGET values below 14.0 bumped to 14.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: vmImagemacos-15, xcode-select → Xcode_26.3
  • broker_submodule_check.yml: Updated to macos-15/Xcode 26.3, timeout increased to 120 min, switched from xcpretty to xcbeautify
  • build.py: Simulator dynamically resolved via simctl JSON, uses UDID-based destination (id=<udid>) for unambiguous targeting; falls back to name-based destination
  • spm-integration-test.sh: Updated simulator device, removed pinned OS version

Dynamic Simulator Detection

  • tests-with-conf-file.yml: Added "Detect iOS simulator" step that queries simctl JSON to find the UDID of the latest iPhone 17 Pro Max runtime, sets $(SIM_DESTINATION) with id=<udid> for unique targeting
  • automation.yml, pr-validation.yml: Pass $(SIM_DESTINATION) as the full destination string
  • Fallback to name-based destination if UDID detection fails
  • Prevents "multiple destinations match" failures on agents with multiple iOS runtimes

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)
  • Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Additional information

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.
Copilot AI review requested due to automatic review settings April 1, 2026 18:53
@josephpab josephpab requested review from a team as code owners April 1, 2026 18:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_TARGET to iOS 17.0 across MSAL and sample Xcode projects.
  • Update distribution minimums (SPM Package.swift, CocoaPods MSAL.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.

Comment thread azure_pipelines/pr-validation.yml Outdated
Comment thread azure_pipelines/automation.yml
Comment thread azure_pipelines/automation.yml
Comment thread MSAL.podspec Outdated
Comment thread Package.swift Outdated
Comment thread Package.swift Outdated
Comment thread MSAL/MSAL.xcodeproj/project.pbxproj
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.
Copilot AI review requested due to automatic review settings April 1, 2026 21:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread azure_pipelines/pr-validation.yml Outdated
Comment thread Package.swift
Comment thread Samples/ios/SampleApp/SampleAppiOS.xcodeproj/project.pbxproj
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.
Copilot AI review requested due to automatic review settings April 1, 2026 21:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Comment thread azure_pipelines/automation.yml
Comment thread CHANGELOG.md Outdated
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.
Copilot AI review requested due to automatic review settings April 1, 2026 22:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 8 comments.

Comment thread azure_pipelines/templates/tests-with-conf-file.yml Outdated
Comment thread azure_pipelines/templates/tests-with-conf-file.yml
Comment thread azure_pipelines/pr-validation.yml
Comment thread azure_pipelines/visionos-validation.yml
Comment thread azure_pipelines/broker_submodule_check.yml
Comment thread build.py Outdated
Comment thread spm-integration-test.sh Outdated
Comment thread azure_pipelines/pr-validation.yml
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.
Copilot AI review requested due to automatic review settings April 2, 2026 03:18
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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment thread azure_pipelines/automation.yml
josephpab and others added 2 commits April 3, 2026 22:23
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>
Copilot AI review requested due to automatic review settings April 4, 2026 05:46
- 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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment thread spm-integration-test.sh
josephpab and others added 2 commits April 3, 2026 22:53
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>
Copilot AI review requested due to automatic review settings April 4, 2026 06:01
josephpab and others added 2 commits April 3, 2026 23:02
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Comment thread build.py Outdated
Comment thread build.py Outdated
Comment thread build.py Outdated
Comment thread azure_pipelines/templates/tests-with-conf-file.yml Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@josephpab josephpab changed the title [Minor][Feature]: Update min ios and Xcode versions [Major][Engg]: Update min ios and Xcode versions Apr 4, 2026
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>
Copilot AI review requested due to automatic review settings April 4, 2026 07:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Comment thread azure_pipelines/templates/tests-with-conf-file.yml Outdated
Comment thread azure_pipelines/templates/tests-with-conf-file.yml Outdated
Comment thread CHANGELOG.md Outdated
josephpab and others added 2 commits April 4, 2026 01:15
…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>
Copilot AI review requested due to automatic review settings April 4, 2026 19:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Comment thread spm-integration-test.sh Outdated
Comment thread azure_pipelines/broker_submodule_check.yml Outdated
Comment thread build.py
josephpab and others added 2 commits April 4, 2026 12:26
…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>
Copilot AI review requested due to automatic review settings April 6, 2026 20:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comment on lines +100 to +103
#define kBufferLength 16
const int lastIndex = kBufferLength - 1;
const int bitsInByte = 8;
char buffer[16];
char buffer[kBufferLength];
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants