Skip to content

Not working inside Maui application on macOs arm64 #88

Open

Description

@generalloki

Describe the bug
It is not possible to use TextMateSharp inside maui application on macOs on arm64.
It doesn't load native library.

To Reproduce
Run this sample maui application on macOs
and receive an exception
SampleMauiLibonigwrap.zip
This sample works fine on Windows

Expected behavior
It should load native library for macOs arm64 platform and use it.

Screenshots
Image

Desktop (please complete the following information):

  • OS: macOs arm64
  • Version 15.3.1

Activity

  1. danipen commented on May 20, 2025

    @danipen
    Owner

    I don't think this is a TextmateSharp specific issue. Please note that the same scenario works as expected in macOS using Avalonia's AvaloniaEdit.

    Additionally , the native library now leaves in https://github.com/aikawayataro/Onigwrap. @aikawayataro do you see any specific MAUI infrastructure-related stuff that could prevent the native library to load?

  2. generalloki commented on May 20, 2025

    @generalloki
    Author

    It works fine under macOs arm64 in non-maui application, but doesn't work from inside maui application.

  3. danipen commented on May 20, 2025

    @danipen
    Owner

    Any clue/idea why?

  4. aikawayataro commented on May 20, 2025

    @aikawayataro
    Contributor

    Please mind that this issue should have been reported to https://github.com/aikawayataro/Onigwrap
    I don't own any macOS device so I would ask you to provide the exact command line used to publish project and zipped publish directory. Thanks!

  5. generalloki commented on May 21, 2025

    @generalloki
    Author

    In order to run maui application, the simple call dotnet run -f net9.0-maccatalyst is enough. No publish command is needed. In order to build we can simply call dotnet build. All our Maui projects are executed and built in this way. I will attach bin folder of the sample project later today.

  6. danipen commented on Dec 16, 2025

    @danipen
    Owner

    @generalloki is this issue still happening?

  7. generalloki commented on Dec 16, 2025

    @generalloki
    Author

    @danipen, it doesn't work for maui and macos arm64. I have used these nugets

      <PackageReference Include="TextMateSharp" Version="2.0.1" />
        <PackageReference Include="TextMateSharp.Grammars" Version="2.0.1" />
        <PackageReference Include="Onigwrap" Version="1.0.10" />

    Now I use net-10 and maui-10 on macos 26.2 arm64. Here is the updated application

    SampleMauiLibonigwrap-net10.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions