Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 71528 articles
Browse latest View live

(ionCancel) is calling (ionSearch) Ionic 3 ion-searchbar

$
0
0

@theHamster wrote:

Hi,

I’ve got a searchbar in my Ionic 3 project:

<ion-searchbar animated="true" showCancelButton="true" (ionInput)="onSearch($event)" (ionCancel)="onSearchCancel($event)"></ion-searchbar>

The problem is, when I click the cancel button, my onSearch() method is being called. Any idea why?

It’s a problem because I’m using an *ngIF structural directive to display the results. onSearch() sets a variable to true (showing the result template), and onSearchCancel sets the variable false again to hide the results. This works, but for some reason, onSearch() is called by (ionCancel) so the final result is that the variable ends up set true.

Any help appreciated!

Thanks

Posts: 1

Participants: 1

Read full topic


Form submitting when iOS keyboard 'return' is pressed even the submit button is disabled

$
0
0

@StephSince93 wrote:

I have a form that has certain fields that need to be filled out before the submit button shows as enabled, but I just found a bug that allows the user to type only one field and press return on the iOS keyboard and the submit button is triggered. I’m not sure if I need to add a specific field, but this causes issues for the form because I can’t have inconsistent data. Please Help!

Posts: 1

Participants: 1

Read full topic

Ion-segment converts boolean to string ionic-v4

$
0
0

@bacoords wrote:

I’m using ion-segment with ngModel. The variable is cast as a boolean, but ion-segment keeps getting away with converting it to a string. Here’s my example code:

            <ion-segment [(ngModel)]="symptom.symptomValue" color="primary">
                <ion-segment-button [value]="true">
                  <ion-label>Yes</ion-label>
                </ion-segment-button>
                <ion-segment-button [value]="false">
                  <ion-label>No</ion-label>
                </ion-segment-button>
              </ion-segment>

This is something that was working fine in Ionic 3 but is failing as I’m migrating to Ionic 4.

Posts: 1

Participants: 1

Read full topic

wkWebview is not defined error in Android

$
0
0

@NaveedShaikh12 wrote:

Hello Everyone,
I have come across a strange issue, something that was working earlier but throwing error all of sudden. Apparently because of the versioning issues. Attached is the screenshot of the error I get on my splash screen due to which other web related files aren’t working. Please note, I am able to login but app crashes on screens having inAppBrowser implemented.

Posts: 1

Participants: 1

Read full topic

Angular Routes: Redirect to blank page when fake url entered

$
0
0

@UrbanCondor wrote:

I’m trying to develop a PWA and I’ve run into a potential problem with my angular route redirect. I’m not using tabs, and my app-routing.module.ts Routes look like this:

const routes: Routes = [
  { path: 'home', loadChildren: './pages/home/home.module#HomePageModule' },
  { path: 'login', loadChildren: './pages/login/login.module#LoginPageModule' },
  { path: 'signup', loadChildren: './pages/signup/signup.module#SignupPageModule' },
  { path: '', redirectTo: 'home', pathMatch: 'full' }
];

The way I want the redirect to work is so that if I type any fake/bogus information into the URL path then the system would redirect the path to home (and therefore load the home page content). For example, if I am currently on the http://localhost:8100/login page and then I manually edit the URL to read http://localhost:8100/fakenews, I would expect the angular router to recognise that this is not a valid route and re-direct me to http://localhost:8100, which would subsequently re-direct me to http://localhost:8100/home and display the home page to me.

The BAD news: When I enter http://localhost:8100/fakenews, I am re-directed to http://localhost:8100 however I am not subsequently redirected to http://localhost:8100/home. All I get presented with is a blank page and the following error in the console:

ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'fakenews'

If I then hit refresh (F5) on this page then it does re-direct me to http://localhost:8100/home!!!

Is there any way I can handle this scenario in my routes to make sure that I am always re-directed to http://localhost:8100/home and never to http://localhost:8100 (the blank page)?

Posts: 1

Participants: 1

Read full topic

Chat App - XMPP vs Cloud

$
0
0

@Spyt wrote:

Hi Guys,

what will be the easiest best to create a chat app and maintain it?

XMPP server? Firebase?

Is there any documentation and/or full apps that’s available to perform additional dev on?

Posts: 1

Participants: 1

Read full topic

Debug ionic 4 and react app from android emulator

$
0
0

@puneetjindal11 wrote:

i created a new ionic 4 react app and added capacitor to this.

after this i compiled the react app in build folder

now created android platform using capacitor and i was able to run the react app in android.

Also by going to chrome remote devices i was able to connect with the emulator.

Now my problem is there i can see only compiled js files, and i want to see and debug this like a react code. how can i get the source map there

please help.

Posts: 1

Participants: 1

Read full topic

Keyboard and input messes up after rotation on iOS

$
0
0

@RodrigoMoretto wrote:

I’ve got a problem with the inputs and keyboard only on iOS real device and simulator. You can create a simple project with just an input, but to really visualize the problem you need to make the input not reach the top of the screen, so you might wanna add ion-item’s or div’s to make the input appear on the middle of the screen.

If you rotate the device, rotate back and touch on the input the keyboard will be shown, but a white square will appear above the keyboard, pushing the input even higher than intended, sometimes reaching the top of the screen. Nothing can make it get back to normal except of restarting the app, but it will happen again as soon as the screen rotates, this is valid for the screen orientation plugin too.

This is how its behaving: *Note: the white strip is the input
Here the input is working because the screen wasn’t rotated yet:

Here is after the rotation and when you touch the input:


You can see the input has been pushed upwards and even creating a white rectangle above the keyboard.

And after another rotation:


The input has been pushed even further and the rectangle is way more visible.

Apparently this began happening on some of the latest iOS updates. Everything is working fine on ionic 4, but I am working on a legacy software (that i’m already migrating to ionic 4) that still needs support.

Here is a Plunker with the basic code on tab-dash.html

This has been happening in the few latest iOS releases.

Any help is really appreciated.

Posts: 1

Participants: 1

Read full topic


Plugin: Microsoft App Center Data

$
0
0

@ddowns wrote:

Does anyone have any workarounds for using Microsoft App Center Data with Ionic? My team is new to mobile development in general, but experienced with web development (hence choosing Ionic). I see Microsoft doesn’t currently support Cordova/Capacitor with an official SDK, and there’s no official community plugins for it. My team is using CosmosDB to store data in our app, and we were looking for a solution like this that integrates well with Microsoft’s Azure platform. If anyone has any experience with this solution or suggestions, please let me know :slight_smile:

Posts: 1

Participants: 1

Read full topic

serviceWorker is missing from Ionic 4 React

$
0
0

@MosesOng wrote:

I used Ionic CLI to create a React Ionic 4 project, but serviceWorker doesn’t exist, this will fail:

import registerServiceWorker from './registerServiceWorker';

Does anyone have an answer/solution to this?

Posts: 1

Participants: 1

Read full topic

Firebase Notifications Android

$
0
0

@prichards wrote:

Has anyone been able to get Firebase notifications to work on android i Ionic 4? How? I’ve tried using 4 different plugins (FCM, Firebase, Firebase Messaging, and Push) now and been unable to build on any of them for android. Have tried searching for solutions to all of them, but none of the results i find have actual fixes. Any help with a working tutorial or anything would be great!

Posts: 1

Participants: 1

Read full topic

Problems with Ionic 4 to run application - white screen

$
0
0

@tavo962 wrote:

I have a problem with Android 6 when running an application on Ionic shows a blank screen only.

My application uses multiple plugins but try a new one with the following command and the same thing happens.

ionic start myApp blank

My config in Ionic is:

Ionic:

   Ionic CLI                     : 5.2.3 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.7.1
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0, ios 5.0.1
   Cordova Plugins   : no whitelisted plugins (1 plugins total)

Utility:

   cordova-res : not installed
   native-run  : 0.2.7 (update available: 0.2.8)

System:

   Android SDK Tools : 26.1.1 (/Users/tavo962/Library/Android/sdk/)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.1
   NodeJS            : v10.15.3 (/usr/local/bin/node)
   npm               : 6.4.1
   OS                : macOS Mojave
   Xcode             : Xcode 10.3 Build version 10G8

The error that show in console when to debugging in device is:

Posts: 1

Participants: 1

Read full topic

AdMob o Banner não aparece quando coloca o Id

Google play upload error please help

$
0
0

@patostar wrote:

I tried to update my app like 30 minutes ago, I only have admob ads in it, no other ad networks, but it showed me this error message:

“Your app serves ads from networks which do not belong to Play’s certified list, but has the Target Audience and Content set with under 13 audiences”.

Anybody know how to fix it? My app’s age is set to all ages.

Posts: 1

Participants: 1

Read full topic

Is there a page generator for ionic stenciljs


Problem rendering ionic v3 iOS

How to Preload Specific Ionic Components in v4

$
0
0

@zbarb wrote:

We have an Ionic 4 app which is also being deployed as a web app. It’s nice that Ionic 4 lazy loads all of its components - it greatly reduces the bundle size. However we’re running into issues when it comes to user interactions that trigger lazy loaded components.

As an example, we have a button which triggers a Popover. When deployed as a website, there is a noticeable delay between tapping the button and the popover being displayed (as both the Ionic popover components and the component being rendered in the popover are lazy-loaded).

Once it has loaded once everything is fine but we are finding that the more impatient users are tapping the button several times because it looks broken and then several popovers all appear at once on top of each other.

We have tried using both service workers (via ng add @angular/pwa) and PreloadAll route preload strategy but neither seems to help with the above case. Is there a way - either via Ionic or Stencil - to mark certain components (like Popovers or Radio buttons, for example) as more important so that they can be eager loaded when the application first runs?

Posts: 1

Participants: 1

Read full topic

Ionic cordova run android --verbose

$
0
0

@ramanasha wrote:

ramana_sharma@ramana:~/Desktop/todo$ ionic cordova run android --verbose
ionic:lib Terminal info: { ci: false, shell: ‘/bin/bash’, tty: true, windows: false } +0ms
ionic:lib CLI global options: { _: [ ‘cordova’, ‘run’, ‘android’ ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, project: null, ‘–’: } +3ms
ionic:lib:project Project type from config: Ionic 1 (ionic1) +0ms
ionic:lib:project Project details: { configPath: ‘/home/ramana_sharma/Desktop/todo/ionic.config.json’, errors: , context: ‘app’, type: ‘ionic1’ } +0ms
ionic Context: { binPath: ‘/usr/lib/node_modules/ionic/bin/ionic’, libPath: ‘/usr/lib/node_modules/ionic’, execPath: ‘/home/ramana_sharma/Desktop/todo’, version: ‘5.2.3’ } +0ms
ionic:lib:integrations:cordova:config Loading Cordova Config (config.xml: ‘/home/ramana_sharma/Desktop/todo/config.xml’, package.json: ‘/home/ramana_sharma/Desktop/todo/package.json’) +0ms
ionic:commands:run Native platform devices: +0ms
ionic:lib:integrations:cordova:config Loading Cordova Config (config.xml: ‘/home/ramana_sharma/Desktop/todo/config.xml’, package.json: ‘/home/ramana_sharma/Desktop/todo/package.json’) +156ms
ionic:lib:telemetry Sending telemetry for command: ‘ionic cordova run’ [ ‘android’, ‘–verbose’, ‘–interactive’, ‘–color’ ] +0ms
ionic:lib:build build options: { ‘–’: ,
ionic:lib:build engine: ‘cordova’,
ionic:lib:build platform: ‘android’,
ionic:lib:build project: undefined,
ionic:lib:build verbose: false,
ionic:lib:build type: ‘ionic1’ } +0ms
ionic:lib:hooks Looking for ionic:build:before npm script. +0ms
ionic:lib:build Looking for ionic:build npm script. +2ms

ionic-v1 build
ionic:v1-toolkit:lib:gulp Using gulpfile: /home/ramana_sharma/Desktop/todo/gulpfile.js +0ms
ionic:v1-toolkit:lib:gulp Using gulp: /home/ramana_sharma/Desktop/todo/node_modules/gulp/index.js +2ms
ionic:v1-toolkit:lib:gulp Loaded gulp tasks: { default: { fn: [Function], dep: [ ‘sass’ ], name: ‘default’ }, sass: { fn: [Function], dep: , name: ‘sass’ }, watch: { fn: [Function], dep: [ ‘sass’ ], name: ‘watch’ } } +249ms
[09:47:14] Invoking sass gulp task.
ionic:lib:hooks Looking for ionic:build:after npm script. +2s
cordova build android --verbose
No scripts found for hook “before_build”.
No scripts found for hook “before_prepare”.
Checking config.xml and package.json for saved platforms that haven’t been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform android
Checking for saved plugins that haven’t been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing…
Generating platform-specific config.xml from defaults for android at /home/ramana_sharma/Desktop/todo/platforms/android/app/src/main/res/xml/config.xml
Merging project’s config.xml into platform-specific android config.xml
[Gradle Properties] Preparing Configuration
[Gradle Properties] Appending default configuration properties
[Gradle Properties] Appending custom configuration properties
[Gradle Properties] Updating and Saving File
Merging and updating files from [www, platforms/android/platform_www] to platforms/android/app/src/main/assets/www
copy www/css/ionic.app.css platforms/android/app/src/main/assets/www/css/ionic.app.css (updated file)
copy www/css/ionic.app.min.css platforms/android/app/src/main/assets/www/css/ionic.app.min.css (updated file)
Wrote out android application name “MyApp” to /home/ramana_sharma/Desktop/todo/platforms/android/app/src/main/res/values/strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (0.0.1): 1
Wrote out Android package name “io.ionic.starter” to /home/ramana_sharma/Desktop/todo/platforms/android/app/src/main/java/io/ionic/starter/MainActivity.java
Updating icons at platforms/android/app/src/main/res
Updating splash screens at platforms/android/app/src/main/res
Updating resource files at platforms/android
Prepared android project successfully
Executing script found in hooks directory for hook “after_prepare”: hooks/after_prepare/010_add_platform_class.js
Running command: /home/ramana_sharma/Desktop/todo/hooks/after_prepare/010_add_platform_class.js /home/ramana_sharma/Desktop/todo
Command finished with error code 0: /home/ramana_sharma/Desktop/todo/hooks/after_prepare/010_add_platform_class.js /home/ramana_sharma/Desktop/todo
No scripts found for hook “before_compile”.
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/home/ramana_sharma/Android/Sdk/tools (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
Running command: /home/ramana_sharma/Desktop/todo/platforms/android/gradlew cdvBuildDebug -b /home/ramana_sharma/Desktop/todo/platforms/android/build.gradle

Configure project :app
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

  • Where:
    Script ‘/home/ramana_sharma/Desktop/todo/platforms/android/CordovaLib/cordova.gradle’ line: 68

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

No installed build tools found. Install the Android build tools version 19.1.0 or higher.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 0s
Command finished with error code 1: /home/ramana_sharma/Desktop/todo/platforms/android/gradlew cdvBuildDebug,-b,/home/ramana_sharma/Desktop/todo/platforms/android/build.gradle
/home/ramana_sharma/Desktop/todo/platforms/android/gradlew: Command failed with exit code 1 Error output:
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

  • Where:
    Script ‘/home/ramana_sharma/Desktop/todo/platforms/android/CordovaLib/cordova.gradle’ line: 68

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

No installed build tools found. Install the Android build tools version 19.1.0 or higher.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 0s
Error: /home/ramana_sharma/Desktop/todo/platforms/android/gradlew: Command failed with exit code 1 Error output:
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

  • Where:
    Script ‘/home/ramana_sharma/Desktop/todo/platforms/android/CordovaLib/cordova.gradle’ line: 68

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

No installed build tools found. Install the Android build tools version 19.1.0 or higher.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 0s
at ChildProcess.whenDone (/home/ramana_sharma/Desktop/todo/node_modules/cordova-common/src/superspawn.js:135:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:915:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
[ERROR] An error occurred while running subprocess cordova.

    cordova build android --verbose exited with exit code 1.
    
    Re-running this command with the --verbose flag may provide more information.

ionic:utils-process onBeforeExit handler: ‘process.exit’ received +0ms
ionic:utils-process onBeforeExit handler: running 2 functions +0ms
ionic:utils-process processExit: exiting (exit code: 1) +17ms

am getting this error when hit enter ionic cordova run andoid

Posts: 1

Participants: 1

Read full topic

IONIC AppFlow

$
0
0

@bigzane wrote:

When i run the below command i am getting “Unable to find command: deploy add” error in terminal.

Command : ionic deploy add --app-id=“51c98ce5” --channel-name=“Production” --update-method=“background”

Anyone can help me setup my app to deploy using IONIC Appflow? I have already connected my GitHub repository to app flow

Posts: 1

Participants: 1

Read full topic

Gallery(Show only Pdf file)

$
0
0

@sekhar97 wrote:

how can i show only pdf file in gallery using input type file or Camer Plugin(for ios and android)

Posts: 1

Participants: 1

Read full topic

Viewing all 71528 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>