You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

从Xamarin Forms迁移至.NET MAUI后iOS自定义方法显示禁用无代码提示求助

.NET MAUI迁移后iOS平台自定义方法无代码提示(功能正常)

我近期将Xamarin Forms项目迁移至.NET MAUI,目前Android平台的自定义方法可正常查看并获取代码提示,但iOS平台的自定义方法显示为禁用状态。
注:功能可正常运行,但iOS平台无法获得代码提示。

iOS平台自定义方法状态截图:
iOS自定义方法禁用状态

我已配置了iOS目标版本,项目的.csproj配置如下:

<PropertyGroup>
        <TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
        <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!--         Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
         <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> 
        <OutputType>Exe</OutputType>
        <RootNamespace>MobileApp</RootNamespace>
        <UseMaui>true</UseMaui>
        <SingleProject>true</SingleProject>
        <ImplicitUsings>enable</ImplicitUsings>

        <!-- Display name -->
        <ApplicationTitle>Test</ApplicationTitle>

        <!-- App Identifier -->
        <ApplicationId>com.test.demo</ApplicationId>
        <ApplicationIdGuid>65aa90ec-865a-4ee8-9d89-2f66fc2438e8</ApplicationIdGuid>

        <!-- Versions -->
        <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
        <ApplicationVersion>1</ApplicationVersion>

        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
        <TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
        <Configurations>Release;Debug</Configurations>
        <UserSecretsId>1cde96b1-590c-4af8-a8a8-b6de3c7a3c67</UserSecretsId>
    </PropertyGroup>

恳请各位技术同行提供解决方案。

内容的提问来源于stack exchange,提问作者Vanjara Sweta

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.28 12:22:58