Cordova Keyboard Plugin doesn't work in ionic View - ionic-framework

I've been trying to find an answer why the cordova keyboard plugin doesn't work in ionic view.
In the documentation it says it supports version 1.0.3.. The updated version is 1.0.4. I suspect that's the reason why the keyboard plugin doesn't work in ionic view. How can I downgrade to 1.0.3?

I realize this isn't a direct answer to your question, but...
Personally, I've found Ionic View, while a cool idea, to be mostly just a tool for basic previews. I've noticed all sorts of things don't work within Ionic View, such as overridden back button behavior, rendering inconsistencies, Crosswalk issues, etc.
I've done comparisons of Ionic View rendering directly with running the app on a device (using ionic run) and it very often has differences, even with minimally complex apps. That, to me, is unacceptable in a situation where you need valid prototypes. I previously wasted a lot of time trying to fix some issues that I found out were actually caused by Ionic View. I use the Cordova Keyboard plugin in one of my apps, and I was having issues with the event detection within Ionic View. Those issues didn't happen when I ran the app directly on my devices.
I've since switched to using Google Play Staged Rollouts to alpha/beta test my Ionic apps with multiple people/groups. Changes might not be reflected immediately (since updates need approval), but it will be exactly as the app is going to behave, and that might be the most important consideration of all.
However, if you're absolutely set on using Ionic View, you might consider filing this as an issue on their GitHub page.

Related

Flutter Basics (write once, run anywhere?)

Hi stack overflow community,
I'm a novice programmer in high school and have never written an app for mobile devices before so please bear with me. If I was to write an app using Flutter, will I only be required to write the code once and then be able to distribute different versions of it (iOS, macOS, Windows, Linux, Android, etc)? Or will I need to make small changes for each version such as using XCode to create the iOS version and Android Studio for the Android version? I know this is such a basic question but I've spent a couple of hours looking this stuff up and I'm still confused. Any help would be nice.
Thanks,
Daniel
In a product development environment, after writing the cross-platform code with Flutter, there are some need-to-do tasks related to Native environment.
In the case of Android, there are several cases when you'll need to touch the Native level such as config Firestore settings, Social authentication (Login with Facebook for example), changing the launch icons/ splash screen of the app or publishing to app store, etc
For iOS, the same case apply as well. So I suggest you start with small steps to develop the app first, then when running into something that seems impossible with just Flutter code, there are tutorials and SO to guide you through. It might seem overwhelmed at first, but we are all on a journey, so no need to rush it ;)
You should make small changes too. For eg when adding launcher icons and splash screen you have to edit the respective native folders. When distributing for ios you need to manually customize its Runner from xcode. There are many library that support either android only or ios only. In that case if you need that feature you have to make changes in native code like java ans swift.
if you're creating your own native plugins, you will have unique code to write. But if you're just using things out of pub, almost nothing will require change (unless you are publishing to the store).

is it possible to embed an ionic application within a flutter application?

To be more precise, I already have a huge app writen in Ionic and now we're considering to migrate it to flutter, but we can't rewrite it from scratch, both ionic and flutter should coexist.
So my question is: can I have a flutter app as a "host" and import / run the ionic app inside it? Something like a micro frontend.
Until now I was able to build the target ionic app and import it on the flutter app, under android folder, but it does not feels like a productive way to approach the problem.
I also googled a little bit about this integration, but did not find anything that solves this problem.
I appreciate any help on this topic.
Yes, it is possible, but very cumbersome.
I did it for a project and embedded 3 ionic apps inside flutter.
I'll not list every problem that i faced but just go through some points to give you an idea.
You will need to take care of some cordova plugins that use native code, for Android copy and paste some folders like CordovaLib,cordova and use it as a library. For iOS you must add the plugin files like *.h to the compiles list inside Xcode and create an Pod to get the cordova resources (that's the way i did)
To "launch" the app for android you need to start the cordova activity and for iOS you need to play with UINavigationController and FlutterViewController, and of course create a method channel to be possible to call it from Flutter.
For multiple apps, you have to mess inside de cordova code to get the app from the right www folder and be sure to equalize every plugin version between apps.
Some packages from flutter may clash with ionic/cordova libs
Every change you do to your ionic application it must be tested outside flutter and within it to see if there's any mismatch behavior that you didn't expect, specially when adding new plugins.
Maybe some permission issues will arrive between applications like camera or localization.
I know thats not the answer, but when searching on how to do it, i stumbled upon this question a few months ago and it still without any answer on this problem.
But my final take is that the effort of joining together all pieces using multiple languages and frameworks together with the job of maintaining this spaghetti behemoth is not worth it and you'll save yourself of a tremendous headache.

Very long delay before events fire on ionic elements in real device

When I have more than 5 ion-button elements on the same page and use the (click) binding to handle events, it takes over 3 seconds, sometimes almost 5 seconds for the event to fire. This problem only occurs when I'm running the app on a real device (Android only; I haven't tested on iOS). Running the app in browser causes no such issues.
My app is fairly complex with 20 pages or so, but on the pages where I use less elements, the events fire normally without the 3 - 5 seconds delay.
This issue was raised on Github in 2017 (https://github.com/ionic-team/ionic/issues/12817) but the Ionic team simply closed it without any solution or potential walkarounds. Quite frustrating.
Does anyone know how to solve this or is the Ionic Framework simply not a practical solution to develop real world apps? Solutions on the internet suggest using (tap) instead of (click), while others suggest using tappable (click). None of these work.
I never found out what the exact issue was but, after running ionic build locally, then uploading these resources to Phonegap build, the issue would be present.
However, I decided to install the latest Android Studio and started building locally. Strangely, this solved the problem.

Flutter - Am I able to creat a module with Flutter and use it in my iOS and Android projects?

In my company, we are working on a huge product. We have a repo for the Android project and also we have another repo for the iOS project.
I think it is impossible to rewrite the whole of the project in Flutter. So, something that popped in my mind but I am not sure if it is feasible. Each Android/iOS project contains many modules. I am working on a module called Enterprise. It has its own Activities, Fragments and business logic. So, my question is, Am I able to consider this module as a black box (it has a few inputs that are coming from the other modules and a few outputs that will be presented in the app module) and make it by Flutter. Then I will use its .aar version in the Android project as well as the iOS project.
Does an implementation like this is feasible?
Okay, I found Flutter is thinking of a way to solve this issue. I found two links that might be useful to you, too:
Add Flutter to existing apps. According to this page, "The "add-to-app" support is in preview, and is so far only available on the master channel.".
Integrating Flutter into an Existing App.
I will be more than happy to accept your answer if you have a better approach.

ionic sidemenu on mobile browser not working smoothly

I am developing mobile web app using ionic sidemenu, but it is not as smooth as it should be. When I open sidemenu using slide left/right, I am getting less than 30 FPS as shown in figure.
How can I improve the performance?
Reaching 60 FPS would be great!
AppGyver's Steroids tooling also provides you with access to Crosswalk on Android. You can run it in your Ionic project directly without modifying any files.
Also, Supersonic's sidemenu/drawer is fully native, so if you're up for migrating, it'll run way faster. :)
(Disclaimer: I'm a programmer for AppGyver.)
My advice is to use Crosswalk instead of the Cordova as the webview for the app.
While both share the same end goal, they are different:
Cordova, from the Apache Foundation, uses the regular (pre-lollipop) Android webview, which is based on Android's stock browser since its inception.
The Crosswalk Project, created on the Intel Open Source Technology Center, is different. It wraps your app with Chromium, the open-source base code that gave birth to Google Chrome, which brings numerous performance enhancements: css3 transitions, animations, 3d transformations, html5 support, remote debugging and much better javascript support and performance.
At the time of writing, the Ionic team is already working on a beta version (1.3.0-beta1) that uses Crosswalk instead of Cordova. Not really stable just yet, but a huge promise.
In any case, you can use Crosswalk today, by manually copying your Ionic project's 'www'
folder content to the project folder inside Crosswalk folder and run it. You'll need to setup some manifest files previously, so read the docs.
In any case, it's not hard at all to try, and I'll recommend it everyday for all projects pre-Lollipop. If you're targeting Lollipop/Android 5 versions, you don't need it, because the default Webview in these versions is already Chrome-based.
Hope it helps.