MacOS adaptation