55 lines
1.8 KiB
Markdown
55 lines
1.8 KiB
Markdown
|
# MetaPlugin Demo iOS
|
||
|
|
||
|
This project is a small example for how to implement the WebID Meta-Plugin.
|
||
|
The code of the used project is described with several comments on how to implement.
|
||
|
|
||
|
## Tutorial
|
||
|
|
||
|
Generate `Credentials.swift` file
|
||
|
```bash
|
||
|
./init.sh
|
||
|
```
|
||
|
|
||
|
To start the plugin inside this demo project, open the Credentials.swift file.
|
||
|
You will find a class.</br>
|
||
|
You should have been supplied with a username and an api-key for your environment.
|
||
|
Replace the placeholders in the Credentials class.</br>
|
||
|
|
||
|
|
||
|
In order to run a video-ident process, you will need to create it first outside of the app.
|
||
|
From the process creation request to the server, you should have received an action-id, consisting of 9 numbers.
|
||
|
Insert this number in the Credentials class, by replacing the placeholder string with the action-id as a string.</br>
|
||
|
|
||
|
After that, start the demo app on an iOS device.</br>
|
||
|
Press the main button on the Main screen to start the plugin during runtime.
|
||
|
|
||
|
|
||
|
## Fastened Tutorial
|
||
|
|
||
|
<ol>
|
||
|
<li>Replace placeholder strings in Credentials.swift</li>
|
||
|
<li>Create process via mobile api</li>
|
||
|
<li>Replace placeholder string of action-id with action-id from process-creation response</li>
|
||
|
<li>Start plugin</li>
|
||
|
<li>Click main button of the Main Screen to start the plugin</li>
|
||
|
</ol>
|
||
|
|
||
|
|
||
|
## Theming (Optional)
|
||
|
|
||
|
The implemented version of the plugin in this project supports customized theming.</br>
|
||
|
To implement or experiment with different themes, navigate to the file CustomizedPluginTheme.swift and change the return value of the getLightVersion method.</br>
|
||
|
E.G.
|
||
|
|
||
|
```
|
||
|
internal static func getLightVersion() -> WebidAppTheme {
|
||
|
WebidAppTheme(
|
||
|
Background: UIColor.blue,
|
||
|
PrimaryColor: UI.Color.cyan
|
||
|
)
|
||
|
}
|
||
|
```
|
||
|
|
||
|
Consult the theming guide to see what items can be manipulated.</br>
|
||
|
To change the Dark mode theming, change the getDarkVersion() method as well.
|