# Yovo market build profiles

This file is the build contract for games using Yovo Unity SDK. It is stored under
`Assets/_Yovo/Documentation` so it is exported with the SDK and linked from the
`YovoMain` inspector.

## Source of truth

Changing `Store type` in `YovoMain` must prepare the complete market profile, not
only change a value sent to the backend. `YovoNativeSdkSwitcher` must:

- activate the matching native `YovoAds 7.1.5-S.aar`;
- keep canonical vendor files under `NativeSDKs` and copy the required files into `Assets`;
- remove vendor plugins and billing libraries that are forbidden or unused for the selected market;
- write `YovoAdsMarketDependencies.xml`;
- validate local Firebase Unity artifacts and remove stale dependency declarations;
- configure package identity, min SDK, AAB/APK mode and signing profile;
- run Android Resolver synchronously after switching and again before the build;
- write the active profile to `Assets/_Yovo/Plugins/active-native-sdk.json`.

`Store type` controls the active build profile only. All store identifiers in
`YovoMain` remain visible and editable at the same time: Google Play package,
Huawei App ID, Apple App ID and purchase prefix, Amazon package, Aptoide market
name and Aptoide billing public key. Switching markets must not disable, clear
or overwrite any of these values.

Do not manually combine plugin directories from different markets.

## Exporting updates to games

Use **Yovo > SDK Export > Export Safe Update Package (Preserve YovoMain)** for
an existing game. The package physically excludes
`Assets/_Yovo/Resources/Yovo/YovoMain.prefab`, so application IDs, ad units,
market selection, test flags, and enabled formats cannot be overwritten during
import. The bootstrap package includes the template prefab and is only for a
new integration.

## Required matrix

`+` means the feature is supported and may be enabled. `-` means it is excluded
from that market build. An unavailable advertising-network toggle in `YovoMain`
is forced to `Off` and disabled, so it cannot be enabled accidentally.

| Capability | Google Play | Huawei | Aptoide | Amazon | Apple |
| --- | :---: | :---: | :---: | :---: | :---: |
| Cross-promotion | + | + | + | + | + |
| AdMob / Google Mobile Ads | + | - | + | + | + |
| Huawei Ads | - | + | - | - | - |
| Unity Ads | + | + | + | + | + |
| IronSource / LevelPlay | + | + | + | + | + |
| Kidoz | + | + | + | + | + |
| Facebook Ads | - | - | - | - | - |
| GameOffer | + | + | + | + | + |
| GameOffer Family | + | - | - | - | - |
| Firebase | + | - | - | - | - |
| Google Play Billing `9.1.0` | + | - | - | - | - |
| Huawei HMS IAP | - | - | - | - | - |
| Aptoide / AppCoins Billing | - | - | + | - | - |
| Amazon Appstore SDK / DRM | - | - | - | + | - |
| StoreKit | - | - | - | - | + |
| In-app purchases | + | - | + | - | + |
| Subscriptions | + | - | - | - | + |
| All paid characters use rewarded locks | - | + | - | + | - |
| Default Android keystore | + | - | + | + | - |
| Dedicated Huawei keystore | - | + | - | - | - |
| Android AAB output | + | + | - | + | - |
| Android APK output | - | + | + | + | - |
| Apple archive / TestFlight | - | - | - | - | + |

On Apple, Unity Ads, IronSource and Kidoz support interstitial and rewarded
formats; their banner wrappers are not available. AdMob supports all three ad
formats. The ad-format toggles and the curator scenario still decide which of
the supported formats are initialized and used.

`Firebase` in this table means the Firebase components actually installed in the
game, currently App/Auth plus the native Analytics dependency for Google Play.
The switcher must not declare `firebase-analytics-unity` unless its local Unity
artifact exists. Firebase configuration and startup services must never leak into
Huawei, Aptoide or Amazon builds.

For Aptoide, Amazon and Huawei profiles the switcher also moves
`Firebase.Editor.dll` into the local native-SDK cache. This prevents Firebase's
Editor postprocessor from reporting a false Bundle ID mismatch when
`google-services.json` is intentionally absent. The DLL and the game-specific
Firebase configuration are restored automatically for Google Play; Apple keeps
the Editor plugin available for iOS dependency processing.

## Google Play

- Enable Google Mobile Ads, Firebase, Install Referrer, Google Play services and Google Play Billing `9.1.0`.
- Disable Huawei Ads, Huawei IAP, Amazon billing and Aptoide/AppCoins Billing.
- Purchases and subscriptions are enabled.
- GameOffer Family is enabled.
- Use `com.YovoGames.hair` and the default game keystore.
- Build an AAB for Play Console.
- ABI contract for Google Play AAB: include `arm64-v8a` and `armeabi-v7a`;
  exclude `x86_64`.
- For Hair, banner remains disabled; interstitial and rewarded remain enabled.

## Huawei AppGallery

- Enable the Huawei native AAR, AGConnect configuration and Huawei Ads.
- Disable Google Mobile Ads, Firebase, Google Play Billing, HMS IAP and Aptoide/AppCoins Billing.
- Purchases are disabled. Do not initialize the native purchase bridge.
- Convert every paid character lock to rewarded-ad access.
- Disable GameOffer Family and show the standard `Coming soon` dialog when tapped.
- Use the dedicated Huawei upload keystore and AppGallery identifiers.
- Verify the final artifact contains Huawei Ads/AGConnect and contains no Google/Firebase billing or advertising classes.

## Aptoide

- Enable the Aptoide native AAR, Google Mobile Ads and AppCoins Billing.
- Disable Huawei Ads, Firebase and Google Play Billing.
- Keep only the one-time full-version purchase. Subscriptions are unavailable.
- Disable GameOffer Family.
- Use the Aptoide market name, application public key and the default game keystore.
- Verify purchase, backend validation, restore and full-content unlock before submission.
- Follow Aptoide PSV: keep the Google Play package name and Play App Signing
  certificate, but give the Aptoide artifact a higher `versionCode`. For
  example, use Google Play `152` and Aptoide `1152`.
- To obtain the Play signature, upload the Aptoide-configured artifact to a
  Google Play **Internal testing** draft, download **Signed, universal APK**,
  then discard the draft and delete the temporary artifact. Upload the
  downloaded APK to Aptoide Connect.
- Never promote that Aptoide-configured Internal testing artifact to Google
  Play Production. Production receives the separate Google Play AAB.

## Amazon Appstore

- Enable the Amazon native AAR and Amazon Appstore SDK required for DRM/runtime integration.
- Google Mobile Ads may remain enabled for Amazon. Disable Huawei Ads, Firebase, Google Play Billing and Aptoide/AppCoins Billing.
- Purchases are disabled. Do not initialize the native purchase bridge.
- Convert every paid character lock to rewarded-ad access.
- Disable GameOffer Family and show the standard `Coming soon` dialog when tapped.
- Use the default game keystore.
- The requested min SDK is 22, but Unity 6 currently clamps it to 26.

## Apple App Store

- Android AAR switching does not apply.
- Use the Apple framework and CocoaPods defined for the iOS export.
- StoreKit purchases and subscriptions are enabled.
- GameOffer Family is disabled.
- Follow `release-build-guide.en.md` or `release-build-guide.ru.md` for archive, TestFlight and App Review.

## Checklist after selecting a market

1. Open `YovoMain` and select the target `Store type`.
2. Confirm game-specific IDs, ad unit IDs and ad-format toggles were not overwritten.
3. Press `Activate native SDK for <store>` if the active marker differs.
4. Confirm the console contains `Android dependencies resolved successfully`.
5. Verify `active-native-sdk.json`, package/market identifier, keystore and output format.
6. Confirm production builds have `Run as test app`, `Test Advertising` and screenshot purchase unlock disabled.
7. Build and inspect the final APK/AAB dependency set, not only the Unity project folders.
8. Test startup, curator scenario, ads, GameOffer, purchases or rewarded locks, events and crash reporting.

The Android postprocessor clears generated Gradle `build`/`.gradle` caches for
every build. Do not remove this step: sequential builds for different markets
can otherwise retain DEX classes from the previous market or omit dependencies
restored immediately before the first build.

Android release artifacts are named `<package>_<market>_<version>.apk` or
`<package>_<market>_<version>.aab`. When Unity generates an IL2CPP symbols archive, the
post-build step also renames it to
`<package>_<market>_<version>.symbols.zip`. Upload that
matching archive to the store crash-symbols section together with the build.

## Families commercial-content disclosure

All Yovo-rendered commercial surfaces use the same high-contrast disclosure:

- cross-promo banner, interstitial and rewarded creatives show `ADVERTISEMENT`;
- GameOffer promotional lists, promoted cards and special offers show `ADVERTISEMENT`;
- purchase screens show `IN-APP PURCHASE`;
- the Family offer shows `SUBSCRIPTION`.

The disclosure is an opaque dark strip with a yellow outline and uppercase text.
It must stay visible above the commercial creative and must not be resized,
recolored, covered or removed by a game integration. Native ad-network formats
keep the disclosure supplied by their certified SDK. Before publishing a
Families build, inspect every custom ad and purchase surface on both the widest
and narrowest supported screen ratios.

The GameOffer navigation launcher is not an ad creative and does not show the
`ADVERTISEMENT` disclosure. The disclosure appears after opening a promotional
list or promoted game card.

## Hair-specific assertions

- Google Play: purchases and GameOffer Family work; normal character purchase/reward logic is retained.
- Huawei: no purchases; all paid characters are rewarded-locked; Huawei Ads is present; Family is blocked.
- Aptoide: one-time full-version purchase works; subscriptions and Family are blocked.
- Amazon: no purchases; all paid characters are rewarded-locked; Family is blocked.
- Apple: StoreKit works; Family is blocked.
