I want to build a game with React Native. I am doing my testing locally on a personal Android device using the Expo app but ideally would love for the app to be cross platform. I do want to release it to a public store or have it be available for folks to play in some format.
Is it OK if I am using Visual Studio Code (on a Windows machine) to build my app, using node.js command line to run expo commands and testing with live reloading on my Expo app? Do I need to have a Mac + XCode if I want to edit iOS code?
What is the typical development process/toolset used?
React Native IS cross-platform, building the apps for production on different platforms, however, requires a different procedure. What makes it cross platform is that you write the source codes including all of the components (Well most of them) one time, and it automatically generates the native codes for Android and IOS.
There's no typical toolset for writing code, you can use any code editor you prefer (I use Sublime for example), but you should have the needed requirements listed in the getting started page in the official official docs including node.js.
Expo helps in testing the app on both android and ios without the need of a Mac (it has some other cool features too!). So if you want to release to apple store, you'll definitely need a mac (or a virtual machine running MacOS like VMWare)
In order to generate the release apk for android: Android Release APK
and for IOS: IOS
Related
I need create some Windows app with Firebase, but I can't choose a programming environment for Windows app. Which ones support FireBase?
Firebase does not have SDKs that directly support building apps that can be deployed on Windows.
The closest I can think of:
The Firebase SDKs for C++ and Unity can deploy to Windows desktop, but that is explicitly only intended for development. So you can develop and test your mobile game on Windows.
There is some movement on adding Windows support to the FlutterFire binding library, but it seems very early going.
Outside of these: the REST APIs for Firebase are all platform agnostic, so can be called from anywhere. There are quite some third party libraries that wrap these REST APIs, so I recommend doing a search for your combination.
Also see:
Firebase for Unity3d Windows application
Is it possible to use any kind of database in Flutter Desktop
Flutter & Firebase
Flutter Fire
Flutter Fire is the official Firebase SDK for Flutter and has incredible documentation, helpful videos and tutorials. The integration is seamless since both tools are built by Google. The maintainer of FlutterFire has created FlutterFire_Desktop which I believe may be a solution for you once its fully built out.
Flutter
Flutter is a UI framework which uses the Dart language (also built by Google) to allow developers to build one app and deploy everywhere.
Dart can compile to x86_64; ARM64 and Javascript - Ideally you can write one codebase for Windows, Mac, IOS/Android and Web. Dart also has a built in package manager and open sourced community through Pub.Dev which may have more workarounds for you.
C++ SDK
As of the latest Firebase Summit , they have recently added more support for their C++ SDK although I'm not entirely sure how it would integrate or if it integrates into windows desktop applications at all.
We've been developing a cross-platform app in Xamarin on Windows and now we are moving to make GUI for iOS counterpart.
If I'm understanding correctly we need to switch to Visual Studio for MAC, on a MAC machine, and continue our GUI development there.
Is it possible to develop everything on Windows and just publish an app on the MAC machine?
How do we include the logic and everything from the android app?
You can use Xamarin.Forms to develop UI for both Android and iOS.
But if its already native then you can still continue developing it in Windows.
For the build and testing you definitely need a MAC, if you don't want to use a VM then you can build it on the cloud using a https://www.macincloud.com/ or other party that uses the same service, and use a simulator on windows.
If its cross platform then I assume you're using a .NET Standard for the shared codebase. So there would be no problem using the same logic for both the Android and iOS.
It is up to you. Many apps will work by just publishing on the Mac. Of those many will have some artifacts that shouldn't be in the end version.
To simplify it is like asking whether you should publish the app without testing and fixing. In 99% no, but sometimes it may work.
I'm going to install Android studio and run react native on it
But will it give me iOS apk still!?
I have heard that we don't need to rewrite react native code for iOS .
React Native IS cross-platform, building the apps for production on different platforms, however, requires a different procedure. What makes it cross platform is that you write the source codes including all of the components (Well most of them) one time, and it automatically generates the native codes for Android and IOS.
Expo helps in testing the app on both android and ios without the need of a Mac (it has some other cool features too!). So if you want to release to apple store, you'll definitely need to use XCode on a mac (or a virtual machine running MacOS like VMWare)
In order to generate the release apk for android: Android Release APK
and for IOS: IOS
There are two flavours of React Native. Expo and react-native init
This SO answer explains the main differences between them.
What is the difference between Expo and React Native?
tl;dr
Expo (it is a set of tools around react native) will make crossplatform applications without requiring you to edit native code. It can make both iOS and Android apps on Windows PCs and Macs. Expo builds the apk and the ipa on their own servers.
react-native init (actual react native) it will also create cross platform apps. It may require you to work with native code. You can only develop iOS apps on a Mac. But it is much more flexible in what you can do and what dependencies you can use. You have to build the apk and ipa on your own machine.
You best bet is to check out the documentation, all the answers are there. You just have to read through them.
https://facebook.github.io/react-native/docs/getting-started
https://docs.expo.io/versions/latest/
I'm aware that a Mac or a Mac service e.g. MacInCloud.com is necessary for building and submitting iOS apps.
My question is about the actual workflow of building an app on Windows using Xamarin on Visual Studio 2017.
We need to write code, test and debug throughout development cycle. How does this work with Xamarin running on Windows? How would I actually see what my mobile app looks like or behaves during the actual development cycle?
While developing my web apps in Visual Studio, there are many trips back and forth to the browsers and back to VS in order for me to see the results of my code. How does this work with Xamarin running on Windows? Is Xamarin Live Player the only option for development cycle? Is there a solution through MacInCloud or similar services so that tethering a device to dev machine is not necessary?
I'm just trying to understand how a healthy development cycle is created for Xamarin developers on Windows.
I will answer your question in few section: Coding, Debug, Test
Coding
You will be using Visual Studio to write your codes. iOS and Android code will be written in C#. You will get access to UI Designer for both iOS and Android to edit the layout files and storyboard/xibs. For 3rd party library, there is NuGet to serve your needs.
Debug
You can use Xamarin Live Player without connection to a Mac/MacInCloud for basic preview. However, some features of iOS is not available in Xamarin Live Player (e.g. xibs files not supported...).
If you setup with connection to a Mac, you will be able to see a list of Simulator that available in the Mac you connected to. By default, if you debug it, the simulator will still show up in the Mac. Then you will need to VMWare or remote into the Mac to check the simulator output. If you have Visual Studio Enterprise license, you can get access to a Remote iOS Simulator feature. You will need to turn the option ON. After that, you will able to see a remote iOS Simulator showing in your Windows machine without the needs to remote into Mac machine anymore. For debugging in actual iOS devices, you will still need to plug your device into the Mac. Previously (more than 1 years ago), Xamarin announce that they are working on "iOS USB remoting" to allow you to plug in iOS device into Windows machine and debug on it. But it is not release until now.
For Android, you can get access to Android Emulator Manager to add emulator to debug or you can deploy apps to physical phone just like what you can do with Android Studio.
Test
I will be referring to Xamarin.UITest for this part. You will be able to write UITest code in C# inside Visual Studio. Xamarin have product "Xamarin Test Cloud" to allow you to upload test code and binary and then run your test in cloud periodically. If you want to run the test locally in your machine, you will only able to run Android UITest in windows machine. To run iOS UITest locally, you will only able to run it in Mac machine. Using a Mac, you can also run Android UITest.
You can use a simulator/emulator instead of a device. For iOS, the simulator would run on the Mac Build Host that you are connected to. You can select the option for "Remote iOS simulator" in Visual Studio -> Xamarin.iOS options and you'll be able to interact with the simulator without having to RDP/VNC/look at the mac. For android, you can just run an emulator in Window and interact with it like that. Using your web apps comparison, you would use a simulator/emulator instead of browser but, for the most part, the process would be similar.
I have been developing a Xamarin MVVM app targeted at iOS and Android. I initially did the iOS development on Windows with VS 2022 and an iPhone attached via USB. I knew that I was going to have to eventually move to the Mac for final provisioning but I ended up taking that painful step earlier than planned because certain Xamarin features were just not working on Windows. First I could not get my app icon to be anything other than the Xamarin default and then Xamarin.Essentials.FilePicker would not select a file:
https://github.com/xamarin/Essentials/issues/1710
So after a week of struggling I finally got my project building and deploying on the Mac. However, I am not nearly as comfortable working on the Mac as I am on Windows where I have all my familiar development tools. So then the question was how to share the project files between the PC and the Mac so that I could edit and compile on the PC and then move to the Mac for final testing.
At first I tried iCloud but I could never get the files to sync reliably between the shared folder on the PC and the Mac. I am used to Dropbox and OneDrive, which work as expected. iCloud not so much.
So what I have been doing is committing and pushing the changes to github and then pulling the changes into the project on the Mac. It is quick and has the added benefit of version control using an offsite server. I am happy with this workflow and publishing the app on the Apple Store should be an easy task when that time comes.
Update:
This process is still working for me. I have taken the additional step of doing the release configuration on VS Mac and publishing my app to App Store Connect. That experience was convoluted and frustrating but it now works and I have people testing my app via TestFlight.
One hiccup is that when selecting Automatic iOS Bundle Signing in the project properties on VS Windows, this change gets pushed to the Mac side and causes a build error under Debug until I select the Automatic provisioning profile on the Mac. Somehow it gets set to the Wildcard profile on the Windows side.
i'm starting development with phonegap for tablets and need to clarify some issues.
1) as i understood, i can work in any IDE: Visual Studio, Idea, XCode. All what i need from IDE is emulator to test some specific things, for example interacting with file system, or making JSONP requests to some site's API. Is this true?
2) after developing of application for one single platform, i can take the 'www' folder and build it for other platforms using PhoneGap Build, isn't it?
3) is there any way to emulate tablet in visual studio?
1) You need the IDEs for target-platform-specific coding. If you want to make a PhoneGap plugin for Windows Phone, you'd use Visual Studio for the native part. If it were a plugin for iOS, you'd use Xcode.
If you don't want to use PhoneGap Build, you can also build packages for the target platforms using the respective IDEs.
IDEs are also the primary way to test your application, since you can't easily test
features specific to a mobile device in your browser. If you have the SDKs for your target platforms installed, the respective IDEs should feature a way to run an emulator. You will probably have to set up a project for your app, according to the instructions here.
2) Generally, your application should run on any supported platform, as long as you stick to the PhoneGap API. Some features might behave differently on different platforms, so you'll still have to test throroughly on all platforms you indend to support.
3) If you install the Windows Phone SDK, you can use an emulator. There is some information on what the emulator is capable of on MSDN.