<!--
title: Document platform requirements
domain: app-frameworks
topic: Configurations
language: Other
source: maplibre/maplibre-native
updated: 2024-05-22
url: https://awesomereviewers.com/reviewers/maplibre-native-document-platform-requirements/
-->

When setting or changing minimum platform version requirements, always document the specific technical reasons for these decisions. Include:

1. Features or APIs that necessitate the change (e.g., std::filesystem requiring macOS 10.15+)
2. Impact analysis on backward compatibility
3. Market considerations (e.g., iOS version distribution)

For libraries, consider using conditional compilation to support optional features that require newer platform versions while maintaining core functionality for older versions:

```cpp
// Example showing conditional use of std::filesystem
#if defined(__APPLE__)
  #include <TargetConditionals.h>
  #if TARGET_OS_MAC
    #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_15
      // Use std::filesystem
      #include <filesystem>
      namespace fs = std::filesystem;
    #else
      // Use alternative implementation
      #include "custom_filesystem.hpp"
      namespace fs = custom_filesystem;
    #endif
  #endif
#endif

// Similarly for iOS:
#if defined(__APPLE__) && TARGET_OS_IOS
  #if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_13_0
    // Use iOS 13+ features
  #else
    // Fallback implementation
  #endif
#endif
```

Always validate platform-specific dependencies against your minimum version requirements. When library dependencies change (e.g., GLES versions), ensure compatibility with your stated platform minimums to avoid runtime failures.
