MarketAlly.ViewEngine 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package MarketAlly.ViewEngine --version 1.0.1                
NuGet\Install-Package MarketAlly.ViewEngine -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MarketAlly.ViewEngine" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MarketAlly.ViewEngine --version 1.0.1                
#r "nuget: MarketAlly.ViewEngine, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MarketAlly.ViewEngine as a Cake Addin
#addin nuget:?package=MarketAlly.ViewEngine&version=1.0.1

// Install MarketAlly.ViewEngine as a Cake Tool
#tool nuget:?package=MarketAlly.ViewEngine&version=1.0.1                

MarketAlly.ViewEngine

📢 Overview

MarketAlly.ViewEngine is a powerful .NET MAUI WebView control that mimics a real browser, enabling full JavaScript support, cookies, WebRTC, and custom User-Agent overrides. It works seamlessly across Android, iOS, and Windows.

🚀 Features

✅ Supports custom User-Agent
✅ Enables cookies, storage, WebRTC, and WebGL
Bypasses WebView detection techniques
Fully compatible with .NET MAUI
✅ Works on Android, iOS, and Windows


📌 Installation

To install the package, run the following command in your .NET MAUI app:

dotnet add package MarketAlly.ViewEngine

Or, in Visual Studio:

  1. Open Package Manager Console.
  2. Run:
    Install-Package MarketAlly.ViewEngine
    

📌 Setup in MauiProgram.cs

After installing, you must register the custom WebView handler inside your .NET MAUI app.

Modify MauiProgram.cs to add the handler:

using Microsoft.Maui;
using Microsoft.Maui.Hosting;
using MarketAlly.ViewEngine.Controls;
using MarketAlly.ViewEngine.Handlers;

var builder = MauiApp.CreateBuilder();
builder.UseMauiApp<App>();

// Register the custom WebView handler
builder.ConfigureMauiHandlers(handlers =>
{
    handlers.AddHandler(typeof(CustomWebView), typeof(CustomWebViewHandler));
});

return builder.Build();

This ensures your app correctly loads the CustomWebView with platform-specific optimizations.


📌 How to Use CustomWebView

Once registered, you can use CustomWebView in XAML or C#.

🔹 Using in XAML

<ContentPage xmlns:controls="clr-namespace:MarketAlly.ViewEngine.Controls;assembly=MarketAlly.ViewEngine">
    <controls:CustomWebView 
        Source="https://example.com"
        UserAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"/>
</ContentPage>

🔹 Using in C#

using MarketAlly.ViewEngine.Controls;

var webView = new CustomWebView
{
    Source = "https://example.com",
    UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
};

Content = new StackLayout
{
    Children = { webView }
};

📌 FAQ

How does this WebView differ from the default .NET MAUI WebView?

  • CustomWebView allows custom User-Agent overrides, enables cookies, storage, WebRTC, and improves browser detection evasion.
  • The default .NET MAUI WebView lacks these advanced features.

Does this work with authentication-based websites?

Yes! Cookies and session data persist between navigations, making it suitable for login-based websites.

Does this work on iOS, Android, and Windows?

Yes! It uses:

  • Android: Native WebView (with Chrome-like behavior).
  • iOS: WKWebView with full JavaScript and cookie support.
  • Windows: WebView2 (Chromium-based).

Can I use this with OAuth authentication?

Yes! The WebView can be used for OAuth authentication flows, but we recommend opening authentication pages in the system browser (e.g., SFSafariViewController for iOS or Custom Tabs for Android).


📌 Contributing

Want to improve this library? Feel free to submit issues and pull requests on https://github.com/MarketAlly/MarketAlly.ViewEngine


📌 License

This project is licensed under the MIT License.


📌 Support

💬 Need help?
Open an issue on GitHub or contact us via email at support@marketally.com. 🚀

Product Compatible and additional computed target framework versions.
.NET net9.0-android35.0 is compatible.  net9.0-ios18.0 is compatible.  net9.0-windows10.0.19041 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 32 2/26/2025
1.0.3 32 2/26/2025
1.0.2 85 2/23/2025
1.0.1 81 2/23/2025

Version 1.0.1:
     - Enhanced content monitoring with real-time DOM change detection
     - Improved PDF handling and text extraction
     - Added custom user-agent support
     - Enhanced cross-platform compatibility
     - Added JavaScript injection capabilities
     - Improved cookie and storage management