GodotApplePlugins.NET
0.0.2-alpha
This is a prerelease version of GodotApplePlugins.NET.
dotnet add package GodotApplePlugins.NET --version 0.0.2-alpha
NuGet\Install-Package GodotApplePlugins.NET -Version 0.0.2-alpha
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GodotApplePlugins.NET" Version="0.0.2-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GodotApplePlugins.NET" Version="0.0.2-alpha" />
<PackageReference Include="GodotApplePlugins.NET" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GodotApplePlugins.NET --version 0.0.2-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GodotApplePlugins.NET, 0.0.2-alpha"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GodotApplePlugins.NET@0.0.2-alpha
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GodotApplePlugins.NET&version=0.0.2-alpha&prerelease
#tool nuget:?package=GodotApplePlugins.NET&version=0.0.2-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GodotApplePlugins.NET
A C# wrapper for GodotApplePlugins - provides typed access to Apple APIs (GameCenter, StoreKit, Sign in with Apple, AVFoundation, and more) in Godot C# projects.
Features
- Generated from source - Wrappers are automatically generated from GodotApplePlugins XML documentation
- Type-safe - Compile-time checking for method names, parameters, and return types
- C# events - Godot signals exposed as native C# events
- Full coverage - All GodotApplePlugins classes wrapped
Installation
NuGet Package
dotnet add package GodotApplePlugins.NET
Or add to your .csproj:
<PackageReference Include="GodotApplePlugins.NET" Version="0.0.1-alpha" />
Requirements
- Godot 4.3+
- .NET 8.0
- GodotApplePlugins GDExtension installed in your project
- macOS 14.0+ or iOS 17.0+
Usage
Game Center
using GodotApplePlugins.NET;
using GodotApplePlugins.NET.GameCenter;
public partial class MyGame : Node
{
private GameCenterManager? _gameCenter;
public override void _Ready()
{
// Check if running on Apple platform
if (!ApplePlugins.IsAvailable())
{
GD.Print("Apple plugins not available on this platform");
return;
}
// Create the manager
_gameCenter = ApplePlugins.TryCreateGameCenterManager();
if (_gameCenter == null)
{
GD.Print("GameCenterManager not found - is the GDExtension installed?");
return;
}
// Subscribe to events
_gameCenter.AuthenticationResult += OnAuthResult;
_gameCenter.AuthenticationError += OnAuthError;
// Authenticate
_gameCenter.Authenticate();
}
private void OnAuthResult(bool success)
{
if (success)
{
GD.Print("Game Center authenticated!");
}
}
private void OnAuthError(string message)
{
GD.PrintErr($"Game Center auth failed: {message}");
}
}
StoreKit (In-App Purchases)
using GodotApplePlugins.NET;
using GodotApplePlugins.NET.StoreKit;
private StoreKitManager? _storeKit;
public void InitializeStore()
{
_storeKit = ApplePlugins.TryCreateStoreKitManager();
if (_storeKit == null) return;
// Subscribe to events
_storeKit.ProductsRequestCompleted += OnProductsLoaded;
_storeKit.PurchaseCompleted += OnPurchaseCompleted;
// Request products
_storeKit.RequestProducts(new[] { "com.yourapp.product1" });
}
private void OnProductsLoaded(StoreProduct[] products, int status)
{
foreach (var product in products)
{
GD.Print($"Product: {product.DisplayName} - {product.DisplayPrice}");
}
}
private void OnPurchaseCompleted(StoreTransaction transaction, int status, string message)
{
if (status == 0) // OK
{
GD.Print($"Purchase successful: {transaction.ProductId}");
transaction.Finish(); // Important: call finish after delivering content
}
}
Sign in with Apple
using GodotApplePlugins.NET;
using GodotApplePlugins.NET.Authentication;
var authController = ApplePlugins.TryCreateASAuthorizationController();
if (authController != null)
{
authController.AuthorizationCompleted += credential =>
{
GD.Print($"Signed in as: {credential.User}");
};
authController.AuthorizationFailed += error =>
{
GD.PrintErr($"Sign in failed: {error}");
};
authController.Signin();
}
API Reference
Namespaces
| Namespace | Description |
|---|---|
GodotApplePlugins.NET |
Main entry point (ApplePlugins class) |
GodotApplePlugins.NET.GameCenter |
Game Center APIs |
GodotApplePlugins.NET.StoreKit |
In-app purchase APIs |
GodotApplePlugins.NET.Authentication |
Sign in with Apple, OAuth |
GodotApplePlugins.NET.AVFoundation |
Audio session control |
GodotApplePlugins.NET.Foundation |
Foundation utilities (URL, UUID) |
GodotApplePlugins.NET.UI |
Native UI (file picker) |
Key Classes
| Class | Description |
|---|---|
ApplePlugins |
Static factory for creating wrapper instances |
GameCenterManager |
Entry point for Game Center authentication |
GKLocalPlayer |
The authenticated local player |
GKMatch |
Real-time multiplayer match |
StoreKitManager |
In-app purchase management |
StoreProduct |
Product information |
StoreTransaction |
Purchase transaction |
ASAuthorizationController |
Sign in with Apple |
ASWebAuthenticationSession |
OAuth/web authentication |
AVAudioSession |
iOS audio session control |
AppleFilePicker |
Native file picker |
Development
Regenerating Wrappers
The C# wrappers are generated from GodotApplePlugins XML documentation. To regenerate:
- Update the XML files in
doc_classes/from upstream - Run the generator:
./generate.sh
Or manually:
dotnet run --project src/GodotApplePlugins.Generator -- doc_classes src/GodotApplePlugins.NET/Generated
Project Structure
GodotApplePlugins.NET/
├── doc_classes/ # XML docs from GodotApplePlugins
├── src/
│ ├── GodotApplePlugins.NET/ # The NuGet package
│ │ └── Generated/ # Auto-generated wrappers
│ └── GodotApplePlugins.Generator/ # Code generator
├── generate.sh # Regeneration script
└── README.md
License
MIT
Credits
This wrapper is built on top of GodotApplePlugins by Miguel de Icaza.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Godot.SourceGenerators (>= 4.3.0)
- GodotSharp (>= 4.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.2-alpha | 102 | 1/19/2026 |
| 0.0.1-alpha | 87 | 1/18/2026 |