These are the directions for running the Sunshine Identity app in iOS emulator on MacOS. To run it on Android, use the directions on the README.
Once substrate releases rc5 (and we update our code to use rc5), the directions on the README will work for iOS as well, but, for now, the following directions are the only way to get it working.
Make a new directory called sunshine-identity-demo and enter it
$ mkdir sunshine-identity-demo && cd sunshine-identity-demo
# in /sunshine-identity-ui
$ cargo make ios-release --profile release
this will take a while, get a cup of coffee or watch a Netflix Movie ;)
Next, run
# in /sunshine-identity-ui
$ cargo make post-ios --profile release
Open the ios simulator from the command line
$ open -a simulator
You may also find Simulator and navigate File -> Open Device -> iOS 13.5 -> Iphone SE (this is the device I last tested it on)
Run the flutter app
# in /sunshine-identity-ui
$ flutter run
This should open the Flutter App in your emulator automatically.
Demo Instructions
When the app opens, it will take the client some time to sync. This is because substrate creates empty blocks even when there are no transactions. The app's client is syncing with a live testnet.
Once it is done syncing, click Generate An Account and follow the directions. Behind the scenes, this is generating a unique ID, associating it with your device (device key), and storing your password hash in the local keystore (on the hardware).
Once the account is generated, click on the icon in the top right corner to access your account details.
Upon creating a new account, funds are already minted. This allows you to pay fees to link your github account or perform other demo actions.
To link your github account with your identity, click on the Identities header in the Account Settings. Click on Github and click Create Proof. Follow the directions in the UI and post the provided markdown text in a gist titled sunshine-identity-proof.md publicly from your github account (create gist page).
After posting the gist, tell the UI to look for the proof. Behind the scenes, it is looking for the gist and parsing it to prove signed authorization to link with the github account.
Running the APP
These are the directions for running the Sunshine Identity app in iOS emulator on MacOS. To run it on Android, use the directions on the README.
Make a new directory called
sunshine-identity-demo
and enter itClone the master branch of this repository
Clone sysinfo locally
Edit
sysinfo
version (downgrade) insysinfo/Cargo.toml
Patch
sunshine-identity-ui/Cargo.toml
Place this below the existing workspace metadata in
sunshine-identity-ui/Cargo.toml
:Enter
sunshine-identity-ui
and runcargo update
Build the project using cargo make
this will take a while, get a cup of coffee or watch a Netflix Movie ;)
Next, run
Open the ios simulator from the command line
You may also find
Simulator
and navigate File -> Open Device -> iOS 13.5 -> Iphone SE (this is the device I last tested it on)Run the flutter app
This should open the Flutter App in your emulator automatically.
Demo Instructions
Once it is done syncing, click
Generate An Account
and follow the directions. Behind the scenes, this is generating a unique ID, associating it with your device (device key), and storing your password hash in the local keystore (on the hardware).Once the account is generated, click on the icon in the top right corner to access your account details.
To link your github account with your identity, click on the
Identities
header in the Account Settings. Click onGithub
and clickCreate Proof
. Follow the directions in the UI and post the provided markdown text in a gist titledsunshine-identity-proof.md
publicly from your github account (create gist page).After posting the gist, tell the UI to look for the proof. Behind the scenes, it is looking for the gist and parsing it to prove signed authorization to link with the github account.