# V2 Platform SDK Integration Guide

Phase 72.21.1.15 documents the platform SDK boundary and the per-platform
bring-up path for V2. This guide is the consolidated handoff for engineers who
need to wire Steamworks, Epic Online Services, GOG Galaxy, PlayStation SDK, Xbox
GDK, or Nintendo SDK providers without leaking platform SDK headers into
gameplay modules.

## Source Of Truth

- Contract:
  [PlatformSdkIntegrationGuide_V2_Contract.json](../../ue/Content/V2/Online/PlatformSdkIntegrationGuide_V2_Contract.json)
- Runtime abstraction:
  [platform-sdk-abstraction.md](platform-sdk-abstraction.md)
- PC provider docs:
  [steamworks-sdk-integration.md](steamworks-sdk-integration.md),
  [eos-sdk-integration.md](eos-sdk-integration.md), and
  [gog-galaxy-sdk-integration.md](gog-galaxy-sdk-integration.md)
- Console stub docs: [playstation-sdk-stub.md](playstation-sdk-stub.md) and
  [xbox-gdk-sdk-stub.md](xbox-gdk-sdk-stub.md)
- Feature routing docs:
  [achievement-trophy-platform-routing.md](achievement-trophy-platform-routing.md),
  [rich-presence-routing.md](rich-presence-routing.md),
  [platform-friend-list-integration.md](platform-friend-list-integration.md),
  [platform-cloud-save-sync.md](platform-cloud-save-sync.md),
  [platform-overlay-integration.md](platform-overlay-integration.md), and
  [platform-entitlement-verification.md](platform-entitlement-verification.md)
- Certification evidence:
  [platform-compliance-checklist.md](platform-compliance-checklist.md)

## Shared Runtime Boundary

`FV2PlatformSdkAbstractionSpec` is the source of truth for provider bindings,
required feature coverage, and isolation rules. Gameplay code sends
`FV2PlatformSdkRequest` values through `ResolvePlatformSdkRequest`; provider
adapters produce `FV2PlatformSdkResult` evidence without exposing native SDK
headers.

Required boundary rules:

- `bNoSdkHeadersInGameplayModules` stays true.
- `bNdaSdkCodeBehindPlatformModules` stays true for console SDKs.
- `bFallbacksFailClosed` stays true for unsupported or missing platform
  features.
- Store, overlay, entitlement, achievements, friends, presence, cloud saves, and
  voice chat all route through the platform SDK abstraction.

## Provider Setup Matrix

| Provider             | Platform    | Account provider | Module path                                                 | Public bridge                       | Required docs                                     |
| -------------------- | ----------- | ---------------- | ----------------------------------------------------------- | ----------------------------------- | ------------------------------------------------- |
| Steamworks           | PC          | Steam            | `Plugins/Online/PlatformSDK/Steamworks`                     | `V2SteamworksSdkBridge`             | `steamworks-sdk-integration.md`                   |
| Epic Online Services | PC          | Epic Games       | `Plugins/Online/PlatformSDK/EpicOnlineServices`             | `V2EosSdkBridge`                    | `eos-sdk-integration.md`                          |
| GOG Galaxy           | PC          | GOG              | `Plugins/Online/PlatformSDK/GOGGalaxy`                      | `V2GogGalaxySdkBridge`              | `gog-galaxy-sdk-integration.md`                   |
| PlayStation SDK      | PlayStation | PSN              | `Restricted/NotForLicensees/Online/PlatformSDK/PlayStation` | `V2PlayStationSdkStubBridge`        | `playstation-sdk-stub.md`                         |
| Xbox GDK             | Xbox        | Xbox Live        | `Restricted/NotForLicensees/Online/PlatformSDK/XboxGDK`     | `V2XboxGdkSdkStubBridge`            | `xbox-gdk-sdk-stub.md`                            |
| Nintendo SDK         | Switch      | Nintendo Account | `Restricted/NotForLicensees/Online/PlatformSDK/Nintendo`    | `V2PlatformSDKNintendo` abstraction | `platform-sdk-abstraction.md` and LotCheck gating |

## PC Provider Integration

Steamworks, EOS, and GOG Galaxy are public provider integrations. They must:

- Configure the provider binding in `FV2PlatformSdkAbstractionSpec`.
- Use their public bridge (`V2SteamworksSdkBridge`, `V2EosSdkBridge`, or
  `V2GogGalaxySdkBridge`) rather than native headers in gameplay code.
- Validate achievements, friends, presence, overlays, cloud saves, matchmaking,
  leaderboards, voice or anti-cheat features according to the provider-specific
  contract.
- Delegate unsupported behavior to explicit fail-closed results or approved
  bridge fallbacks such as `V2PlatformVoiceBridge`.

## Console Provider Integration

PlayStation SDK, Xbox GDK, and Nintendo SDK integrations remain
certification-scoped and NDA-isolated. Shared V2 code may name public stubs and
abstract bridge commands, but proprietary SDK calls stay inside restricted
platform modules.

Console integrations must:

- Keep restricted module paths under
  `Restricted/NotForLicensees/Online/PlatformSDK`.
- Mark bindings `bNdaIsolated` and `bCertificationScoped`.
- Use public stub interfaces such as `V2PlayStationSdkStubBridge` and
  `V2XboxGdkSdkStubBridge` for shared automation.
- Route platform entitlements, overlays, achievements, cloud saves, friends, and
  compliance evidence through public contracts.
- Preserve fail-closed behavior when the native platform API or certification
  scope is missing.

## Feature Routing Map

| Feature           | Primary contract                               | Providers covered                                          |
| ----------------- | ---------------------------------------------- | ---------------------------------------------------------- |
| Achievements      | `AchievementTrophyPlatformRouting_V2_Contract` | Steamworks, EOS, GOG Galaxy, PlayStation SDK, Xbox GDK     |
| Friends           | `PlatformFriendListIntegration_V2_Contract`    | Steamworks, EOS, GOG Galaxy, PlayStation SDK, Xbox GDK     |
| Rich presence     | `RichPresenceRouting_V2_Contract`              | Steamworks, EOS, GOG Galaxy, PlayStation SDK, Xbox GDK     |
| Cloud saves       | `PlatformCloudSaveSync_V2_Contract`            | Steamworks, EOS, GOG Galaxy, PlayStation SDK, Xbox GDK     |
| Overlays          | `PlatformOverlayIntegration_V2_Contract`       | Steamworks, EOS UI, GOG Galaxy, PlayStation SDK, Xbox GDK  |
| Entitlements      | `PlatformEntitlementVerification_V2_Contract`  | Steamworks, EOS, GOG Galaxy, PlayStation SDK, Xbox GDK     |
| Prompt icons      | `PlatformInputPromptIcons_V2_Contract`         | Keyboard/mouse, generic gamepad, PlayStation, Xbox, Switch |
| Compliance status | `PlatformComplianceChecklist_V2_Contract`      | PlayStation TRC, Xbox XR, Nintendo LotCheck                |

## Compliance And Evidence

Certification evidence is generated through
`FV2PlatformComplianceChecklistPolicy` and
`GeneratePlatformComplianceChecklistStatus`. Evidence tags such as
`Evidence.PlatformSdk.CertScope`, `Evidence.Entitlements.CurrentPlatform`,
`Evidence.PlatformOverlay.FocusRestore`, and `Evidence.Input.PromptIcons` link
the provider integrations to the TRC, XR, and LotCheck checklist report.

Do not paste proprietary platform certification text into this repo. Use public
requirement ids, public evidence tags, and restricted platform module references
instead.

## Validation Commands

```bash
python3 V2/ue/Tools/check-v2-platform-sdk-abstraction.py
python3 V2/ue/Tools/check-v2-steamworks-sdk-integration.py
python3 V2/ue/Tools/check-v2-eos-sdk-integration.py
python3 V2/ue/Tools/check-v2-gog-galaxy-sdk-integration.py
python3 V2/ue/Tools/check-v2-playstation-sdk-stub.py
python3 V2/ue/Tools/check-v2-xbox-gdk-sdk-stub.py
python3 V2/ue/Tools/check-v2-achievement-trophy-platform-routing.py
python3 V2/ue/Tools/check-v2-rich-presence-routing.py
python3 V2/ue/Tools/check-v2-platform-friend-list-integration.py
python3 V2/ue/Tools/check-v2-platform-cloud-save-sync.py
python3 V2/ue/Tools/check-v2-platform-overlay-integration.py
python3 V2/ue/Tools/check-v2-platform-entitlement-verification.py
python3 V2/ue/Tools/check-v2-platform-compliance-checklist.py
python3 V2/ue/Tools/check-v2-platform-sdk-integration-guide.py
python3 -m json.tool V2/ue/Content/V2/Online/PlatformSdkIntegrationGuide_V2_Contract.json
python3 -m json.tool V2/ue/Build/Horde/v2-buildgraph-job.json
python3 V2/tools/validate-v2-docs.py
```
