I've developed a flutter app in AndroidStudio and everything is running perfect.
Now I want to display the app on iOS device. I see many similar questions which state that you have to have x-code, etc. setup on a MAC or virtually. Perfect, done all that setup, now, how do I get the AndroidStudio project into iOS IDE (VisualStudio?). I assume once I do that I just run like any other iOS app?
Seems that every flutter tutorial would have this but just don't see it when I google. Any help would be greatly appreciated!
A Flutter project is set up as follows:
Root directory
- pubspec.yaml
> lib
- ... (dart files)
> assets
- ...
> android
- build.gradle
> app
- build.gradle
> ...
> ios
- Runner.xcproject
- Runner.xcworkspace * (this may not be there until running `pod install` or `flutter run`.
- Podfile
> ...
If you have XCode and everything set up properly on a mac, you should be able to run flutter run
from the root directory and have it deploy to the device. You could possibly even do this from android studio, although I personally use IntelliJ so I cant verify that.
If you want to open the XCode project directly, you should actually get the option in IntelliJ (and possibly android studio) whenever you look at a swift or objc file. This is a fairly recent feature which has been introduced (as of June 2018).
Otherwise, you can directly open the Runner.xcworkspace file to open the XCode project. Running to a device should work from XCode after you've tried to build at least once with flutter (or you can run pod install
in the iOS directory manually).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With