.NET MAUI › Project Structure & App Startup

What is the purpose of the Platforms folder?

Beginner

Answer

The Platforms folder holds platform-specific entry points and code: Android (MainActivity, MainApplication), iOS/MacCatalyst (AppDelegate, Program), and Windows (App.xaml). MAUI compiles only the relevant Platforms subfolder for each target framework, so you can write native code guarded by that platform without #if in most cases.
Real-world example A developer requests a runtime permission by editing only Platforms/Android/MainActivity.cs, leaving shared code untouched.

Common follow-ups: What is MainActivity? | How does per-platform compilation work?