Skip to content

Commit ed9d7ef

Browse files
committed
Removing variable stuff and adding FAW
1 parent e11f176 commit ed9d7ef

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

docs/ff-concepts/adding-customization/configuration-files.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ keywords: [FlutterFlow, Configuration Files, Customizations, Flutter, Dart, Pub.
99

1010
# Configuration Files
1111

12-
FlutterFlow allows you to modify platform-specific files for Android and iOS without leaving the FlutterFlow interface. This guide explains how to edit these files, methods for adding code, using variables, and how to do it all safely.
12+
FlutterFlow allows you to modify configuration files for your app, and platform-specific files, without leaving the FlutterFlow interface.
1313

14-
In some cases, you’ll need to tweak the native Android or iOS configurations that FlutterFlow generates. This is usually required when integrating third-party packages such as analytics, ad networks, and payment solutions. These files act as a bridge between your app and the underlying OS, declaring what your app can do and access. Editing them allows you to extend FlutterFlow’s capabilities.
14+
In some cases, you’ll need to tweak the configuration files that FlutterFlow generates. This is usually required when integrating third-party packages such as analytics, ad networks, and payment solutions.
1515

16-
Here are the key native files you can edit:
16+
Here are the key configuration files you can edit:
1717

1818
- [**`AndroidManifest.xml`**](#androidmanifestxml-android) – Configures app permissions, metadata, and intent filters for Android.
1919
- [**`Info.plist`**](#infoplist-ios)– Manages iOS app settings, including permissions and configurations.
@@ -23,15 +23,15 @@ Here are the key native files you can edit:
2323

2424
:::warning
2525

26-
While editing native configuration files can unlock advanced functionality, it comes with risks. A small mistake (like a missing XML tag or a wrong key) can cause your app to fail compilation or crash at runtime. Incorrect changes might lead to App Store/Play Store rejections. So, it’s important to note your changes and thoroughly test your app after each edit.
26+
While editing configuration files can unlock advanced functionality, it comes with risks. A small mistake (like a missing XML tag or a wrong key) can cause your app to fail compilation or crash at runtime. Incorrect changes might lead to App Store/Play Store rejections. So, it’s important to note your changes and thoroughly test your app after each edit.
2727

2828
In short, edit native code only when necessary, and do so carefully.
2929

3030
:::
3131

32-
## Edit Native Code
32+
## Editing native XML Files (AndroidManifest.xml, Info.plist, Entitlements.plist)
3333

34-
FlutterFlow provides two main ways to modify native files: [**Add Individual Snippets**](#option-1-add-individual-snippets) and [**Manual Edit Mode**](#option-2-manual-edit-mode).
34+
FlutterFlow provides two main ways to modify native XML files: [**Add Individual Snippets**](#option-1-add-individual-snippets) and [**Manual Edit Mode**](#option-2-manual-edit-mode).
3535

3636
### Option 1: Add Individual Snippets
3737

@@ -105,12 +105,14 @@ To add a snippet to native iOS files, navigate to **Custom Code** (from the left
105105
<p></p>
106106

107107
:::tip
108-
You can also use your Development [**Environment Values**](../../testing-deployment-publishing/development-environments/development-environments.md#environment-values) and [**Library Values**](../../resources/projects/libraries.md#library-values) inside snippets. For more details, refer to the [**Include Variables in Native Code**](#include-variables-in-native-code) section.
108+
You will soon be able to use your Development [**Environment Values**](../../testing-deployment-publishing/development-environments/development-environments.md#environment-values) and [**Library Values**](../../resources/projects/libraries.md#library-values) inside snippets.
109+
110+
<!-- For more details, refer to the [**Include Variables in Native Code**](#include-variables-in-native-code) section. -->
109111
:::
110112

111113
### Option 2: Manual Edit Mode
112114

113-
For more complex changes, you can enable **Manual Edit Mode**, which essentially unlocks the entire file for free-form editing. This is like opening the raw file in a text editor directly within FlutterFlow. **Note that** the Manual mode is powerful but should be used carefully.
115+
For more complex changes, you can enable **Manual Edit Mode**, which unlocks the entire file for free-form editing. This is like opening the raw file in a text editor directly within FlutterFlow. **Note that** the manual mode is powerful but should be used carefully.
114116

115117
To manually edit native files, navigate to **Custom Code** (from the left-side menu) > **Configuration Files**, select the file you want to edit, and click the **lock** button to unlock it. You can now freely modify the file.
116118

@@ -148,10 +150,10 @@ Once unlocked, the file stays in manual editing mode until you lock it again. Re
148150

149151
- Don’t remove FlutterFlow’s existing entries unless you are sure. It’s safer to only add or modify necessary lines and leave the rest as is.
150152
- Use Manual Edit Mode for bulk or complex edits that the snippet can’t easily do, like reordering tags, removing something, or pasting in a large chunk of config. Always verify that the app still builds and runs after such edits.
151-
- You can also use your Development [**Environment Values**](../../testing-deployment-publishing/development-environments/development-environments.md#environment-values) and [**Library Values**](../../resources/projects/libraries.md#library-values) inside snippets. For more details, refer to the [**Include Variables in Native Code**](#include-variables-in-native-code) section.
153+
<!-- - You can also use your Development [**Environment Values**](../../testing-deployment-publishing/development-environments/development-environments.md#environment-values) and [**Library Values**](../../resources/projects/libraries.md#library-values) inside snippets. For more details, refer to the [**Include Variables in Native Code**](#include-variables-in-native-code) section. -->
152154
:::
153155

154-
## Include Variables in Native Code
156+
<!-- ## Include Variables in Native Code
155157
156158
When editing native files in FlutterFlow, you may need to include dynamic values, such as API keys, app configurations, or environment-specific settings. Instead of hardcoding these values directly in **`AndroidManifest.xml`**, **`Info.plist`**, or other native files, you can use FlutterFlow [**Environment Values**](../../testing-deployment-publishing/development-environments/development-environments.md#environment-values) and [**Library Values**](../../resources/projects/libraries.md#library-values) to keep your app flexible and secure.
157159
@@ -171,10 +173,10 @@ Let’s say you are integrating the Mapbox package in your FlutterFlow app, and
171173
172174
Here, `{{MAPBOX_ACCESS_TOKEN}}` is an Environment Values that FlutterFlow replaces with the actual token at build time.
173175
174-
![variables-in-native-code-example-1](imgs/variables-in-native-code-example-1.avif)
176+
![variables-in-native-code-example-1](imgs/variables-in-native-code-example-1.avif) -->
175177

176178

177-
**Example 2: Configuring `Info.plist` for iOS**
179+
<!-- **Example 2: Configuring `Info.plist` for iOS**
178180
179181
For iOS apps, you might need to configure App Transport Security (ATS) to allow non-HTTPS connections. Instead of manually setting `NSAllowsArbitraryLoads` to `true`, you can use a FlutterFlow variable:
180182
@@ -204,7 +206,7 @@ For example, If your library requires an API key for a third-party service (e.g.
204206
205207
The library user will define their own API key under Library Values when importing your library. At build time, FlutterFlow replaces `{{MAPS_API_KEY}}` with the user-defined key.
206208
207-
![lib-values-in-native-code-example-1](imgs/lib-values-in-native-code-example-1.avif)
209+
![lib-values-in-native-code-example-1](imgs/lib-values-in-native-code-example-1.avif) -->
208210

209211

210212
## Editable Files
@@ -655,7 +657,6 @@ This ensures reflection-based code continues working.
655657
## Best Practices
656658

657659
- **Backup:** Before making native file changes, ensure you have a backup of at least the text of the original file. You could also commit your changes so you can revert if needed. This way, if things go wrong, you can manually restore.
658-
659660
- **One Change at a Time:** Add or modify one item at a time and then test your app. If you add multiple things and something breaks, it’s harder to pinpoint which change did it.
660661
- **Consult Package Documentation:** When you’re making changes for third-party packages, follow their instructions exactly. Usually, package docs show a snippet – use that in FlutterFlow’s [snippet](#option-1-add-individual-snippets). Double-check official docs for Android or iOS if you’re unsure about the correct keys or tags. For example, if enabling background fetch, Apple’s docs will list the exact string to use in `Info.plist` (`fetch` in `UIBackgroundModes` array).
661662
- **Keep it Minimal:** Only add what you truly need. Don’t add a bunch of entitlements or permissions “just in case” as that can bloat and complicate your app, and even trigger store reviews for uses that your app doesn’t actually have.
@@ -676,7 +677,6 @@ Confirm that the entitlements in `Entitlements.plist` match your provisioning pr
676677
</p>
677678
</details>
678679

679-
680680
<details>
681681
<summary>
682682
How do I fix “Manifest merger failed” on Android?
@@ -693,4 +693,13 @@ Why my app isn't running in Test Mode after editing the `main.dart` file with Su
693693
<p>
694694
There's a known limitation where editing the `main.dart` file with Supabase enabled prevents Test Mode from running. As a workaround, please use [**Local Run**](../../testing-deployment-publishing/running-your-app/local-run.md) to test your app instead.
695695
</p>
696+
</details>
697+
698+
<details>
699+
<summary>
700+
How can I create a Library that needs to edit Info.plist / Entitlements.plist / AndroidManifest.xml
701+
</summary>
702+
<p>
703+
Right now, changes to the configuration files made in a Library project are not ported over to the projects that import them. This means if you create a Library that needs specific permissions added to these files, the consumers of your Library will need to edit the files in the project that imports the Library. We are hoping to have automatic import of changes to the configuration files available in the next few releases.
704+
</p>
696705
</details>

0 commit comments

Comments
 (0)