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

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.

Related

Can I test my Flutter app from VSCode (Windows) on my physical iPhone device?

I want to deploy my Flutter app on my physical iPhone device from my VSCode desktop application in Widnows. I did it with React Native app in VSCode and Expo Cli on my iPhone device but I would like to do this with my Flutter app.
It's not possible as is. You need a Mac device to develop for iOS.
There are solutions though. You could use a tool like Appollo to achieve it. Appollo is a CLI utility tool that let's you build and test iOS apps.
You can check how to use it on github or from their documentation or you can check a demo from their YouTube channel
This is not possible, you need to have Xcode which is only available on macOS in order to run the app.
You can use VirtualBox with macOS installed as a workaround but it will be very slow
No, that's impossible to do this directly. You need to have Xcode installed to build iOS builds.
You can use cloud-based CI/CD tools to build for iOS.

Using Frida on XCode Simulator

Does anyone has experience with setting up Frida to work with XCode Simulator? I have been searching online but this is the closest thing I've got (https://programmersought.com/article/54464074345/)
However, when I compile and run the app on simulator, I did not see what was described in "quick smoke test". Any help is very appreciated !
As iOS simulator is essentially running apps on your native mac OS host, you can interacts with apps directly as if they are running on your machine.
In a nutshell:
Don't use -U argument as iOS simulator is not a USB device
frida-ps should give you a list of running processes, including the apps running on the simulator.
The rest of the APIs should work in the same way they do for mac OS host.

How to build IOS apps in flutter in windows

I want to develop a application for for my company. I'm using flutter to build it for both android and IOS platform. But I have only windows machine, so I'm only able to build it for Android. Can I build(generate apk) IOS flutter apps in windows machine ?
if yes please explain it well.
You can develop the UI on android itself. However, you need OSX to run an Iphone Simulator. An alternative would be to use a virtual machine with OSX installed. It is not recommended though.
Also, for IOS the build is different. It is not as simple as generating an apk and installing it on your phone. You will need itunes and a legit account to run it.
See more here

How can I connect IOS project created by flutter to firebase? [duplicate]

I am new to developing mobile apps and wanted to try Flutter but I use Windows. Because Flutter doesn't support Windows yet I had the idea to use a virtual machine running Linux to install Flutter. Does this work?
Also in the Flutter setup it says this:
To develop Flutter apps for iOS, you need a Mac with Xcode 7.2 or newer.
Is there a way to develop iOS apps without having a Mac?
Yes, you can develop iOS apps with Linux (or Windows) using Android Studio or Visual Studio Code. The point of Flutter is that you have one code base and can deploy to both Android and iOS. So the development phase is no problem.
In the past you could only deploy iOS apps to the App Store if you had a Mac, but there are some more options now. See the following articles:
How to sign Flutter apps for iOS automatically without a Mac
Developing and debugging Flutter apps for iOS without a Mac
How to develop and distribute iOS apps without Mac with Flutter & Codemagic
Build an iOS app without a Mac or iPhone using Flutter
To test your app on the iOS simulator, though, it is still necessary to have a Mac. However, theoretically the app should have the same behavior for most things as on an Android device, so you wouldn't necessary need to test it using the iOS simulator. I would say long term you would probably want to consider getting a Mac, but it is certainly not necessary in the beginning.
Update: In a recent app I made, my tests passed in the Android emulator but crashed in the iOS simulator. It was a normal bug and nothing specific to iOS, but for some reason the Android simulator didn't crash. So for a production app, you really do need to test it on an iOS device/simulator.
As you point in your question:
To develop Flutter apps for iOS, you need a Mac with Xcode 7.2 or newer.
You can work around by using an external service (like Travis-ci or other) to build your code for iOS. However it's not usable as a developer workflow as that can take several minutes to get the artefact.
You should check out MacOS cloud solutions like MacInCloud. There are CI/CD solution that will support it (e.g. CircleCI and BitRise) however these are not suited for development.
Services like MacInCloud allow you to remote desktop into a Mac where you could conceivably use XCode remotely.
Windows is now partially supported in the way you can edit and publish for Android but you still can't create for IOS where a mac is required (XCode).
More informations https://flutter.io/setup-windows
You can use tools like Appollo to do just that directly from Windows or Linux. Appollo is a python CLI tool.
To install Appollo run pip install appollo, then setup your developer account with Appollo (https://appollo.readthedocs.io/en/master/tutorial/2_configure_app_store_connect.html) once this is done you can start building your app with appollo build start
You can check out a few example videos here : https://www.youtube.com/channel/UCBNRrJd4UP0QQRoYF4JOEmA

Does Appium need Xcode for run automated testing on iOS device?

I'm trying to run automated testing on iOS devices without installing Xcode, but seem like it doesn't work.
So I just want to know that Does Appium really need Xcode for run automated testing on iOS device? and why?
Xcode needs to be present for Appium to work.
Appium's command life-cycle, works as :
Selenium webdriver picks a command form the code like (Element.click) and sends it in form of JSON via http request to the Appium server. Appium server knows the automation context like the iOS and Android and sends this command to the Instruments command server which will wait for the Instruments command client (written in node.js) to pick it up and execute it in bootstrap.js with in the iOS instruments environment. Once the command is executed the command client sends back the message to the Appium server which logs everything related to the command in its console. This cycle keeps going till the time all the commands gets executed.
Appleā€™s instruments binary, which Appium uses to launch the iOS simulator, by default uses the currently-selected Xcode, and the highest iOS SDK installed with that version of Xcode.
Appium uses the appium-xcuitest-driver to test iOS devices using the Xcode UI Testing protocol. Under the hood, it will launch the WebDriverAgent on the iOS device, which does the heavy lifting.
There is 3rd party, commercial software which allow you to launch Appium tests on iOS devices without having to use Xcode. Such examples are Mobile Center from MicroFocus, Appium Studio from Experitest, or the quamotion/appion-docker-ios docker image.
Yes you need xcode to run you test on ios. And yes it supports native, hybrid as well as browsers.

Resources