CommunityToolkit / CommunityToolkit/Maui.NativeLibraryInterop

Best Practices for Structuring Multiple Native SDK Bindings in .NET MAUI

Open
#81 1 comment 0 reactions 0 assignees View on GitHub
documentation
Dominant language
C#
Stars
249
Forks
48
PR merge metrics
No merged PRs in 30d

Description

When integrating multiple third-party native SDKs into a .NET MAUI application, such as payment providers (Square, Stripe) and hardware integrations (Epson, Star Micronics printers), what is the best approach for organizing bindings?

Would it be better to create separate Android/iOS binding projects for each SDK?
For example:

- Square.Android.Binding and Square.iOS.Binding
- Stripe.Android.Binding and Stripe.iOS.Binding
- Epson.Android.Binding and Epson.iOS.Binding
- StarMicronics.Android.Binding and StarMicronics.iOS.Binding

Alternatively, would it be more efficient to consolidate bindings within a single project per category (e.g., one Payments Binding for Square & Stripe and one Printers Binding for Epson & Star Micronics), while maintaining distinct implementations for each provider?

What are the best practices for structuring these bindings to ensure scalability, maintainability, and minimal dependency conflicts in a .NET MAUI application?

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the repository's existing native binding samples first, then compare how Android and iOS bindings are organized for the payment and printer SDK examples named in the issue. A useful outcome would document whether each provider should have separate binding projects or whether category-level projects are appropriate, including guidance on dependency isolation and maintenance.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp, ios
Domain
mobile-dev
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.