Ping SDKs

Step 4. Build and run the project

Now that everything is set up, build and run the to-do app project.

  1. Go back to the iOS project (forgerock-flutter-sample/Flutter_To_Do_app/flutter_todo_app/ios).

  2. If the project is not already open in Xcode double-click Runner.xcworkspace.

  3. Once Xcode is ready, select iPhone 11 or higher as the target for the device simulator on which to run the app.

  4. Now, click the build/play button to build and run this application in the target simulator.

With everything up and running, you will need to rebuild the project with Xcode when you modify the bridge code (Swift files). But, when modifying the Flutter code, it will use "hot module reloading" to automatically reflect the changes in the app without having to manually rebuild the project.

Troubleshooting

  1. Under the General tab, make sure that the FRAuth and FRCore frameworks are added to your target’s Frameworks, Libraries, and Embedded Content.

  2. Bridge code has been altered, so be aware of API name changes.

Using Xcode and iOS Simulator

We recommend the use of iPhone 11 or higher as the target for the iOS simulator. When you first run the build command in Xcode (clicking the Play button), it takes a while for the app to build, the OS to load, and app to launch within the simulator. Once the app is launched, rebuilding it is much faster if the changes are not automatically "hot reloaded" when made in the Flutter layer.

flutter home screen
Figure 1. To-do app home screen

Only the home screen will render successfully at this moment. If you click the Sign In button, it won’t be fully functional. This is intended as you will develop this functionality throughout this tutorial.

Once the app is built and running, you will have access to all the logs in the Xcode output console.

flutter xcode login response
Figure 2. Xcode log output