diff --git a/IdentityCore/IdentityCore.xcodeproj/project.pbxproj b/IdentityCore/IdentityCore.xcodeproj/project.pbxproj index e14560e31..633c524fe 100644 --- a/IdentityCore/IdentityCore.xcodeproj/project.pbxproj +++ b/IdentityCore/IdentityCore.xcodeproj/project.pbxproj @@ -8107,7 +8107,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -8170,7 +8170,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; OTHER_LDFLAGS = "-ObjC"; @@ -8353,7 +8353,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "-ObjC"; @@ -8414,7 +8414,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -8608,7 +8608,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -8669,7 +8669,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; OTHER_LDFLAGS = "-ObjC"; @@ -8815,7 +8815,7 @@ ENABLE_BITCODE = NO; GCC_OPTIMIZATION_LEVEL = 0; HEADER_SEARCH_PATHS = "$(SRCROOT)/include/"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; @@ -8837,7 +8837,7 @@ DEVELOPMENT_TEAM = UBF8T346G9; ENABLE_BITCODE = NO; HEADER_SEARCH_PATHS = "$(SRCROOT)/include/"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; @@ -8911,7 +8911,7 @@ buildSettings = { ENABLE_BITCODE = NO; GCC_OPTIMIZATION_LEVEL = 0; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos xros xrsimulator"; TARGETED_DEVICE_FAMILY = "1,2,7"; }; @@ -8922,7 +8922,7 @@ baseConfigurationReference = D6CF4E971FC3626A00CD70C5 /* identitycore__testlib__ios.xcconfig */; buildSettings = { ENABLE_BITCODE = NO; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos xros xrsimulator"; TARGETED_DEVICE_FAMILY = "1,2,7"; }; @@ -8990,7 +8990,7 @@ "$(MSID_WEBKIT)", "$(MSID_SYSTEMWV)", ); - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos xrsimulator xros"; TARGETED_DEVICE_FAMILY = "1,2,7"; }; @@ -9005,7 +9005,7 @@ "$(MSID_SYSTEMWV)", "$(MSID_WEBKIT)", ); - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos xrsimulator xros"; TARGETED_DEVICE_FAMILY = "1,2,7"; }; diff --git a/IdentityCore/src/util/ios/UIApplication+MSIDExtensions.m b/IdentityCore/src/util/ios/UIApplication+MSIDExtensions.m index 8f74ac763..99ef2d4fe 100644 --- a/IdentityCore/src/util/ios/UIApplication+MSIDExtensions.m +++ b/IdentityCore/src/util/ios/UIApplication+MSIDExtensions.m @@ -48,7 +48,25 @@ + (UIViewController *)msidCurrentViewController:(UIViewController *)parentContro for (UIWindow *window in windows) #else - for (UIWindow *window in [MSIDAppExtensionUtil sharedApplication].windows) + NSArray *scenes=[[[UIApplication sharedApplication] connectedScenes] allObjects]; + if (!scenes) return nil; + UIWindowScene *windowScene = nil; + for (int i=0; i<=scenes.count - 1; i++) { + if (![scenes[i] isKindOfClass:UIWindowScene.class]) + { + continue; + } + else + { + // get the 1st window scene + windowScene = (UIWindowScene *)scenes[i]; + break; + } + } + if (!windowScene) return nil; + NSArray *windows=[windowScene windows]; + + for (UIWindow *window in windows) #endif { if (window.isKeyWindow) diff --git a/azure_pipelines/broker_submodule_check.yml b/azure_pipelines/broker_submodule_check.yml index 358839935..7e9534a74 100644 --- a/azure_pipelines/broker_submodule_check.yml +++ b/azure_pipelines/broker_submodule_check.yml @@ -134,7 +134,7 @@ jobs: displayName: 'Select Xcode version' inputs: targetType: 'inline' - script: '/bin/bash -c "sudo xcode-select -s /Applications/Xcode_15.4.app"' + script: '/bin/bash -c "sudo xcode-select -s /Applications/Xcode_16.2.0.app"' # The following is needed to install the visionOS SDK on macos-14 vm image which # doesn't have visionOS installed by default. diff --git a/azure_pipelines/msal_submodule_check.yaml b/azure_pipelines/msal_submodule_check.yaml index d0179f766..024f9e945 100644 --- a/azure_pipelines/msal_submodule_check.yaml +++ b/azure_pipelines/msal_submodule_check.yaml @@ -37,8 +37,13 @@ jobs: steps: - script: | + if [ "$(target)" != "macFramework" ] && [ "$(target)" != "visionOSFramework" ]; then + echo "Switching to Xcode 16.2 for iOS target" + /bin/bash -c "sudo xcode-select -s /Applications/Xcode_16.2.0.app" + else /bin/bash -c "sudo xcode-select -s /Applications/Xcode_15.4.app" - displayName: 'Switch to use Xcode 15.4' + fi + displayName: 'Switch to use Xcode' - task: CmdLine@2 displayName: Uninstalling xcpretty v0.4.0 inputs: diff --git a/azure_pipelines/pr-validation.yml b/azure_pipelines/pr-validation.yml index 482a61e25..97fdd373a 100644 --- a/azure_pipelines/pr-validation.yml +++ b/azure_pipelines/pr-validation.yml @@ -55,7 +55,13 @@ jobs: displayName: 'Select Xcode version' inputs: targetType: 'inline' - script: '/bin/bash -c "sudo xcode-select -s /Applications/Xcode_15.4.app"' + script: | + if [ "$(target)" == "ios_library" ]; then + echo "Switching to ios 16 for iOS target" + /bin/bash -c "sudo xcode-select -s /Applications/Xcode_16.2.0.app" + else + /bin/bash -c "sudo xcode-select -s /Applications/Xcode_15.4.app" + fi - task: Bash@3 displayName: Removing any lingering codecov files. These can cause issues when the xcode version changes inputs: