microsoft-authentication-library-common-for-objc icon indicating copy to clipboard operation
microsoft-authentication-library-common-for-objc copied to clipboard

[macOS SDK] Update macOS minimum version to 10.15

Open spetrescu84 opened this issue 1 year ago • 5 comments

Proposed changes

Update macOS minimum version to 10.15

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

Updated unit tests to work for macOS 10.15

spetrescu84 avatar Jun 25 '24 15:06 spetrescu84

Similar to the MSAL repo, can you please remove the check "if (@available(macOS 10.15, *))" given than now they're not needed anymore?

nilo-ms avatar Jun 26 '24 08:06 nilo-ms

Similar to the MSAL repo, can you please remove the check "if (@available(macOS 10.15, *))" given than now they're not needed anymore?

Removed all if (@available(macOS 10.15, *)) (or versions of it) and also standalone instances of #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500\

spetrescu84 avatar Jun 26 '24 10:06 spetrescu84

If I search the following terms in IdentityCore, we still have some lines where they are present:

API_AVAILABLE(macos(14.0))
API_AVAILABLE(macos(13.0)

__MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
@available(macOS 12.0, * -> (better to search for "macOS 12.0" as there are more results)

__MAC_OS_X_VERSION_MAX_ALLOWED >= 130000
macOS 13.0

__MAC_OS_X_VERSION_MAX_ALLOWED >= 140000
macOS 14.0

I'm not sure if the Objc folks may be better suited than us to solve them, but maybe we can sync?

diegojerezba avatar Jul 11 '24 11:07 diegojerezba

If I search the following terms in IdentityCore, we still have some lines where they are present:

API_AVAILABLE(macos(14.0))
API_AVAILABLE(macos(13.0)

__MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
@available(macOS 12.0, * -> (better to search for "macOS 12.0" as there are more results)

__MAC_OS_X_VERSION_MAX_ALLOWED >= 130000
macOS 13.0

__MAC_OS_X_VERSION_MAX_ALLOWED >= 140000
macOS 14.0

I'm not sure if the Objc folks may be better suited than us to solve them, but maybe we can sync? These checks are still ok, we are updating to macOS 10.15 minimum version not to macOS 15.0. So there should still be checks above 10.15 like __MAC_OS_X_VERSION_MAX_ALLOWED >= 120000 or API_AVAILABLE(macos(13.0). The ones equal to 10.15 / 105000 or below should be removed

spetrescu84 avatar Jul 29 '24 11:07 spetrescu84

Added one comment, otherwise looks good

Veena11 avatar Aug 01 '24 18:08 Veena11

@spetrescu84, it seems the [MSAL C++] Common core subtree update check macOS is failing with this error:

[msalobjc] Compiling MSAIMSIDWorkPlaceJoinUtilBase.m
❌ ***/s/deps/msalobjc/IdentityCore/src/workplacejoin/MSAIMSIDWorkPlaceJoinUtilBase.m:246:62: 'kSecUseDataProtectionKeychain' is only available on macOS 10.15 or newer [-Wunguarded-availability-new]
        [mutableCertQuery setObject:@YES forKey:(__bridge id)kSecUseDataProtectionKeychain];

https://identitydivision.visualstudio.com/IDDP/_build/results?buildId=1343056&view=logs&j=d46b93ad-1be7-5eab-6980-c78d65372179&t=0153d404-5636-5846-4ebd-361eb75124ec&l=572

can you please take a look?

juan-arias avatar Aug 09 '24 16:08 juan-arias

@spetrescu84, it seems the [MSAL C++] Common core subtree update check macOS is failing with this error:

[msalobjc] Compiling MSAIMSIDWorkPlaceJoinUtilBase.m
❌ ***/s/deps/msalobjc/IdentityCore/src/workplacejoin/MSAIMSIDWorkPlaceJoinUtilBase.m:246:62: 'kSecUseDataProtectionKeychain' is only available on macOS 10.15 or newer [-Wunguarded-availability-new]
        [mutableCertQuery setObject:@YES forKey:(__bridge id)kSecUseDataProtectionKeychain];

https://identitydivision.visualstudio.com/IDDP/_build/results?buildId=1343056&view=logs&j=d46b93ad-1be7-5eab-6980-c78d65372179&t=0153d404-5636-5846-4ebd-361eb75124ec&l=572

can you please take a look?

The MSAL C++ Minimum version has to be updated to 10.15. This was discussed with @Veena11

spetrescu84 avatar Aug 09 '24 17:08 spetrescu84