I\'m new to Flutter, was just wondering if it\'s possible.
I\'ve tried building the demo code using intellij with given instruction (https://flutter.io/setup/). It
you can read this article
it uses some tools and CodeMagic to build Flutter app for Ios.
I have used this method it works fine you can hot reload and debug your app the downside is you have to enter apple id password in Cydia Impactor which for sure you should use a second apple id and after apple provisioning profile expiring you should sign your code with Cydia Impactor again. but it's so much cheaper than by a Mac or rent one.
You could do that with a Mac (or Hackintosh, or VM), but since we don’t have access to a macOS machine we can use one remotely via Codemagic or Travis CI — completely free! (as long as your project is on a GitHub, Bitbucket or GitLab repository).
First, create an account or sign in to codemagic.io.
Then, click the settings (gear) icon next to your app. Scroll down and click on “Build”. Make sure Mode is set to Debug, and select iOS under Build for platforms.
After that, build the app (Start your first build).
Codemagic will send you an .app file via email. Rename it so that it ends with .zip. Extract it, and you’ll get a folder called Runner.app. Create a folder called Payload and place Runner.app there. Finally , compress the folder called Payload — this will be your IPA file (you may rename it to .ipa).
Alternative: Building the app with Travis CI You’ll need to create an account on Travis CI and let it access your GitHub account.
Then, create .travis.yml on the root of your project with the following contents:
os: osx
language: generic
before_script:
- brew update
- brew install --HEAD usbmuxd
- brew unlink usbmuxd
- brew link usbmuxd
- brew install --HEAD libimobiledevice
- brew install ideviceinstaller
- brew install ios-deploy
- git clone https://github.com/flutter/flutter.git -b beta --depth 1
script:
- flutter/bin/flutter build ios --debug --no-codesign
cache:
directories:
- $HOME/.pub-cache
before_deploy:
- pushd build/ios/iphoneos
- mkdir Payload
- cd Payload
- ln -s ../Runner.app
- cd ..
- zip -r app.ipa Payload
- popd
More info
Apple has made compiling of iOS applications exclusively avaible to macOS.
You can read through this answer and thread to look into workarounds for getting it to work on Windows.
Basically there is no other way for Flutter, but Xamarin and NativeScript provide support for it.
I suggest you use a virtual machine to do your thing.. I had a Mojave MacOS installed on my Windows 10 and I had things running smoothly!
A Mojave image can be got from https://getintopc.com/softwares/operating-systems/mac-os-mojave-10-14-1-vmware-image-free-download/
I found this useful as I had some things that I wanted out of the Mac world while I had a dell latitude.
You can do your main development on Linux or Windows with Android Studio or Visual Studio Code. Then use git to move the code to macOS to test it with Xcode on an iOS simulator/device and deploy it to the App Store.
You could do all development on macOS but you can't do all development on Linux or Windows. I'm not too pleased with Apple for making overpriced machines and then forcing us to buy them. Since I can't afford a fast Apple computer, I am planning to do most of my development on Linux and then just do testing and deployment on my painfully slow Mac Mini.
Update
It seems like there are more possibilities now. Read the following articles:
Personally, I ended up buying a MacBook Pro for way too much money. I have to admit that it is convenient, but I have done very little up to this point that really required it. I'm doing all of my learning and development in Android Studio and usually use the Android emulator. Every now and then I fire up the iOS simulator, but I haven't been required to.
My advice is to keep using your current system (Windows or Linux) for as long as you are learning and even while you are developing your first Flutter apps. Eventually you may appreciate the convenience of having the iOS Simulator and Xcode on the same machine, but there is certainly no rush.