Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce add-to-app iOS setup image size, other cleanup #3345

Merged
merged 3 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 20 additions & 23 deletions src/docs/development/add-to-app/ios/project-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,21 @@ If your existing application (`MyApp`) does not already have a Podfile, follow t

1. Add the following lines to your `Podfile`:

<?code-excerpt "MyApp/Podfile" title?>
```ruby
flutter_application_path = '../my_flutter'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
```
<?code-excerpt "MyApp/Podfile" title?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually fix the ordered list?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding 4 characters does it, right @sfshaza2? https://stackoverflow.com/a/18089124/431116
See the <?code-excerpt "{codelabs/startup_namer/step1_base,layout/base}/lib/main.dart"?> line in
https://raw.githubusercontent.com/flutter/website/e6368d3e3bd0098b9727afff43501ddc6248d571/src/docs/development/ui/layout/tutorial.md

```ruby
flutter_application_path = '../my_flutter'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
```

2. For each [Podfile target][] that needs to
embed Flutter, call `install_all_flutter_pods(flutter_application_path)`.

<?code-excerpt "MyApp/Podfile" title?>
```ruby
target 'MyApp' do
install_all_flutter_pods(flutter_application_path)
end
```
<?code-excerpt "MyApp/Podfile" title?>
```ruby
target 'MyApp' do
install_all_flutter_pods(flutter_application_path)
end
```

3. Run `pod install`.

Expand All @@ -131,11 +131,15 @@ team cannot locally install Flutter SDK and CocoaPods, or if you do not wish to
as a dependency manager in your existing applications. You must run `flutter build ios-framework`
every time you make code changes in your Flutter module.

If you are using the above [Embed with CocoaPods and Flutter tools](#embed-with-CocoaPods-and-Flutter-tools)
If you are using the above [Embed with CocoaPods and Flutter tools](#embed-with-cocoapods-and-the-flutter-sdk)
method, you can skip these instructions.

The following example assumes you want to generate the frameworks to `some/path/MyApp/Flutter/`.

```terminal
$ flutter build ios-framework --output=some/path/MyApp/Flutter/
```

```text
some/path/
MyApp/
Expand All @@ -157,10 +161,6 @@ some/path/
example_plugin.framework
```

```terminal
$ flutter build ios-framework --output=some/path/MyApp/Flutter/
```

{{site.alert.tip}}
With Xcode 11 installed you can generate [XCFrameworks][] instead of universal frameworks by adding
the flags `--xcframework --no-universal`.
Expand All @@ -174,10 +174,7 @@ into your targets's build settings > General > Frameworks, Libraries, and Embedd
<div class="row">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also just replace this whole thing with a {% include app-figure.md... if you want

<div class="col-sm text-center">
<figure class="figure">
{% asset development/add-to-app/ios/project-setup/embed-xcode.png %}
<figcaption class="figure-caption">
Embed frameworks in Xcode
</figcaption>
{% asset development/add-to-app/ios/project-setup/embed-xcode.png class="mw-100" alt="Embed frameworks in Xcode" %}
</figure>
</div>
</div>
Expand All @@ -199,10 +196,10 @@ You must also add `$(PROJECT_DIR)/Flutter/$(CONFIGURATION)` to your Framework Se
## Development
You can now [add a Flutter screen][] to your existing application.

[macOS system requirements for Flutter]: /docs/get-started/install/macos
[macOS system requirements for Flutter]: /docs/get-started/install/macos#system-requirements
[Xcode installed]: /docs/get-started/install/macos#install-xcode
[Android Studio/IntelliJ]: /docs/development/tools/android-studio#run-app-with-breakpoints
[VS Code]: /docs/development/tools/vs-code#run-app-with-breakpoints
[Android Studio/IntelliJ]: /docs/development/tools/android-studio
[VS Code]: /docs/development/tools/vs-code
[CocoaPods]: https://cocoapods.org/
[CocoaPods getting started guide]: https://guides.cocoapods.org/using/using-cocoapods.html
[Podfile target]: https://guides.cocoapods.org/syntax/podfile.html#target
Expand Down