Flutter work on a project from Mac and windows - windows

Is it possible to work on a flutter project from Mac and Windows at the same time ?
Same time in the sense, work on Mac and test with iOS. later access the folder from windows and test windows device without copying the project folder? may be by storing project on a shared space ?
Any Help will be highly appreciated as I'm trying to develop an app that should work on iOS,android and Windows.

Write code (on Windows or MacOS) and push it to GitHub
Clone your app (on MacOS or Windows)
$ git clone https://github.com/myUserId/myApp.git
$ cd myApp
Make sure You've downloaded the app's dependencies
$ flutter pub get
[Modify the iOS version of the app as necessary]
Build it ($ flutter build ios) or run it ($ flutter run)!

I don't see any problem there. If from your Windows and MacOS device you can both access the project (on a shared folder for exemple) you should have any problem running Flutter on both of your devices.
You may want to use something more "easier" like a GitHub project where you only have to git pull the changes made.

Related

How to open a Flutter Android studio project in xCode?

I've developed an application with Flutter with Android Studio. Now I want to build the app for iOS. I installed xCode on my Mac and git cloned the repository from github in xCode. How could I open the project in xCode? If I try to open the folder i get "Unable to open the file".
With Xcode You can open ios specific part of the project which is located in ios/xcworkspace.
To open a Flutter project in Xcode, you first need to make sure that you have built the correct Flutter files for ios, so, first, run:
flutter build ios
And then open your file under the directory ios/MYPROJECT.xcworkspace

How to install all identical versions of its Windows working environment on Mac? (React-Native)

I have my React-native application on my Windows pc.
I would like to install exactly the same working environment on my Mac
with identical versions of each element to build my app on Mac without a hitch.
I don't know at all how to do it or where to start.
What is the easiest way to do this by considering having the same versions?
I am novice, any help would be highly appreciated.
Assuming you have an npm-shrinkwrap.json file in your project the versions should stay the same when you transfer to a different machine. If you don't, you can create one using npm shrinkwrap
There's lots of little things that could cause problems, but generally if you do the following steps it should get you most of the way there:
1) install react native on the mac npm install -g react-native-cli
2) copy your project code to the mac
3) run npm install from the root directory of the react native project
4) run react-native link
5) cd ios and run pod install
6) Double-click the *.xcworkspace file to open up the project in Xcode.
7) cd .. to return to the project directory
8) run npm start -- --reset-cache to launch the bundler
7) try to build in Xcode
Using Git and Github (or equivalent) seems to be a long term solution
Create a repo, commi, push your project and clone it and the Mac.
Every time you do a modification on your PC, you commit, push and then pull it on your Mac.
All the versions are specified in package.json, so after an npm install your project should be exactly the same.

How to open an Android Studio made Flutter project on Mac?

How can I open an existing Flutter project made by Android Studio on Mac-Os to export ipa version of app? Can it be done with Mac-Os version of Android Studio or I have to do it with X-Code? How?
Thanks in Advance
I could finally do that by accomplishing the following steps:
Copy the project into macOs (with X-Code Installed)
Open it by Android Studio (preferably latest version)
Enable Flutter and Dart plugin on Android Studio framework settings
Run command flutter packages get (Connection to Flutter repositories must be available)
Run flutter build ios --release as #Günter Zöchbauer truly commented
Connect iPhone device or simulator and run directly on your device
If some errors printed you may need to verify your developer account settings on X-Code or check Github page of your libraries for possible iOS issues
You can do it in XCode.
Ensure you run flutter build ios --release before you do.
Connection to physical iPhone device is not necessary. Run any sample project in xcode. Start a Simulator. (Only One simulator preferrably).
clone the repository from github into Mac (with X-Code Installed)
open terminal.
cd to your pubspec.yaml
flutter run (it will automatically run flutter pub get)
(It will launch on the already running iOS simulator)
follow steps on flutter.dev to install flutter. Above steps will only work from terminal if flutter doctor(any flutter command) is recognized

Not able to build and deploy Mobilefirst app on Iphone

My environment setup is:
Eclipse luna
Mobilefirst version 7.1.0.00-20151012-1525
OS windows 7
I am working on a app in which I have added IPhone environment and to deploy app on IPhone copied native folder to mac and using xcode to deploy but having following error.
/Users/sanketkulkarni/Library/Developer/Xcode/DerivedData/DemoDemoIphone-azvbaszihidylngstqhkzbapopkq/Build/Intermediates/DemoDemoIphone.build/Debug-iphoneos/DemoDemoIphone.build/Script-427B829D1393724500F223DC.sh: /Projects/sanket/06-04-2016/native/buildtime.sh: /bin/bash^M: bad interpreter: No such file or directory
Looks to me like the app is not actually built.
Make sure you have first select Run As -> Run on MobileFirst Development Server, and then copy the iphone\native folder.
Note though that it would be better if you will do your development on your Mac to begin with.
Is there a reason why you are developing on Windows/Linux, and then moving your code to Mac?

How to setup Git on a Mac with Windows 8 running in Parallels

I'm wondering what is the best way to setup Git on a Macbook Pro both OS X Mountain Lion 10.8 with Windows 8 Pro in Parallels?
I'm not too sure what is the best work flow. Should I be installing Git on both platforms or should I have all my files stored on one platform and install Git just on that?
The reason why I'm asking is because I intend to use Visual Studio on Windows for school projects and use Sublime Text/XCode to work on web development and iOS apps.
Thanks.
The best practice is to install Git on both workstations, each of them with a full repo.
Ideally, you would push from either workstation to a git repo hosting service like GitHub.
That way:
you get the full repo (with the full history for all files) on each computer
you can work on either one of them even without network
you can save your work on the cloud
The issue can be around setting.
See:
"File permission issue with Mac/Windows when using git":
git config --global core.filemode false
"Git (GitHub): Multiplatform development and autocrlf option?"
You can set autocrlf to true on OS X as well as on Windows in your case.
(even though I prefer it set to false)

Resources