I’m encountering an issue with the NET-iOS.Naxam.FSCalendar library while migrating my project from .NET 8 to .NET 9

Sagar Khati 0 Reputation points
2024-11-27T04:15:55.5966667+00:00

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error : clang++ exited with code 1: ld: building for 'iOS-simulator', but linking in dylib (/Users/admin/.nuget/packages/net-ios.naxam.fscalendar/2.8.3.1/lib/net7.0-ios16.1/Naxam.FSC alendar.iOS.resources/FSCalendar.framework/FSCalendar) built for 'iOS' clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Build failed with 1 error(s) and 6 warning(s) in 19.4s

I attempted to migrate to .NET 9, as it likely includes a fix for syncing the storyboard with Visual Studio code, an issue that persisted in the previous version.

Developer technologies | .NET | .NET MAUI
Developer technologies | .NET | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Jignesh Dhedhi 0 Reputation points
    2024-11-27T06:36:31.4933333+00:00

    Hello Sagar Khati,

    You need to ensure that your project is correctly targeting architectures compatible with both iOS devices and iOS simulators. In your .csproj or build settings, check for the following:

    • For a .NET MAUI or Xamarin.iOS project, ensure you have both arm64 (for physical devices) and x86_64 (for simulators) in your Supported Architectures settings.
    • Modify the RuntimeIdentifier (RID) to ensure it targets both device and simulator builds, like so:
        <PropertyGroup>
        <RuntimeIdentifiers>ios-arm64;ios-x86_64</RuntimeIdentifiers>
        </PropertyGroup>
        
      
    0 comments No comments

  2. Sagar Khati 0 Reputation points
    2024-11-27T11:59:07.1866667+00:00

    Thank you for your response. However, as I mentioned earlier, adding those lines has resulted in a different compilation error:/Users/admin/Desktop/Sagar/Projects/DotNetiOSProject/iOSApp1/iOSApp1.csproj(8,1): error MSB4004: The "PropertyGroup" property is reserved, and cannot be modified.

    Below is my csproj file for your reference.

    <Project Sdk="Microsoft.NET.Sdk">
      <PropertyGroup>
        <TargetFramework>net9.0-ios</TargetFramework>
        <OutputType>Exe</OutputType>
        <Nullable>enable</Nullable>
        <ImplicitUsings>true</ImplicitUsings>
        <SupportedOSPlatformVersion>13.0</SupportedOSPlatformVersion>
      <RuntimeIdentifiers>ios-arm64;ios-x86_64</RuntimeIdentifiers>
    
        <TrimMode Condition="'$(Configuration)' == 'Release'">full</TrimMode>
      </PropertyGroup>
    </Project>
    
    
    0 comments No comments

  3. Bruce (SqlWork.com) 77,926 Reputation points Volunteer Moderator
    2024-11-27T16:54:19.46+00:00

    your IOS binding library is for .net 7. you should upgrade to a .net 9 library. It looks like the nuget package is no longer maintained. you can fork the GitHub repo and update (I notice there are already a couple forks):

    https://github.com/NAXAM/fscalendar-ios-binding

    and then update to support .net 9

    https://learn.microsoft.com/en-us/dotnet/maui/migration/ios-binding-projects?view=net-maui-9.0

    also its not clear the underlying iOS control is maintained (it has over a 1k forks, so individual updating is popular):

    https://github.com/WenchaoD/FSCalendar

    you might want to pick a calendar that has better support.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.