Skip to content

Commit 4c98eb9

Browse files
authored
Add LLDB Init Instructions for Add to App (#12131)
Add instructions on how to manually add Flutter's LLDB Init File. This is added to prevent crashes in debug mode on iOS 26. ## Presubmit checklist - [ ] This PR is marked as draft with an explanation if not meant to land until a future stable release. - [x] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer.
1 parent 002fb25 commit 4c98eb9

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

firebase.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,7 @@
757757
{ "source": "/to/integration-testing", "destination": "/cookbook/testing/integration/introduction", "type": 301 },
758758
{ "source": "/to/intellij-setup", "destination": "/tools/android-studio#setup", "type": 301 },
759759
{ "source": "/to/internationalization", "destination": "/ui/accessibility-and-internationalization/internationalization", "type": 301 },
760+
{ "source": "/to/ios-add-to-app-embed-setup", "destination": "/add-to-app/ios/project-setup#embed-a-flutter-module-in-your-ios-app", "type": 301 },
760761
{ "source": "/to/ios-app-signing", "destination": "/deployment/ios#review-xcode-project-settings", "type": 301 },
761762
{ "source": "/to/ios-create-flutter-engine", "destination": "/add-to-app/ios/add-flutter-screen#create-a-flutterengine", "type": 301 },
762763
{ "source": "/to/ios-deploy", "destination": "/deployment/ios", "type": 301 },

src/_includes/docs/add-to-app/ios-project/embed-cocoapods.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,48 @@ into your iOS app, complete the following procedure.
139139
140140
1. Select **Product** > **Build** or press <kbd>Cmd</kbd> + <kbd>B</kbd>.
141141
142+
#### Set LLDB Init File
143+
144+
:::warning
145+
Set your scheme to use Flutter's LLDB Init File. Without this file, debugging
146+
on an iOS 26 or later device may crash.
147+
:::
148+
149+
1. Generate Flutter LLDB files.
150+
151+
1. Within your flutter application, run the following:
152+
153+
```console
154+
flutter build ios --config-only
155+
```
156+
157+
This will generate the LLDB files in the `.ios/Flutter/ephemeral` directory.
158+
159+
1. Set the LLDB Init File.
160+
161+
1. Go to **Product > Scheme > Edit Scheme**.
162+
163+
1. Select the **Run** section in the left side bar.
164+
165+
1. Set the **LLDB Init File** using the same relative path to your Flutter
166+
application as you put in your Podfile in the **Update your Podfile**
167+
section.
168+
169+
```console
170+
$(SRCROOT)/../my_flutter/.ios/Flutter/ephemeral/flutter_lldbinit
171+
```
172+
173+
If your scheme already has an **LLDB Init File**, you can add Flutter's
174+
LLDB file to it. The path to Flutter's LLDB Init File must be relative
175+
to the location of your project's LLDB Init File.
176+
177+
For example, if your LLDB file is located at `/path/to/MyApp/.lldbinit`,
178+
you would add the following:
179+
180+
```console
181+
command source --relative-to-command-file "../my_flutter/.ios/Flutter/ephemeral/flutter_lldbinit"
182+
```
183+
142184
[build-modes]: /testing/build-modes
143185
[CocoaPods getting started guide]: https://guides.cocoapods.org/using/using-cocoapods.html
144186
[Podfile target]: https://guides.cocoapods.org/syntax/podfile.html#target

src/_includes/docs/add-to-app/ios-project/link-and-embed.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,5 +156,46 @@ To embed your dynamic frameworks, complete the following procedure.
156156
1. Select **Product** <span aria-label="and then">></span>
157157
**Build** or press <kbd>Cmd</kbd> + <kbd>B</kbd>.
158158
159+
#### Set LLDB Init File
160+
161+
:::warning
162+
Set your scheme to use Flutter's LLDB Init File. Without this file, debugging
163+
on an iOS 26 or later device may crash.
164+
:::
165+
166+
1. Generate Flutter LLDB files.
167+
168+
1. Within your flutter application, re-run `flutter build ios-framework` if
169+
you haven't already:
170+
171+
```console
172+
$ flutter build ios-framework --output=/path/to/MyApp/Flutter/
173+
```
174+
175+
This will generate the LLDB files in the `/path/to/MyApp/Flutter/` directory.
176+
177+
1. Set the LLDB Init File.
178+
179+
1. Go to **Product > Scheme > Edit Scheme**.
180+
181+
1. Select the **Run** section in the left side bar.
182+
183+
1. Set the **LLDB Init File** to the following:
184+
185+
```console
186+
$(PROJECT_DIR)/Flutter/flutter_lldbinit
187+
```
188+
189+
If your scheme already has an **LLDB Init File**, you can add Flutter's
190+
LLDB file to it. The path to Flutter's LLDB Init File must be relative
191+
to the location of your project's LLDB Init File.
192+
193+
For example, if your LLDB file is located at `/path/to/MyApp/.lldbinit`,
194+
you would add the following:
195+
196+
```console
197+
command source --relative-to-command-file "Flutter/flutter_lldbinit"
198+
```
199+
159200
[static or dynamic frameworks]: https://stackoverflow.com/questions/32591878/ios-is-it-a-static-or-a-dynamic-framework
160201
[static-framework]: https://developer.apple.com/library/archive/technotes/tn2435/_index.html

0 commit comments

Comments
 (0)