name: sync description: Rigorous multi-platform feature synchronization for Godot AdMob. Use when adding or modifying ad formats, consent flows, or bridge methods to ensure GDScript, C#, Android, and iOS implementations are perfectly in sync.
AdMob Cross-Platform Synchronization
Ensure every bridge feature is implemented consistently across all supported platforms and languages.
๐ The "GDScript-First" Workflow
- Define in GDScript: Update
platforms/godot_editor/addons/admob/admob.gdor the specific ad format file.- Use
:=for type inference. - Use
snake_casefor methods.
- Use
- Mirror in C#: Update the corresponding file in
platforms/godot_editor/addons/admob/csharp/.- Use
PascalCasefor methods. - Ensure the internal
_plugin.Call("method_name")matches the GDScript snake_case.
- Use
- Implement Android: Update Kotlin source in
platforms/android/src/.- Implement the JNI bridge method.
- Match the signal names emitted back to Godot.
- Implement iOS: Update Swift/Obj-C source in
platforms/ios/src/.- Ensure SCons/SPM dependencies are updated if needed.
๐ Technical Mapping Reference
| Feature | GDScript | C# | Android (Kotlin) | iOS (Swift) |
|---|---|---|---|---|
| Dictionary | Dictionary |
Dictionary |
Map<String, Any> |
[String: Any] |
| Array | Array |
Array<T> |
List<T> |
[T] |
| Signal | emit_signal |
EmitSignal |
emitSignal |
emit_signal |
| Method | snake_case |
PascalCase |
camelCase |
camelCase |
๐งช Validation Steps
- GDScript: No parse errors in the editor.
- C#: Project compiles with Mono.
- Android:
./gradlew assembleDebugsucceeds. - iOS:
scons platform=ios(or Xcode build) succeeds. - Runtime: Both GDScript and C# samples show the same behavior/warnings on mobile.
๐ซ Constraints
- Never skip the C# implementation.
- Signals emitted from native MUST be prefixed with
_on_admob_where applicable. - Every new file MUST include the MIT License header.