I am working on entering text with Hardware keyboard(Bluetooth connected) connected to iPhone(iOS 9 and iOS 10) in Ionic 3. While entering, The input is losing its focus and even if i try to enter again, It is not taking any input from keyboard. This hardware keyboard is working well in Android phone but not in iOS.
I tried upgrading/re-installing updated keyboard plugin from Cordova. But no luck with that.
The below is my Ionic Info.
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.12.0
ionic (Ionic CLI) : 3.12.0
Global Packages:
cordova (Cordova CLI) : 6.5.0
Local Packages:
#ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.1.2 browser 4.1.0 ios 4.1.1
Ionic Framework : ionic-angular 3.6.0
System:
ios-deploy : 1.9.1
ios-sim : 5.0.13
Node : v7.4.0
npm : 5.0.3
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
Misc:
backend : pro
If any ideas, Please let me know. Thank you.
EDIT
I tried with downgrading Ionic from 3.12 to 2.18. Still no luck. Input field still looses focus within milliseconds.
Install the Keyboard plugin.
In app.components.ts 's constructor :
platform.ready().then(() => {
keyboard.hideKeyboardAccessoryBar(false);
});
There are couple of things that need to be verified here , issue you are facing is something that is related to the WebViews especially for the iOS , so let's start from the Keyboard, try to install the ionic-plugin-keyboard
cordova plugin add ionic-plugin-keyboard --save
if you need more events related to how you want to trigger the Keyboard events refer the official doc
i generally use the ionic-wkwebview rather than going with the in build webview of iOS which resolves most of the problem. You can install the plugin as follows:
ionic cordova plugin add cordova-plugin-ionic-webview --save
For complete installation refer the ionic-wkwebview-official doc
Even for the ionic-plugin-keyboard , there was issue with the ion-input but it was resolved and issue is not with the plugin but with the Webview,
Here is the reference to that issue which got resolved .
Related
I have an Ionic 3 app that runs well in Android and iOS without the --prod flag. Now I want to test the App in production mode in iOS and Android.
When I try to run it on Android everything works great! and a little bit faster and smoother. Now I try to run it on iOS which it doesn't work. It gets stuck on the first load of the App on the Splashscreen. At first I expect that there is something wrong in my plugins or versions compatibility of my plugins and to the version of the iOS device.
But I was wrong I try to run it without the --uglifyjs, --minifycss, -aot, --optimizejs and it works, the app didn't get stuck at the first booth or first load. All these flags are part of the --prod flag right? But you notice that I didn't include --minifyjs in the flag. Because when I try to run it on --minifyjs the problem occurs again when it got stucks on the first load of the app.
I have also reference to my old question: Ionic cordova run ios --prod gets stuck on splash screen loader but that wasn't the problem anymore. It only happens when I try to use the --minifyjs flag.
Here is my ionic info:
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.2.0
Cordova Platforms : ios 4.5.5
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
Node : v8.9.3
npm : 5.5.1
OS : macOS High Sierra
Xcode : Xcode 10.0 Build version 10A255
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
So what can be the problem with that? I think it is more of a compiling issue of minifying js files by angular and ionic by reducing its size. I think it affects some of the js files that caused the problem.
Appreciate if someone could help. Thanks in advance.
I have developed ionic application with following environment. Now, I need to transfer the work to my colleague but he is unable to build fully functional app which includes capabilities such as 'Associated domains', 'Background Modes' and 'Push Notifications'.
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.10
Cordova Platforms : android 7.1.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
Node : v10.8.0
npm : 6.2.0
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000
Although he is able to build and archive the project, generated ipa has no entitlements listed(all of them are ON at capability selections) and Certificate says "Unknown" at the export dialog using Organizer.
We are using the same certificates, profiles and everything but the OS.
I am using macOS High Sierra with Xcode 9.4.1 and he is using macOS mojave and Xcode 10.1.
Our Android version of app can be build and run fine.
Does anyone have similar experience and know how to resolve this issue?
Thank you in advance.
We found this thread on apple developer forum and by downgrading Xcode, the build problem was resolved.
Old version of Xcode can be downloaded here.
Whenever I am going to enter data to textarea field that time I am not able to sea header in ios.
At a time I am able to view header or footer.
Header Hidden when open the keyboard & Footer Hidden
Expected Behaviour: We need to display header and footer when I typing message
Ionic:
ionic (Ionic CLI) : 4.2.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.1.9
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : android 7.1.1, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, (and 24 other plugins)
System:
ios-deploy : 2.0.0
NodeJS : v10.1.0 (/usr/local/Cellar/node/10.1.0/bin/node)
npm : 6.4.1
OS : macOS High Sierra
Xcode : Xcode 10.0 Build version 10A255
This would be related to cordova-plugin-ionic-keyboard plugin.
https://github.com/ionic-team/cordova-plugin-ionic-keyboard/blob/master/README.md
Please check for the sections KeyboardResize and KeyboardResizeMode and use appropriate values.
When you leave the application approximately 3 or more hours in iOS in the background, it does not kill the application correctly, this causes index.html to be blank in the safari development console.
engine name="ios" spec="4.4.0"
Ionic info
ionic -version 3.20.0
ionic info
cli packages: (C:\Users\Usuario Interax\AppData\Roaming\npm\node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.6
Ionic Framework : ionic-angular 3.9.2
System:
Node : v6.11.5
npm : 5.6.0
OS : Windows 10
Misc:
backend : pro
I found this print in console:
exception nativeEvalAndFetch : ReferenceError: Can't find variable: cordova
global code about:blank 1:127
global code script element 1:1:127
The application stop in splashscreen and don't go to principal screen.
Searching more thoroughly found this:
exception nativeEvalAndFetch : ReferenceError: Can't find variable: cordova
try {
cordova.require('cordova/exec').nativeEvalAndFetch(function() {
cordova.fireDocumentEvent('active');
})
} catch (e) {
console.log('exception nativeEvalAndFetch : ' + e);
};
The bug only happens in iOS, Android works good.
Cheking this post: https://www.outsystems.com/forums/discussion/35329/post-ios-11-3-mobile-app-freeze-crash-on-resume-after-sleep-silk-ui/
I tested it in iOS version 10.3.3 and the function of the application is correct, so there is an error in the new version 11.3 and also in the 11.4.
The issue was fixed in a pullrequest in the cordova-ios repository (see https://github.com/apache/cordova-ios/pull/363/files 38). Nevertheless, there does not exist an update with this PR yet. Therefore, I decided to download the fixed file and after adding the ios platform, I replace the old CDVViewController.m on my own. For me this worked and my > 2000 user do not experience this issue anymore.
The path to the old file is platforms/ios/CordovaLib/Classes/Public/CDVViewController.m.
Remember to replace this file everytime after removing/adding the platform. I use for this (and other things) a shellscript to prepare my working directory before building.
I hope this will help you.
Gratitude Mike1707 to provide a workaround Forum response https://forum.ionicframework.com/t/problem-with-ios-in-the-background-after-time/131592/6
im having a problem since I’m trying to test my app on iOS.
The first time I install my app on an emulator/device the app works correctly. But if I close my app, and open again the app don’t work anymore and get stuck on the white screen forever.
My ionic info is:
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.14.0
ionic (Ionic CLI) : 3.14.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.0.1
Cordova Platforms : ios 4.5.2
Ionic Framework : ionic-angular 3.7.1
System:
Node : v8.7.0
npm : 5.4.2
OS : macOS Sierra
Xcode : Xcode 9.0 Build version 9A235
Misc:
backend : pro
I tried so many solutions, like remove and add de platforms, remove and add de plugin one by one. The app works on Android perfectly, but on iOS I have this problem.
Can someone help me?
We can debug ios application
ionic emulate ios -lc
Which runs app using simulator and outputs console logs and errors to terminal with live reloading.
There are three primary options.
Debug using Safari. This is good for debugging a hybrid app, but
cannot tell you output related to native plugins.
http://webdesign.tutsplus.com/articles/quick-tip-using-web-inspector-to-debug-mobile-safari--webdesign-8787
Open the project and build to device in Xcode. This shows the output of the entire device http://cordova.apache.org/docs/en/3.5.0/guide_platforms_ios_index.md.html#iOS%20Platform%20Guide
Debug with Ionic CLI. Using ionic run ios -l -c -s with the flags will use live reload and print the logs to the console. http://ionicframework.com/blog/live-reload-all-things-ionic-cli/
From: Debug Ionic app on IOS?