MtouchArch to RuntimeIdentifier in maui ios
Hi,
I am migrating xamarin forms project to .net maui.as part of migration i am changing the iOS .csproj.
I have changed the MtouchArch to RuntimeIdentifiers as mentioned in the below link.
https://learn.microsoft.com/en-us/dotnet/maui/migration/apple-projects#convert-to-runtimeidentifier
i have replaced i386, x86_64 to iossimulator-x86,iossimulator-x64 as mentioned in the above link.
after doing changes i am getting below error while restoring nuget pacakges after deleting bin and obj.
/usr/local/share/dotnet/sdk/7.0.304/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5) : error NETSDK1083: The specified RuntimeIdentifier 'iossimulator-x64,iossimulator-x86' is not recognized.
below is my configuration in iOS .csproj in xamarin :
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugUAT|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>__UNIFIED__;__MOBILE__;__IOS__;__UNIFIED__;__MOBILE__;__IOS__;DEBUG;DISABLE_PINNING</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
<DeviceSpecificBuild>true</DeviceSpecificBuild>
<MtouchDebug>true</MtouchDebug>
<MtouchFastDev>true</MtouchFastDev>
<MtouchFloat32>true</MtouchFloat32>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchLink>SdkOnly</MtouchLink>
<MtouchArch>i386, x86_64</MtouchArch>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>Default</MtouchTlsProvider>
<MtouchExtraArgs>-cxx -gcc_flags "-L${ProjectDir} -framework Security -framework AudioToolbox -liconv -lc++" --optimize=force-rejected-types-removal --warn-on-type-ref=UIKit.UIWebView -warnaserror:1503</MtouchExtraArgs>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodesignProvision>
</CodesignProvision>
</PropertyGroup>
below is my configuration in iOS .csproj in MAUI :
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugUAT|AnyCPU' ">
<DefineConstants>DEBUG</DefineConstants>
<Platforms>x86</Platforms>
<RuntimeIdentifiers>iossimulator-x86,iossimulator-x64</RuntimeIdentifiers>
<DefineConstants>__UNIFIED__;__MOBILE__;__IOS__;DEBUG;MOCK_API</DefineConstants>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
<DeviceSpecificBuild>true</DeviceSpecificBuild>
<MtouchDebug>true</MtouchDebug>
<MtouchFastDev>true</MtouchFastDev>
<MtouchFloat32>true</MtouchFloat32>
<MtouchLink>SdkOnly</MtouchLink>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>Default</MtouchTlsProvider>
<MtouchExtraArgs>-cxx -gcc_flags "-L${ProjectDir} -framework Security -framework AudioToolbox -liconv -lc++" --optimize=force-rejected-types-removal --warn-on-type-ref=UIKit.UIWebView -warnaserror:1503</MtouchExtraArgs>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodesignProvision>
</CodesignProvision>
</PropertyGroup>
My MAUI version : .NET7