Transferring projects between Mac and Windows

Viewed 3254

I have a Flutter project I created with Android Studio in Windows. I tried to copy, compile, and run it on iOS (via a Mac with XCode, obviously). I tried GitHub to copy the project between OS's as well as just zipping the project in Windows & unzipping in OSX.

I had an issue with the error

/bin/sh: D:\Flutter/packages/flutter_tools/bin/xcode_backend.sh: No such file or directory /bin/sh: D:\Flutter/packages/flutter_tools/bin/xcode_backend.sh: No such file or directory

Even a newbie like me recognizes there's no D:\ drive to recognize in OSX. Are there any best practices or suggestions I should know about to minimize the likelihood of these kinds of issues? In OSX I will be compiling only for iOS.

1 Answers

As @chris-reynolds (and I) noted above, it turned out the issue was that I had not gotten the application's dependencies after cloning it from GitHub. So, to summarize, what I should have done & will do in the future is:

  1. Write code (on Windows) and push it to GitHub
  2. Clone my app on MacOS

$ git clone https://github.com/myUserId/myApp.git
$ cd myApp

  1. Make sure I've downloaded the app's dependencies

$ flutter pub get

  1. [Modify the iOS version of the app as necessary]
  2. Build it ($ flutter build ios) or run it ($ flutter run)!
Related