Skip to content

Commit 6b46abd

Browse files
authored
Updated addon interface to v2. (#14)
1 parent 87838d7 commit 6b46abd

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

DeeplinkPlugin/gdp_converter.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ + (Dictionary) nsUrlToGodotDictionary:(NSURL*) url {
6969
dictionary["path"] = [url.path UTF8String];
7070
dictionary["pathExtension"] = [url.pathExtension UTF8String];
7171
dictionary["pathComponents"] = url.pathComponents;
72-
dictionary["parameterString"] = [url.parameterString UTF8String];
7372
dictionary["query"] = [url.query UTF8String];
7473
dictionary["fragment"] = [url.fragment UTF8String];
7574

README.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Steps:
5050
- leave `path prefix` empty to process all paths in `host`
5151
- register a listener for the `deeplink_received` signal
5252
- process `url`, `scheme`, `host`, and `path` data from the signal
53+
- invoke the `initialize()` method at startup
5354
- alternatively, use the following methods to get most recent deeplink data:
5455
- `get_link_url()` -> full URL for the deeplink
5556
- `get_link_scheme()` -> scheme for the deeplink (ie. 'https')
@@ -59,9 +60,33 @@ Steps:
5960
- `is_domain_associated(a_domain: String)` -> returns true if your application is correctly associated with the given domain on the tested device
6061
- ! this method is not supported on iOS !
6162

62-
## ![](addon/icon.png?raw=true) Testing
63-
`adb shell` command can be used to simulate app links as follows:
64-
- `$> adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://www.example.com/mydata/path"`
63+
## ![](addon/icon.png?raw=true) iOS Export
64+
- Make sure that the scene that contains your Deeplink nodes is selected in the Godot Editor when building and exporting for iOS
65+
- Close other scenes to make sure
66+
- _Deeplink nodes will be searched in the scene that is currently open in the Godot Editor_
67+
Android export requires several configuration settings.
68+
69+
### ![](addon/icon.png?raw=true) File-based Export Configuration
70+
In order to enable file-based export configuration, an `export.cfg` file should be placed in the `addons/DeeplinkPlugin` directory. The `export.cfg` configuration file may contain multiple deeplink configurations. The `scheme` and `host` properties are mandatory for each deeplink configuration.
71+
72+
The following is a sample `export.cfg` file:
73+
74+
```
75+
[Deeplink1]
76+
scheme = "https"
77+
host = "www.example.com"
78+
79+
[Deeplink2]
80+
scheme = "https"
81+
host = "www.example2.com"
82+
```
83+
84+
### ![](addon/icon.png?raw=true) Node-based Export Configuration
85+
If `export.cfg` file is not found or file-based configuration fails, then the plugin will attempt to load node-based configuration.
86+
87+
During iOS export, the plugin searches for `Deeplink` nodes in the scene that is open in the Godot Editor. If none found, then the plugin searches for `Deeplink` nodes in the project's main scene. Therefore;
88+
- Make sure that the scene that contains the `Deeplink` node(s) is selected in the Godot Editor when building and exporting for Android, or
89+
- Make sure that your Godot project's main scene contains an `Deeplink` node(s).
6590

6691
## ![](addon/icon.png?raw=true) Running demo
6792
- After exporting demo application to an Xcode project, Xcode will require an account to be added.

0 commit comments

Comments
 (0)