Skip to content

Commit 4b68a6e

Browse files
authored
chore(docs): Add updated configuration information (#231)
1 parent d875b96 commit 4b68a6e

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

website/docs/for-ios/how-to/advanced-configuration.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,24 @@ Portals instances can be further configured by providing a Capacitor Configurati
1212

1313
## Capacitor Config File
1414

15-
Providing a [Capacitor Configuration](https://capacitorjs.com/docs/config) json file with your web assets will configure Capacitor with the provided settings.
16-
17-
Provide a `capacitor.config.json` in the Portal start directory (where the web assets are located).
15+
The easiest approach for configuring a Portal is to let the web application include a [Capacitor Configuration](https://capacitorjs.com/docs/config)
16+
in the form of a `capacitor.config.json` in the root of its build folder. Portals will provide the Capacitor runtime with the configuration and
17+
no intervention is needed on the part of the native team.
1818

1919
:::note
2020
Each Portal may have its own config file.
2121
:::
22+
23+
## Programmatic Capacitor Configuration
24+
25+
To programmatically configure Capacitor, use the `configuring` method on `Portal` to override any default Capacitor configuration:
26+
27+
```swift
28+
let portal = Portal(name: "foo")
29+
.configuring(\.loggingBehavior, .none)
30+
.configuring(\.allowLinkPreviews, true)
31+
.configuring(\.isWebDebuggable, false)
32+
```
33+
34+
In the event the same value is configured both programmatically and via `capacitor.config.json`, the programmatic configuration takes precedence.
35+

0 commit comments

Comments
 (0)