diff --git a/Avalonia.sln b/Avalonia.sln index 8c857389dc..8ee6f65989 100644 --- a/Avalonia.sln +++ b/Avalonia.sln @@ -1,3 +1,4 @@ + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 @@ -299,6 +300,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Win32.Automation", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XEmbedSample", "samples\XEmbedSample\XEmbedSample.csproj", "{255614F5-CB64-4ECA-A026-E0B1AF6A2EF4}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlCatalog.MacCatalyst", "samples\ControlCatalog.iOS\ControlCatalog.MacCatalyst.csproj", "{DE3C28DD-B602-4750-831D-345102A54CA0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlCatalog.tvOS", "samples\ControlCatalog.iOS\ControlCatalog.tvOS.csproj", "{14342787-B4EF-4076-8C91-BA6C523DE8DF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -699,6 +704,14 @@ Global {255614F5-CB64-4ECA-A026-E0B1AF6A2EF4}.Debug|Any CPU.Build.0 = Debug|Any CPU {255614F5-CB64-4ECA-A026-E0B1AF6A2EF4}.Release|Any CPU.ActiveCfg = Release|Any CPU {255614F5-CB64-4ECA-A026-E0B1AF6A2EF4}.Release|Any CPU.Build.0 = Release|Any CPU + {DE3C28DD-B602-4750-831D-345102A54CA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE3C28DD-B602-4750-831D-345102A54CA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE3C28DD-B602-4750-831D-345102A54CA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE3C28DD-B602-4750-831D-345102A54CA0}.Release|Any CPU.Build.0 = Release|Any CPU + {14342787-B4EF-4076-8C91-BA6C523DE8DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {14342787-B4EF-4076-8C91-BA6C523DE8DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {14342787-B4EF-4076-8C91-BA6C523DE8DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {14342787-B4EF-4076-8C91-BA6C523DE8DF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -787,6 +800,8 @@ Global {9AE1B827-21AC-4063-AB22-C8804B7F931E} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} {0097673D-DBCE-476E-82FE-E78A56E58AA2} = {B39A8919-9F95-48FE-AD7B-76E08B509888} {255614F5-CB64-4ECA-A026-E0B1AF6A2EF4} = {9B9E3891-2366-4253-A952-D08BCEB71098} + {DE3C28DD-B602-4750-831D-345102A54CA0} = {9B9E3891-2366-4253-A952-D08BCEB71098} + {14342787-B4EF-4076-8C91-BA6C523DE8DF} = {9B9E3891-2366-4253-A952-D08BCEB71098} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {87366D66-1391-4D90-8999-95A620AD786A} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dc23500374..d9a4c80fdf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -80,7 +80,7 @@ jobs: displayName: 'Install Workloads' inputs: script: | - dotnet workload install android ios macos wasm-tools + dotnet workload install android ios maccatalyst macos wasm-tools - task: CmdLine@2 displayName: 'Generate avalonia-native' @@ -154,7 +154,7 @@ jobs: displayName: 'Install Workloads' inputs: script: | - dotnet workload install android ios tvos wasm-tools + dotnet workload install android maccatalyst ios tvos wasm-tools - task: CmdLine@2 displayName: 'Install Nuke' diff --git a/build/TargetFrameworks.props b/build/TargetFrameworks.props index 0b04810436..e48c9933f3 100644 --- a/build/TargetFrameworks.props +++ b/build/TargetFrameworks.props @@ -4,6 +4,7 @@ $(AvsCurrentTargetFramework)-windows $(AvsCurrentTargetFramework)-macos $(AvsCurrentTargetFramework)-android34.0 + $(AvsCurrentTargetFramework)-maccatalyst17.0 $(AvsCurrentTargetFramework)-ios17.0 $(AvsCurrentTargetFramework)-tvos17.0 $(AvsCurrentTargetFramework)-browser diff --git a/docs/build.md b/docs/build.md index 065d2ee960..643c767736 100644 --- a/docs/build.md +++ b/docs/build.md @@ -16,7 +16,7 @@ Go to https://dotnet.microsoft.com/en-us/download/visual-studio-sdks and install Since Avalonia targets pretty much every supported .NET platform, you need to install these workloads as well. Running it from the command line: ```bash -dotnet workload install android ios wasm-tools +dotnet workload install android ios maccatalyst wasm-tools ``` macOS workloads are not required to build Avalonia. diff --git a/samples/ControlCatalog.iOS/ControlCatalog.MacCatalyst.csproj b/samples/ControlCatalog.iOS/ControlCatalog.MacCatalyst.csproj new file mode 100644 index 0000000000..f7cd8eebf4 --- /dev/null +++ b/samples/ControlCatalog.iOS/ControlCatalog.MacCatalyst.csproj @@ -0,0 +1,19 @@ + + + Exe + manual + $(AvsCurrentMacCatalystTargetFramework) + + 14.0 + + + + + + Info.plist + + + + true + + diff --git a/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj b/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj index 75c244711b..1ab3df1b63 100644 --- a/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj +++ b/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj @@ -3,11 +3,16 @@ Exe manual $(AvsCurrentIOSTargetFramework) - $(AvsMinSupportedIOSVersion) + + Info.plist + - + + true + + \ No newline at end of file diff --git a/samples/ControlCatalog.iOS/ControlCatalog.tvOS.csproj b/samples/ControlCatalog.iOS/ControlCatalog.tvOS.csproj new file mode 100644 index 0000000000..35e964abab --- /dev/null +++ b/samples/ControlCatalog.iOS/ControlCatalog.tvOS.csproj @@ -0,0 +1,21 @@ + + + Exe + manual + $(AvsCurrentTvOSTargetFramework) + $(AvsMinSupportedTvOSVersion) + + tvossimulator-x64 + + + + + + Info.plist + + + + true + + diff --git a/samples/ControlCatalog.iOS/Info.Catalyst.plist b/samples/ControlCatalog.iOS/Info.Catalyst.plist new file mode 100644 index 0000000000..ad5aecb10a --- /dev/null +++ b/samples/ControlCatalog.iOS/Info.Catalyst.plist @@ -0,0 +1,42 @@ + + + + + CFBundleDisplayName + ControlCatalog.Catalyst + CFBundleIdentifier + Avalonia.ControlCatalog + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIDeviceFamily + + 6 + + UIRequiredDeviceCapabilities + + arm64 + + UILaunchStoryboardName + LaunchScreen + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + com.apple.security.files.user-selected.read-write + + + diff --git a/samples/ControlCatalog.iOS/Info.plist b/samples/ControlCatalog.iOS/Info.iOS.plist similarity index 100% rename from samples/ControlCatalog.iOS/Info.plist rename to samples/ControlCatalog.iOS/Info.iOS.plist diff --git a/samples/ControlCatalog.iOS/Info.tvOS.plist b/samples/ControlCatalog.iOS/Info.tvOS.plist new file mode 100644 index 0000000000..779324b970 --- /dev/null +++ b/samples/ControlCatalog.iOS/Info.tvOS.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDisplayName + ControlCatalog.tvOS + CFBundleIdentifier + Avalonia.ControlCatalog + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIDeviceFamily + + 3 + + UIRequiredDeviceCapabilities + + arm64 + + UILaunchStoryboardName + LaunchScreen + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj index 071c6c5b9a..f284d2d0a2 100644 --- a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj +++ b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj @@ -1,9 +1,8 @@  - $(AvsCurrentIOSTargetFramework);$(AvsCurrentTvOSTargetFramework) + $(AvsCurrentMacCatalystTargetFramework);$(AvsCurrentIOSTargetFramework);$(AvsCurrentTvOSTargetFramework) $(AvsMinSupportedIOSVersion) $(AvsMinSupportedTvOSVersion) - $(AvsMinSupportedMacCatalystVersion) true diff --git a/src/iOS/Avalonia.iOS/TextInputResponder.Properties.cs b/src/iOS/Avalonia.iOS/TextInputResponder.Properties.cs index 133f20cb34..6c4dd1074f 100644 --- a/src/iOS/Avalonia.iOS/TextInputResponder.Properties.cs +++ b/src/iOS/Avalonia.iOS/TextInputResponder.Properties.cs @@ -81,7 +81,7 @@ partial class AvaloniaView [Export("smartInsertDeleteType")] public UITextSmartInsertDeleteType SmartInsertDeleteType { get; set; } = UITextSmartInsertDeleteType.Default; - [Export("passwordRules")] public UITextInputPasswordRules PasswordRules { get; set; } = null!; + [Export("passwordRules")] public UITextInputPasswordRules? PasswordRules { get; set; } = null!; public NSObject? WeakInputDelegate {