Integrate C++ in Cordova electron - windows

As we all know Cordova has added electron platform to build desktop apps for different Operating Systems. Like we can integrate C++ in android using JNI and Objective C wrappers for iOS and mac OSX. Is that possible to do something similar in Cordova's electron platform and windows platforms.
Followed references
1
2
Those references didn't helped me incase of Cordova project.
Can someone help me with this. Thank you for your time and response.

There is Webview https://github.com/webview/webview , which can help to build GUIs similar to electron but with c++. It is using HTML / CSS / JS as UI layer.
The old version was header only but didn't run on msvc c++. The new version runs on msvc but is more complicate.
There also is Nimview https://github.com/marcomq/nimview, which uses an older version of webview and already has some C++ / msvc examples. It improves testing, debugging and development for offline applications, compared to webview.
Nimview can also be used for Android.
Disclaimer:
I'm the author of Nimview

Related

Can I use Firebase for creating Windows app?

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.

Can xamarin apps be built for Windows, MacOS with same source code?

Given an app written in C# for Xamarin, can it be built to run on all the supported platforms with minimal changes, including Android, iOS, MacOS, Windows?
I realize that Xamarin claims 90% of the code is shareable across platforms (and 10% needs to be customized), and I'm referring to that "90%".
What I don't understand is whether that 90% is shareable across the different Xamarin tools,e.g. Xamarin.Forms and Xamarin.Mac or if those are substantially different tools with different APIs, etc.
For example, I see that with Xamarin.Forms I can build for iOS, Android, and Windows. But not MacOS. So, on a Mac, can I install Xamarin.Mac and then build the same app for MacOS ?
You can add a MacOS target for your Xamarin.Forms-based UI, of course, this is done via Visual Studio for Mac:
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/platform/other/mac
There are items within Forms that are not feature complete on MacOS and thus it is still in a "Preview" release and those are listed on the "Platform Support macOS Status" wiki:
https://github.com/xamarin/Xamarin.Forms/wiki/Platform-Support-macOS-Status
Xamarin.Forms is the framework that allows you to create cross-platform apps between Android, iOS and UWP. In my experience, a lot of the features of Xamarin.Forms do not transfer over to Xamarin.Android. In fact, a big chunk of the way things are done for UI Xamarin.Forms will not transfer over to the Xamarin.iOS and Xamarin.Android. Most of the times when I find a solution that works in Xamarin.Forms and I try to do the same thing in Xamarin.Android I end up just figuring out the problem myself in Xamarin.Android from scratch.
When they say that 90% is shared, they mean that within Xamarin.Forms... 90% of the work on your models and code behind can be shared between the projects (within that Xamarin.Forms solution) and 10% will have to be custom tailored for each platform (UWP, Android, iOS)
EDIT: Just for clarification in the future, you need an iOS device or an iOS virtual machine to compile the code on iOS
To build Xamarin.iOS apps with Visual Studio 2019 on Windows, you will
need:
A Windows machine with Visual Studio 2019 installed.
This can be a physical or a virtual machine.
Windows system requirements
A network-accessible Mac set up with Apple's build tools and Xamarin.iOS.
Visual Studio 2019 accesses this machine over a network
connection to use Apple's build tools, which are required for
compiling native iOS applications.
Mac system requirements
source: https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/windows/?pivots=windows
As long as you use .Net code and Xamarin.Forms it is 100% portable/sharable across every single project. Xamarin.Forms are currently in beta for macOS and Windows WPF (but for UWP it is not beta), and for macOS particularly they don't have the true native look.
Xamarin does support using the native interfaces and native APIs and whenever you do that, it is not portable.
So there is nothing like 90% sharable, it may be some estimate for some cases. It can be 100% sharable or it can be only 10% sharable depending on your project and how much you stick to the sharable APIs.

Can you publish a Windows 10 (Universal) app from PhoneGap on Mac?

I am looking to develop a Windows 10 Universal app based in HTML, CSS, and JavaScript for use on Microsoft Surface tablets primarily. I have found information that says it can be done on this page, but at the very bottom of the page it says it is in beta. However, I can't seem to find anything more than that post. No updates, or documentation or anything. Does anyone know if you can do this from the PhoneGap app on Mac OS?
If not, I guess the next best option it to do it on a Windows machine using Visual Studio 2017 and Cordova?
Any information anyone has on this subject would be helpful.
Thanks!
No, I am pretty sure you can't build UWP apps on macOS. The reason is quite similar as the reason you cannot build iOS apps on Windows - you could build the JS portion of your code, but the problem is the fact that UWP build tools and SDKs are OS specific and unless Microsoft specifically ports them to macOS, they cannot work there.
You could use Parallels and run Windows as second OS, or use a build server to build the app in the cloud. Visual Studio App Center is a very good solution for you purpose as it allows you to configure a full build pipeline including UWP, iOS and Android builds.
You can actually develop a UWP app using phoneGap on Mac if you are building it using web technologies. (HTML, CSS, Javascript) But you can not build/publish the app on Mac, but if you have a Creative Cloud account, you can use Phone Gap Build to upload it to the service and have it built there.

Xamarin IDE and visualstudio for windows +Mvvmcross

I have some confusions About the IDE to use for MvvmCross
a) VisualStudio (VS) uses Xamrarin.iOS and Xamarin.Android plugin for iOS and Android development. But can we also use PCL(Portable Class libraries) and MVVMCross/Monocross frameworks in VS? I see the PCL option on VS but, i don't see the support for Android & iOS. Do i need to install additional plugin for PCL to support these two platforms as well?
b) Xamarin IDE supports Android and iOS development on Mac but, is it true that Xamarin doesn't support Mono.iOS on windows? Isn't it strange that Visual studio can use the network mac for iOS development but why not Xamarin Studio?
Thank You for your time.
Regards,
Saurav
a) VisualStudio (VS) uses Xamrarin.iOS and Xamarin.Android plugin for iOS and Android development. But can we also use PCL(Portable Class libraries) and MVVMCross/Monocross frameworks in VS? I see the PCL option on VS but, i don't see the support for Android & iOS. Do i need to install additional plugin for PCL to support these two platforms as well?
MvvmCross currently uses Profile104 for Portable Class Library development. You can easily develop for this profile without installing Android and iOS. The mapping of PCL profile to platforms is, however, quite confusing (it's not exactly obvious) so the easiest way I find to create a Profile104 PCL is:
to create any PCL
then to manually edit the csproj file to say Profile104 - look for a line like: https://github.com/slodge/MvvmCross-Tutorials/blob/master/Babel/Babel.Core/Babel.Core.csproj#L14 in the csproj
I have customers who develop in medium size teams where only some people have the Xamarin tools installed - most people have just Windows tools and work on the PCLs using Unit Tests and using WindowsPhone/Store user interfaces.
b) Xamarin IDE supports Android and iOS development on Mac but, is it true that Xamarin doesn't support Mono.iOS on windows?
Yes, this is true.
Isn't it strange that Visual studio can use the network mac for iOS development but why not Xamarin Studio?
This may feel strange, but I believe this is actually this is Xamarin listening to their customers.
I believe, that the reason customers wanted Windows support for iOS was because they wanted to use Visual Studio and they wanted to use plugins like Resharper. Xamarin provided this in their 2.0 release.
It is true that they could also have added iOS functionality to XamarinStudio for Windows as well - but this (I believe) wasn't what any of their customers were asking for - so adding it would have created more work (both in creating and maintaining it) without adding any significant benefit (IMO)

Developing for tablets using Phonegap

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.

Resources