How to test your Flutter iOS app on your iOS device
This tutorial is to full-fill one of the promise I made in another tutorial. I am not a subscriber to the iOS App Developer program but testing it on a personal iPhone is free.
If you are ready let us get started!!!
First you will need to locate the Runner.xcworkspace file inside the ios folder of your project folder.
If you have Xcode installed you can double click to open the project. I have wrote about how to install Xcode here.
After you opened your project, you can configure the device on the top left corner as shown below. Make sure your iPhone is connected to your computer with an USB cable.
You can then find your device after you bring up the menu, I used my iPhone 6S Plus for this example.
In the Signing configuration you need to select a team.
I used personal team for this example.
You will likely run into an error because you have an invalid Bundle Identifier.
To fix this, you need to modify your Bundle Identifier to something that is unique. I used com.example.happy2019.helloWorld for this example.
After that you can click run and build the project.
You might be prompted to enter your keychain, click always allow to save yourself some efforts.
After that the app should be successfully built onto your device. Before you test it, you also have to trust yourself as the developer on that device.
You need to go to your Settings > General > Device Management.
Inside Device Management, select the developer name and tap Trust “YOUR DEVELOPER NAME”.
You should now be able to run your Flutter app on your local device.
In the end…
I enjoy learning new things and sharing them with people who are also passionate in them. If you have anything in particular that you would like to read, please let me know. Below are two other guides I have wrote in the past on Flutter.
- How to create your first iOS Flutter app on MacOS
- How to integrate your iOS Flutter App with Firebase on MacOS
Hope you enjoyed my tutorials and have fun coding!