chore: consolidate and migrate native-apps/unity_ii to icp-cli#1440
Open
marc0olo wants to merge 3 commits into
Open
chore: consolidate and migrate native-apps/unity_ii to icp-cli#1440marc0olo wants to merge 3 commits into
marc0olo wants to merge 3 commits into
Conversation
Consolidates unity_ii_applink and unity_ii_universallink into
unity_ii_deeplink and migrates the entire example to icp-cli.
- Replace dfx.json + webpack with icp.yaml, mops.toml, and Vite
- Port frontend to @icp-sdk/auth v7 + @icp-sdk/core v5.3 (no @dfinity/* deps)
- AuthClient.signIn() replaces the old login({onSuccess}) callback pattern
- ECDSAKeyIdentity, DelegationChain, Ed25519PublicKey from @icp-sdk/core/identity
- identityProvider defaults to https://id.ai/authorize (works locally since
icp-cli >= 0.2.4 trusts mainnet II signatures on the local replica)
- Update app.mo to use mo:core/Principal (replaces mo:base/Principal)
- Add duplicate-check to AndroidPostBuildProcessor.cs (from applink variant)
- Make greetFrontend, greetBackendCanister, icGateway configurable fields
in TestICPAgent.cs (removes hardcoded mainnet canister IDs)
- Add test.sh, CI workflow, and consolidated README documenting local vs
mainnet testability for all three URL-scheme variants
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- After II login, show "Logged in as: <principal>" in the page instead of no visible feedback - Replace silent console.error on Launch button with an inline message when the page was opened without a sessionkey (direct browser, not from Unity app) - Add TESTING.md with the full test sequence for Levels 1–4 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace `icp canister id` with `icp canister status -i` throughout TESTING.md and README.md - Note AgentAndPlugin as the GameObject that holds TestICPAgent Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1347.
Summary
unity_ii_applinkandunity_ii_universallinkintounity_ii_deeplink(single canonical example)dfx.json+ webpack withicp.yaml,mops.toml, and Vite@icp-sdk/authv7 +@icp-sdk/corev5.3 — no@dfinity/*packages remainAndroidPostBuildProcessor.cs(was already in the applink variant but missing from deeplink)icGatewayfor local device testing)test.sh, CI workflow, and consolidated README documenting local vs. mainnet testability for all three URL-scheme variantsKey decisions
Double-delegation bridge — preserved intact; educational value depends on it.
No local II deployment —
icp.yamlhas noii: true. The frontend hardcodeshttps://id.ai/authorize(the default in@icp-sdk/authv7). icp-cli ≥ 0.2.4 trusts mainnet BLS signatures on the local replica, so delegations from mainnet II work locally.SDK migration (
@dfinity/*→@icp-sdk/*):AuthClient.create({identity}) + login({onSuccess})→new AuthClient({identity}) + signIn()ECDSAKeyIdentity,DelegationChain,Ed25519PublicKeyfrom@icp-sdk/core/identitysafeGetCanisterEnv()from@icp-sdk/core/agent/canister-envMotoko:
mo:base/Principal→mo:core/Principal(matches AGENTS.md andwho_am_i)What can be tested locally
internetidentity://callbackTest plan
icp network start -d && icp deploy && bash test.shpasses in thenative-apps/unity_ii_deeplinkdirectorynpm run build --prefix frontend)icp deploy -e icand Unity Inspector updated with deployed canister IDs🤖 Generated with Claude Code