Skip to content

Commit

Permalink
docs: added a new section to getting started for iOS simulator. (#132)
Browse files Browse the repository at this point in the history
* Added a new section to the getting started guide
that explains how to run the demo app on the iOS simulator.

* docs: Adding docs to explain how they could get the local ip address

* docs: Get started docs for ios simulator improvements

* fix: fix headers.

---------

Co-authored-by: Klaudio Kucaj <[email protected]>
Co-authored-by: Alexander Sandor <[email protected]>
  • Loading branch information
3 people authored Aug 28, 2024
1 parent 8df4ca0 commit 5b6f17e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/01-get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,22 @@ $ cd mypod/mypod_flutter
$ flutter run -d chrome
```

The flag `-d chrome` runs the app in Chrome, for other run options please see the Flutter documentation.
The flag `-d chrome` runs the app in Chrome, for other run options please see the Flutter documentation.

:::info

If you run the app on MacOS you will need to add permissions for outgoing connections in your Xcode project. To do this, open the `Runner.xcworkspace` in Xcode. Then check the _Outgoing Connections (Client)_ under _Runner_ > _Signing & Capabilities_ > _App Sandbox_. Make sure to add the capability for all run configurations.
**iOS Simulator**: Because an iOS simulator has its own localhost, it won't find the server running on your machine. Therefore, you will need to pass the IP address of your machine when creating the client in `mypod/mypod_flutter/lib/main.dart`. Depending on your local network, it might look something like this:

```dart
var client = Client('http://192.168.1.117:8080/')
..connectivityMonitor = FlutterConnectivityMonitor();
```

:::

:::info
**MacOS**:
If you run the app on MacOS, you will need to add permissions for outgoing connections in your Xcode project. To do this, open the `Runner.xcworkspace` in Xcode. Then check the _Outgoing Connections (Client)_ under _Runner_ > _Signing & Capabilities_ > _App Sandbox_. Make sure to add the capability for all run configurations.

:::

Expand Down

0 comments on commit 5b6f17e

Please sign in to comment.