t1k:unity:tof:iap
| Field | Value |
|---|---|
| Module | tof |
| Version | 3.46.8 |
| Effort | medium |
| Tools | — |
Keywords: iap, in-app-purchase, receipt-validation, scriptable-object, store
How to invoke
Section titled “How to invoke”/t1k:unity:tof:iapScope — this is a candidate index, not an inventory. This skill indexes one source folder. A feature can span
Assets/TheOneFeature/,Packages/com.gdk.*, and siblingAssets/TheOne.*packages, and this skill will only show the folder it was built from. A capability missing here is not evidence that it is absent — verify against source (grep over a stated scope) before concluding anything does not exist. See The1Studio/theonekit-unity#350.
Purpose
Section titled “Purpose”A feature package for In-App Purchase functionality in TheOne framework, providing a standardized interface for managing in-app purchases in Unity mobile games.
⚠️ This skill documents the shop-pack WRAPPER, not the purchase engine.
FeatureIAPService/IAPValidator/IapPackDataServicesit on top of a separate layer that performs the actual transactions, and that layer is not documented by anytof-*skill:
Concern Where Purchase service interface Packages/com.gdk.3rd/IAP/IIapServices.csUnity IAP implementation Packages/com.gdk.3rd/IAP/UnityIapServices.csPurchase restore UnityIapServices—OnRestorePurchaseCompleteSignal,onRestoreCompleteReceipt data / validation types Packages/com.gdk.3rd/Contracts/AnalyticServices/Tools/IAPReceiptDataClasses.csPurchase signals Packages/com.gdk.3rd/IAP/Signals/*.csReceipt validation and purchase restore both exist. They have been reported absent on the strength of this skill’s silence — read
com.gdk.3rdbefore concluding otherwise. See #350.
Decision defaults — do not ask
Section titled “Decision defaults — do not ask”- Monetization surfaces wire through the interfaces already shipping in the project —
never build a mock. Resolve the registered implementation in the composition root and
call the interface: IAP via
IIapServices(com.gdk.3rd); ads via the registered ad/mediation service; shop / piggy bank / battle pass via the GameFoundation + TOF service each exposes. - Editor/test behaviour is whatever the registered implementation does — the
Dummy*binding under a missing define is the editor result; do not mock on top of it. - Never ask “mock, real SDK, or skip”. An unregistered service is fixed by registering the real one, never by stubbing it.
Public API
Section titled “Public API”class
FeatureIAPService(FeatureIAPService.cs)FeatureIAPVContainer(FeatureIAPVContainer.cs)IAPPackageConfigBlueprint(IAPPackageConfigBlueprint.cs) — CSV-backed config; notIAPPackageConfig(no such type)IAPPackageVisualConfigBlueprint,IAPPackageVisualConfigRecord,IAPPackageVisualRowRecord(IAPPackageVisualConfigBlueprint.cs)IapPackData(IapPacksLocalData.cs)IapPacksLocalData(IapPacksLocalData.cs) —IWritableData, holds theIapPackDatarecordsIapPackDataService(IapPackDataService.cs)IapPackSuggestionService(IapPackSuggestionService.cs)IAPValidator(IAPValidator.cs)PurchaseIdAttribute(PurchaseIdAttribute.cs)PurchaseIdDropdownDrawer(PurchaseIdDropdownDrawer.cs)ShopPackReplaceBlueprint(ShopPackReplaceBlueprint.cs)ShopPackReplaceRecord(ShopPackReplaceBlueprint.cs)
Signals / Events
Section titled “Signals / Events”None detected.
Config / ScriptableObjects
Section titled “Config / ScriptableObjects”ShopPackReplaceBlueprint
Integration Steps
Section titled “Integration Steps”- Reference package
TheOneFeaturein your project. - Register the IAP services via VContainer (see Architecture).
- Configure any ScriptableObjects listed in Config section.
- Subscribe to signals listed in Signals / Events to react to state changes.
Architecture
Section titled “Architecture”Detected public types (15): class
FeatureIAPService(FeatureIAPService.cs)FeatureIAPVContainer(FeatureIAPVContainer.cs)IAPPackageConfigBlueprint(IAPPackageConfigBlueprint.cs) — CSV-backed config; notIAPPackageConfig(no such type)IAPPackageVisualConfigBlueprint,IAPPackageVisualConfigRecord,IAPPackageVisualRowRecord(IAPPackageVisualConfigBlueprint.cs)IapPackData(IapPacksLocalData.cs)IapPacksLocalData(IapPacksLocalData.cs) —IWritableData, holds theIapPackDatarecordsIapPackDataService(IapPackDataService.cs)IapPackSuggestionService(IapPackSuggestionService.cs)IAPValidator(IAPValidator.cs)PurchaseIdAttribute(PurchaseIdAttribute.cs)PurchaseIdDropdownDrawer(PurchaseIdDropdownDrawer.cs)ShopPackReplaceBlueprint(ShopPackReplaceBlueprint.cs)ShopPackReplaceRecord(ShopPackReplaceBlueprint.cs)
Detected DI registrations:
FeatureIAPServiceIapPackDataServiceIapPackSuggestionServicePurchaseIdAttribute
Dependencies
Section titled “Dependencies”Not yet documented. This section was never filled in; it is a known gap, not a
statement that the feature has no dependencies. Read the .asmdef next to the source
folder above for the authoritative list.
Hard rules
Section titled “Hard rules”- Store validation is async;
PurchaseIdAttributemust be applied to string fields only. - ShopPackReplaceBlueprint uses record types; edits via editor may drop null fields.
IAPPackageConfigdoes not exist — earlier versions of this skill listed it in both Public API and Architecture. The real CSV-backed config type isIAPPackageConfigBlueprint(Core/Features/IAP/Scripts/Models/IAPPackageConfigBlueprint.cs). Verified against source.- Restore has an imperative entry point as well as a signal.
IIapServices.RestorePurchases(Action onComplete, Action onFail = null)(Packages/com.gdk.3rd/IAP/IIapServices.cs:35) is the call you invoke; the concrete consumer wiring it into game UI/flow isAssets/UITemplate/Sources/Scripts/Modules/Monetize/UITemplateIapServices.cs. Nothing in this package calls restore — do not read that as restore being unimplemented.
References
Section titled “References”- Source:
Assets/TheOneFeature/Core/Features/IAP/ - Doc:
Assets/TheOneFeature/Core/Features/IAP/README.md - Doc:
Assets/TheOneFeature/Core/Features/IAP/CHANGELOG.md - Namespace:
TheOne.Features.IAP.Core,TheOne.Features.IAP.Core.DI,TheOne.Features.IAP.Core.Models.Blueprints,TheOne.Features.IAP.Core.Models,TheOne.Features.IAP.Core.Services - Purchase restore consumer:
Assets/UITemplate/Sources/Scripts/Modules/Monetize/UITemplateIapServices.cs - Restore contract:
IIapServices.RestorePurchases—Packages/com.gdk.3rd/IAP/IIapServices.cs:35