Flutter iOS Developing On a Physical Device --host-vmservice-port message - ios

I'm trying to develop my flutter app with a physical (iOS) device plugged in, to access hot reload and hot restart. (via flutter run)
I am able to run the app with my device with flutter run however, I get the logs:
If you do NOT see the Flutter application running, it might have crashed. The device logs (e.g. from adb or XCode) might have more details.
If you do see the Flutter application running on the device, try re-running with --host-vmservice-port to use a specific port known to be available.
This prohibits me from accessing the developer tools in the console.
Is there a way to find the --host-vmservice-port of the physical device?

Found out that this was because my system user didn't have read/write permissions for the /flutter/bin/cache/artifacts/usbmuxd/iproxy file.
Enabled it following this, and now I'm able to successfully debug and hot reload with a physical device ✔️

Related

Flutter iOS App not launching after removing USB

So i'm testing a flutter app that builds and installs successfully on an iOS simulator as well as a physical devices. However, when building and installing the app with xcode via the USB, it successfully installs and launches but when the USB is disconnected from my mac and i try to run the already installed device on the iPhone, it shows only the launch / splash screen and fades and closes.
Is there something i'm doing wrong that causes this to happen? As the app works fine when connected with the USB and it's being run.
If the build is in debug mode - it won't open.
if you want to open application after disconnecting, try profile / release mode
flutter run --profile
or
flutter run --release
In iOS, debug build doesn't work without USB. To use the app without USB trying making a release build using flutter run --release

How to get Flutter Application running on real ios device with Windows?

Is there a way to get a Flutter Application running on own ios device with Windows and without paying money?
No, it is not possible to run an iOS simulator on Windows.
The reason for this is the following (highlighting is mine):
Simulator allows you to rapidly prototype and test builds of your app during the development process. Installed as part of the Xcode tools [...]
This means that iOS simulator come only with Xcode. And Xcode is only available on MacOS.
This means that you will either need to run MacOS yourself or use a service that runs your app on MacOS for you.
See also: https://stackoverflow.com/a/28573/6509751
For Flutter this means that you will have to test your code on Android, Desktop, or Web locally. You can still run an iOS simulator in your CI or do something similar to what was described in the answer linked above.

Flutter - Dartlang: Run Application command fails

When using Atom with the dartlang package, I attempt to use the Dartlang: Run Application command and get the following result:
[/Users/craig/Code/flutter-test/atom1] pub run flutter start
Unable to run on Android.
Unable to run on Android.
Unable to run application - no connected devices.
I get the same thing in the console when running flutter start in the app directory.
My phone is a Nexus 6p that is connected to my computer via USB and has 'USB debugging' enabled in Developer options. How can I get these commands to successfully deploy the app to my device?
Though my device was connected, it was not "authorized". I used the adb devices command to check if it was connected, and the output was something like this:
02:06 PM atom1: adb devices
List of devices attached
8XV5T15A20007972 unauthorized
Note the unauthorized on the last line. After some googling, I learned to go into my phone, and toggle Developer Options > USB debugging from enabled, to disabled, to enabled again. I did this without disconnecting the phone. Re-running adb devices then showed:
02:06 PM atom1: adb devices
List of devices attached
8XV5T15A20007972 device
Note device on the last line instead of unauthorized. I re-ran the Dartlang: Run Application from within Atom and the deploy worked. Somewhere in there, I had to accept the push to device from my phone.
open the device in avd manager and try to run the command again
or you can use your own mobile device just plug your device to your laptop or computer in android you have to enable USB debugging in developer mode setting
or you can build a apk and install it on your device
flutter build

Cordova deploy app on iOS device

I have a app that runs in the iOS-simulator. The app is compiled with cordova 3.4. After that, I can run the app via shell by calling "cordova run iOS" as well as open the project in xCode and press the play button. Both works.
I attempted to put the app on my iOS-device (iPhone-5s, iPad-Retina). But that does work neither with console nor with xCode.
When I try to run the app on the console by "start iOS" the console freezes before the app is installed on the device. I don't get any error logs. It tried that a few times, and sometimes the app is installed, but the console freezes.
Trying to run the app with xCode I get those errors and issues:
I have the current versions of iOS, xCode and MacOS as well as a developer ID, that is requested by the cordova-console when I try to start the app on a real device. The device was set to a working-group of my apple-developer account, too. That shouldn't cause the problems.
The build-location was set to unique and xcode-default. That doesn't change anything.

Opening application via ssh on iOS devices

I have seen ways to open applications on linux and Mac devices but can't seem to get the same idea working for iOS devices.
I have jailbroken my device and have ssh access and would like to open an app without having to visit the device?
This idea but for iOS and to open a Kiosk app or Safari.
Opening netbeans via SSH
You can do this with the open utility that's available on the Cydia store. Download open from Cydia, and then you can use it to start any installed app at the command line, using its bundle ID (e.g. com.mycompany.MyAppName).
See this answer

Resources