dfinity / examples

Example applications, microservices, and code samples for the Internet Computer
https://dfinity.org
Apache License 2.0
537 stars 362 forks source link

Add the example for Unity II integration by ios universallink #734

Closed vincent-dfinity closed 7 months ago

vincent-dfinity commented 7 months ago

This sample shows one way to integrate Internet Identity with Unity iOS apps via Universal links. It contains a dapp with II integrated, and an Unity Project which interacts with this dapp.

The basic workflow:

  1. Set up an Internet Identity integration dapp which supports logging in with II.
  2. Run a Unity game on iOS.
  3. Launch the Web Browser from the game to open the dapp frontend deployed in step 1, with the public key of Ed25519Identity as a parameter.
  4. Login with your Internet Identity in the Web Browser.
  5. Launch the application via Universal Links, and pass the DelegationIdentity back to the game as the URL parameter.
  6. Call the backend canister with the DelegationIdentity to greet through ICP.NET.

Here is a demo link for II + Unity iOS Universal Links.