You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ff-concepts/adding-customization/configuration-files.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,13 +17,13 @@ Here are the key configuration files you can edit:
17
17
18
18
-[**`AndroidManifest.xml`**](#androidmanifestxml-android) – Configures app permissions, metadata, and intent filters for Android.
19
19
-[**`Info.plist`**](#infoplist-ios)– Manages iOS app settings, including permissions and configurations.
20
-
-[**`Entitlements.plist`**](#entitlementsplist-ios) – Defines iOS app privileges like push notifications and Apple Pay.
20
+
-[**`Entitlements.plist`**](#entitlementsplist-ios) – Defines iOS app privileges such as, push notifications and Apple Pay.
21
21
-[**`main.dart`**](#maindart-flutter) – The entry point of your Flutter app, where you can modify app-level logic.
22
22
-[**ProGuard files**](#proguard-file-android) – Used for code shrinking and obfuscation in Android builds.
23
23
24
24
:::warning
25
25
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.
26
+
While editing configuration files can unlock advanced functionality, it comes with risks. A small mistake (e.g., 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.
27
27
28
28
In short, edit native code only when necessary, and do so carefully.
29
29
@@ -35,7 +35,7 @@ FlutterFlow provides two main ways to modify native XML files: [**Add Individual
35
35
36
36
### Option 1: Add Individual Snippets
37
37
38
-
**Snippets** are small pieces of code that you can inject into the native files at predefined locations. Instead of opening the whole file to edit, you provide just the fragment you want to add, and FlutterFlow merges it into the file in the correct place. This is safer and easier for small additions like a permission line or a meta-data tag.
38
+
**Snippets** are small pieces of code that you can inject into the native files at predefined locations. Instead of opening the whole file to edit, you provide just the fragment you want to add, and FlutterFlow merges it into the file in the correct place. This is safer and easier for small additions such as, a permission line or a meta-data tag.
39
39
40
40
#### Snippet Placement for Android
41
41
@@ -148,13 +148,13 @@ Once unlocked, the file stays in manual editing mode until you lock it again. Re
148
148
:::tip
149
149
150
150
- 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.
151
-
- 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
+
- Use Manual Edit Mode for bulk or complex edits that the snippet can’t easily do, such as, reordering tags, removing something, or pasting in a large chunk of config. Always verify that the app still builds and runs after such edits.
152
152
- 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
153
:::
154
154
155
155
## Include Variables in Native Code
156
156
157
-
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.
157
+
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.
158
158
159
159
To include a variable in a configuration file, start by creating a **file-level variable** and assigning it a value from either your **environment values** or **library values**. Then, reference this variable using a placeholder format (e.g., `{{apiToken}}`) within the configuration file. These placeholders in native files are automatically replaced with their actual values during the app build process.
160
160
@@ -252,7 +252,7 @@ If `ALLOW_HTTP_TRAFFIC` is set to `true` in FlutterFlow’s Environment Value, t
252
252
253
253
If you are building a [FlutterFlow Library](../../resources/projects/libraries.md) and need to include API keys in native code without exposing them when users import the library, you can use [Library Values](../../resources/projects/libraries.md#library-values) as placeholders. This ensures that when someone installs your library, they can define their own values without seeing the actual key or credentials inside the native files.
254
254
255
-
For example, if your library requires an API key for a third-party service (like Google Maps or a payment provider), it’s best not to expose the key directly in the manifest file. Instead, create a file-level variable and assign it a Library Value.
255
+
For example, if your library requires an API key for a third-party service (e.g., Google Maps or a payment provider), it’s best not to expose the key directly in the manifest file. Instead, create a file-level variable and assign it a Library Value.
256
256
257
257
```
258
258
<application>
@@ -272,7 +272,7 @@ FlutterFlow allows editing several key native files. Below, we cover each file
272
272
273
273
`AndroidManifest.xml` is the master configuration file for your Android app. It is located in the root directory of the app's `android/app/src/main` folder and declares essential app information to the Android OS and Google Play. This includes your app’s package name, components (activities, services, receivers), and the permissions it needs.
274
274
275
-
It defines hardware and software features the app depends on, like Bluetooth, GPS, or sensors. The manifest manages intents and filters, determining how the app responds to system events and deep linking. It also includes metadata and configuration for SDKs and libraries, such as API keys or feature flags.
275
+
It defines hardware and software features the app depends on, such as, Bluetooth, GPS, or sensors. The manifest manages intents and filters, determining how the app responds to system events and deep linking. It also includes metadata and configuration for SDKs and libraries, such as API keys or feature flags.
276
276
277
277
In short, the manifest is like an app’s identity card and permission sheet for Android.
278
278
@@ -302,7 +302,7 @@ This registers `NewScreenActivity` so the system knows it exists.
302
302
303
303
**Example 2: Requesting Permissions**
304
304
305
-
If your app requires access to restricted resources like wake locks (to keep the device awake) or audio recording, you must declare the necessary permissions in `AndroidManifest.xml` by [manually editing](#option-2-manual-edit-mode) the file. **Tip:** You can also add custom permissions directly through the [**Permission Settings**](../../resources/projects/settings/project-setup.md#adding-custom-permission) in FlutterFlow.
305
+
If your app requires access to restricted resources such as, wake locks (to keep the device awake) or audio recording, you must declare the necessary permissions in `AndroidManifest.xml` by [manually editing](#option-2-manual-edit-mode) the file. **Tip:** You can also add custom permissions directly through the [**Permission Settings**](../../resources/projects/settings/project-setup.md#adding-custom-permission) in FlutterFlow.
@@ -399,7 +399,7 @@ You can modify the `AndroidManifest.xml` file by either [**adding a snippet**](#
399
399
400
400
`Info.plist` (Information Property List) is the configuration file for iOS apps. It’s a structured XML file that provides iOS with essential information about your app’s configuration and requirements.
401
401
402
-
The `Info.plist`defines things like your app’s bundle identifier, display name, version, and most importantly, usage descriptions for permissions and other settings iOS needs at runtime. The file is required for every iOS app and is located in the project’s `/ios/Runner/` directory of your FlutterFlow apps.
402
+
The `Info.plist`defines things such as, your app’s bundle identifier, display name, version, and most importantly, usage descriptions for permissions and other settings iOS needs at runtime. The file is required for every iOS app and is located in the project’s `/ios/Runner/` directory of your FlutterFlow apps.
403
403
404
404
Essentially, it’s the blueprint for iOS to understand your app’s capabilities and needs.
405
405
@@ -467,15 +467,15 @@ You can modify the `Info.plist` file by either [**adding a snippet**](#snippet-p
467
467
468
468
### `Entitlements.plist` (iOS)
469
469
470
-
The `Entitlements.plist` file is a property list in iOS applications that defines the app’s security-related capabilities and permissions. It grants specific privileges to an app, allowing it to access Apple services such as iCloud, Push Notifications, App Groups, Background Modes, and Keychain access. It is located in the **`/ios/Runner/`** directory of your FlutterFlow app and is named **`Runner.entitlements`**.
470
+
The `Entitlements.plist` file is a property list in iOS applications that defines the app’s security-related capabilities and permissions. It grants specific privileges to an app, allowing it to access Apple services such as, iCloud, Push Notifications, App Groups, Background Modes, and Keychain access. It is located in the **`/ios/Runner/`** directory of your FlutterFlow app and is named **`Runner.entitlements`**.
471
471
472
472
This file ensures that only authorized apps can use these features, maintaining security and preventing unauthorized access to sensitive system functions.
473
473
474
474
Here are some scenarios where you may need to modify the `Entitlements.plist` file:
475
475
476
476
**Example 1: Enabling iCloud Storage**
477
477
478
-
If your app integrates **iCloud services**, such as syncing user data or storing documents, you must add iCloud entitlements.
478
+
If your app integrates **iCloud services**, such as, syncing user data or storing documents, you must add iCloud entitlements.
@@ -538,7 +538,7 @@ You can modify the `Entitlements.plist` file by either [**adding a snippet**](#s
538
538
539
539
The `main.dart` file is the entry point of every FlutterFlow app. It is the first file that runs when the app starts and is responsible for initializing the application, configuring dependencies, and defining the root widget. Located in the **`lib/`** directory, `main.dart` contains the `main()` function, which is required for every FlutterFlow app.
540
540
541
-
If you need to execute any custom Dart code at startup — such as initializing third-party SDKs, setting global configurations, service locators, printing a debug log, or running certain functions once — `main.dart` is the place to do it.
541
+
If you need to execute any custom Dart code at startup — such as, initializing third-party SDKs, setting global configurations, service locators, printing a debug log, or running certain functions once — `main.dart` is the place to do it.
542
542
543
543
:::info
544
544
[**Adding Snippets**](#option-1-add-individual-snippets) isn't available for `main.dart`. Instead, you can directly modify the file using [**Manual Edit Mode**](#option-2-manual-edit-mode).
0 commit comments