You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Register the Unity Android OAuth callback at build time #2092
Goal: Make OAuth sign-in on Android return to the app for Unity SDK users. The package currently ships a manifest with a literal appwrite-callback-<YOUR_PROJECT_ID> scheme that can never be filled in when the package is installed from a git URL (read-only), and that manifest also redeclares UnityPlayerActivity with a launcher intent filter that competes with the project's own main manifest.
Remove templates/unity/Assets/Runtime/Core/Plugins/Android/AndroidManifest.xml.twig and its file entry and Android plugin-importer meta handling in src/SDK/Language/Unity.php.
Add templates/unity/Assets/Editor/AppwriteAndroidManifestProcessor.cs.twig, an IPostGenerateGradleAndroidProject (guarded by UNITY_ANDROID) that reads projectId from every AppwriteConfig asset and appends a VIEW/DEFAULT/BROWSABLE intent filter for appwrite-callback-<projectId> to the Unity activity in the generated Gradle manifest, skipping schemes already declared. Logs guidance when no config with a project ID exists.
templates/unity/README.md.twig: new "OAuth on Android" section, including the custom main manifest route for clients created in code.
templates/unity/Assets/Editor/AppwriteSetupWindow.cs.twig: Documentation button opens the SDK README on GitHub instead of sdk.url; Discord button uses sdk.discordUrl and is hidden when unset.
tests/generation/GenerationTest.php: tests that no AndroidManifest.xml or <YOUR_PROJECT_ID> placeholder ships, that the processor registers the same appwrite-callback- prefix WebAuthComponent waits for, and that the setup window links to the README with no fixed Discord invite.
Remaining steps: None beyond the linked PR; it is the full change. The fix reaches users with the next Unity SDK release generated from sdk-generator.
Activity