Axemasta / SwapiMaui

Sample maui app built to demonstrate using a proxy such as Charles to debug web requests from a maui app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swapi Maui Sample

Sample maui app built to demonstrate using a proxy such as Charles to debug web requests from a maui app.

The sample app is not fully implemented yet, currently only films has any ui to show the api call result. Api calls are extremely slow so I have implemented a caching layer using Microsoft.Extensions.Caching to save web results.

Main Menu in iOS Films list in iOS

Setup

  • You must have charles proxy setup on your machine.
  • Ensure all urls are correct (these might be different for my machine than yours), ensure <UseProxy>true</UseProxy> (set to false to test app without traffic inspection).
  • Build & run

iOS

There is some jank with the iOS implementation. You cannot use the native NSURLSessionHandler in maui (this did work in Xamarin), see this issue. Instead you have to use the dotnet handler, this is quite annoying and essentially makes adding proxies as a feature to iOS maui apps dead until this gets changed.

The iOS proxy code changes are automatically handled in this sample, see the csproj & conditional compile.

Charles inspection from the app

Android

Setup your emulator as described in this guide.

There is no other code changed needed to get traffic inspection working.

Traffic inspection in android app

About

Sample maui app built to demonstrate using a proxy such as Charles to debug web requests from a maui app

License:MIT License


Languages

Language:C# 100.0%