Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 48983 articles
Browse latest View live

Ionic 4 Mock Providers

$
0
0

@ExplosionPills wrote:

Ionic 3 exported some testing utilities from ionic-angular/util/mock-providers such as mockNavController and mockPlatform.

Ionic 4 no longer seems to export any such mocks from @ionic/angular or otherwise. Is there a preferred way to mock Ionic providers/services?

Posts: 1

Participants: 1

Read full topic


[Ionic4] Modal not showing but no error is given

$
0
0

@kneeki wrote:

I am trying to show a modal in my app which previously worked without any issues. The page I’m trying to launch it from doesn’t appear to matter because I have the same result in any page, even the ‘legal’ pages where there isn’t any code really. I’m about 100% sure I have the modal component correctly declared in app.module.ts and I’m launching it correctly in my page file(s). Anyone have any experience with this?

page1.page.ts

// ...
import { GatherInfoComponent } from 'src/app/Modals/gather-info/gather-info.component';
// ...

  async gatherInfo() {
    console.log('Open Modal...');
    const modal = await this.modal.create({
      component: GatherInfoComponent,
      componentProps: { user: this.us }
    });

    return await modal.present().catch((error) => {
      console.log(error);
    });
  }

app.module.ts

// ...
import { GatherInfoComponent } from 'src/app/Modals/gather-info/gather-info.component';
// ...

@NgModule({
  declarations: [
    // ...
    GatherInfoComponent 
  ],
  entryComponents: [
    // ...
    GatherInfoComponent 
  ],

p.s.
As a test I created a new Ionic4 project with nothing but a test modal and it worked without a problem; so I don’t think this is an Ionic issue.

Posts: 1

Participants: 1

Read full topic

iphoneX css spacing - "Unexpected character sequence" error

$
0
0

@doug1e wrote:

Hi there,

This is not an ionic question per se but I assume most ios developers dealt with the iphoneX spacing issues. I have the below code in the css file of a component.

@supports(padding: max(0px)) {
.safeAreaPaddingClass {
padding-top: max(2vw, env(safe-area-inset-top));
padding-bottom: max(2vw, env(safe-area-inset-bottom));
}
}

However, I get the following error at build:
“env(safe-area-inset-top)” is not a number for `max’

Aso, the Visual studio gives “Unexpected character sequence” error.

Has anybody dealt with a similar issue?

Thanks,

Doug

Posts: 1

Participants: 1

Read full topic

Function displaying page

$
0
0

@laurineWermann wrote:

Hello,

I am migrating a Ionic 3 application to Ionic 4. In my code, I have a service called ViewerService. It contains a function that I need everywhere in my app. It consists to checking a lot of variables to see in what way I should display an element, and looks like that :

@Injectable({
  providedIn: 'root'
})
export class ViewerService {
  constructor(..., private modalCtrl: ModalController) { }


  async openThing(pModeOpen: string = "root"): Promise<void> {
    // lots of code doing stuff
    if(pModeOpen == "root"){
        this.navCtrl.navigateForward(["", "page"])
    }else if(pModeOpen == "modal"){
      let profileModal = await this.modalCtrl.create({
        component: page,
        componentProps : { isModal: true }
      });
      profileModal.present();
    }
  }
}

It worked well in Ionic 3 but now I am struggling because I can’t import my page in this service. I learnt that it appears to be a bad design to display pages from service. But I was wondering, what should I do ? this function is very complicated (I simplified it for the example) and it is use it in several places in my code. I can’t repeat all that code everywhere and I don’t know where to place that function.

What design would be recommended for my situation ?

Posts: 1

Participants: 1

Read full topic

Button Onclick

HTML5 Video taking too long to start playback on iOS device

$
0
0

@rohitnarayan wrote:

HTML5 video is taking approximately 40 - 60 seconds to start video playback on iOS device while that same video plays instantly on Android device. I have tried HTML5 video tag as well as Ionic Native Video Streaming plugin. Issue appears with both the methods.

While it is taking time to start the playback on iOS devices, once the playback starts it works fine.

Posts: 1

Participants: 1

Read full topic

Failed to install 'cordova-plugin-googlemaps': undefined CordovaError: Promise rejected with non-error ionic3?

$
0
0

@RomnEmpire wrote:

Hi sir,
I have got below error after enter below command:
Ionic cordova add ios

ionic cordova platform  add  ios

The ERROR occurs:

> cordova platform add ios --save
Using cordova-fetch for cordova-ios@~4.5.4
Adding ios project...
iOS project created with cordova-ios@4.5.5
Installing "cordova-plugin-actionsheet" for ios
Installing "cordova-plugin-advanced-http" for ios
Plugin dependency "cordova-plugin-file@6.0.1" already fetched, using that version.
Installing "cordova-plugin-file" for ios
Installing "cordova-plugin-camera" for ios
Installing "cordova-plugin-datepicker" for ios
Installing "cordova-plugin-document-viewer" for ios
Plugin "cordova-plugin-file" already installed on ios. Making it top-level.
Installing "cordova-plugin-file-transfer" for ios
Plugin dependency "cordova-plugin-file@6.0.1" already fetched, using that version.
Dependent plugin "cordova-plugin-file" already installed on ios.
Installing "cordova-plugin-filepath" for ios
Installing "cordova-plugin-firebase" for ios
Installing "cordova-plugin-geolocation" for ios
Installing "cordova-plugin-googlemaps" for ios
Failed to install 'cordova-plugin-googlemaps': undefined
CordovaError: Promise rejected with non-error: 
    at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
[ERROR] An error occurred while running subp

I have stuck this issue last 2 day plese tell k ehow to fix this?

Posts: 1

Participants: 1

Read full topic

Ionic 4 application navigation slow on device and emulator (ios)

$
0
0

@teslim2903 wrote:

Hello, I would like to know if someone has already been confronted with this problem, I have my application that normally works on android, but on ios, navigation is very slow . i use ionic 4

Posts: 1

Participants: 1

Read full topic


Ionic4 breaking style change for ion-chip

$
0
0

@mburger81 wrote:

On Ionic3 doing we used ion-chip like this

            <ion-chip>
                <ion-icon name="arrow-back"></ion-icon>
                <ion-label {{ selectedCloudUser?.username }}</ion-label>
                <ion-label >{{ 'login.Choose Cloud User' | translate }}</ion-label>
            </ion-chip>
            <ion-chip class="margin-chip">
                <ion-icon name="key"></ion-icon>
            </ion-chip>

which looks like this
image

Using the same code with ionic4 it looks quite different
image

So mainley we are not able to set the background for the ion-icon which also is not rounded, and also there are margin problems …

There are not a lot of documentation and no breaking change documentation.

So is the behavior of a ion-chip changed? Perhaps now it is more respecting the material design style guides?

Posts: 1

Participants: 1

Read full topic

iOS app hangs on splash screen in testflight

$
0
0

@obinnae wrote:

My Ionic 3 app (servicefinderapp.com) works fine (both Android and iOS) when I run ionic cordova run iOS --prod on an iPhone, as well as running via XCode.

However, when I archive & publish it in TestFlight, then download to my iPhone from there & launch it, it hangs on the splash screen. Any idea how to troubleshoot this? I’ve tried connecting the phone to the mac, opening ‘Console’, then launching the app to see the logs. Nothing stands out.
How do I debug an app from TestFlight?

Thanks.

Posts: 1

Participants: 1

Read full topic

How to debug app that crash on android only but woth 'o error?

$
0
0

@Sulot wrote:

Hi

We have made an app which uses googe map html. Sometime the app crash with no appearant reason on androis only. Nothing in console, nothing in androis debugger… No info. It just crashes.

Any hint?

Posts: 1

Participants: 1

Read full topic

strange behavior

$
0
0

@savpve wrote:

I develop an application with ionic3, but I have reported different behaviors with samsung models. For example errors in the application, some buttons are not seen, slides disappear etc. thing that in the devices that I use Blu Life One XL with Android 5 and LG G3 with Android 6 does not happen to me.

some idea of ​​what it could be, because I can not end something if, it’s going to have that kind of problem for those devices.

Posts: 1

Participants: 1

Read full topic

Building ionic 4 project doesn't work

$
0
0

@alriabdu wrote:

Hello everyone,

I have built a project using Ionic 4. The project is meant to be for the web (so no plugins needed only ionic and angular). However, everytime I try to build the project using the command “ionic build --prod” it would run and show no errors, but at the www folder all other map and ts files still exist after running and the html page show blank. I tried building the project using cordova browser command, but the issue still exists. Any one can help please ? I don’t know what files to submit here so please let me know what you need.

Best,
AJ

Posts: 1

Participants: 1

Read full topic

Hide ionic tabs

$
0
0

@nathantaal wrote:

Hi everyone,

manucorporat states that it’s super easy to hide ion-tab-bar when we want it, but I can’t find how. Is it done with css like this
document.querySelector('ion-tab-bar').style.display = 'none';
or is there a way doing it really programatically ?

Thanks,

Nathan

Posts: 1

Participants: 1

Read full topic

4-digits message code?

$
0
0

@madebysam wrote:

Hi guys! I wonder how to get that 4-digits message code when you enter 4 digits and the focus jumps to the other inputs fields automagically?

Posts: 1

Participants: 1

Read full topic


Ionic v4 drag gesture without hammer.js?

$
0
0

@mixuala wrote:

I want to add a drag feature to resize a google-map DIV for both web/PWA and mobile.

I looked into the ondrag/start/end events and discovered mobile browsers do not offer support. I suppose I could use mousedown/up events instead, but is there platform independent support for gestures without hammer.js?

see:

Posts: 1

Participants: 1

Read full topic

How to swipe a card/div up from the bottom?

Is there possibilities to update app without app store

$
0
0

@narensrinivas wrote:

Hi,

I have created a web site, now i am convert it as app using ionic. Here my requirement if any changes done in the web site, this will automatically reflect in app or we need to update it?.
If we should update means, is there possibilities to update the app without visiting app store?

thanks,
Naren

Posts: 1

Participants: 1

Read full topic

AdMobFree doesn't display ad android

Image upload in Google Cloud Storage with REST Api

$
0
0

@anjukv wrote:

How to upload image to google cloud storage with Rest APi using OAuth ?
i have tried to fetching the access token uisng postman but its not working fine. Can any one suggest a better way.

Posts: 1

Participants: 1

Read full topic

Viewing all 48983 articles
Browse latest View live


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