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

Use browser to debug mobile formatting

$
0
0

@lhk wrote:

Currently, when I want to see how my app looks on a mobile device, I use the android emulator. This works fine as long as I’m just changing the design. Debugging is possible, but so much more comfortable in the browser.

So I wonder: Wouldn’t it be possible to restrict the browser viewport to make it look like a mobile screen?
Can I somehow set up that the browser shows the exact same app layout that would be shown on an android phone?

This would definitely speed up my development workflow.

Posts: 1

Participants: 1

Read full topic


What about ion-page (or IonPage)?

$
0
0

@lhk wrote:

I was looking at the sample code for ion-menu (here) and found the following code sample, which looks strange to me:

...
<div class="ion-page" id="main-content">
  <ion-header>
    <ion-toolbar>
    ...

Basically all the elements here have ion-abc tags. But for ion-page it’s a div with a class attribute.
In my code IonPage can be imported and used without problems (react codebase).

I couldn’t find it in the docs.
But there is a similarly named IonicPage in the old v3 docs. Is this somehow related?

So, what is ion-page and how is it used correctly?

Posts: 1

Participants: 1

Read full topic

Error: automatic_code_signing?

$
0
0

@Andybon wrote:

Suddenly I can’t build the app in Appflow.

Receives the following error message:

13: automatic_code_signing
[11:05:03 PM]: fastlane finished with errors
[!] Path is invalid
ERROR: Job failed: Process exited with: 1. Reason was: ()

Have searched everywhere, can’t find an answer to what this means and no explanation how to solve this.

The link on the Ionic Support page to the slack chat provides the message: Application error.

Someone who can help me and explain why I get the following error message and how to fix it?

Posts: 1

Participants: 1

Read full topic

Issue playing embedded video in an iOS application

$
0
0

@JBalslev wrote:

Greetings, i have a problem with embedded youTube videos. It worked fine sometime ago, and works fine on Android. But i started getting user feedback, telling me something was wrong, so i did some tests…

When a video is muted the video plays fine, but if it is not muted, it will stop, and throw an error. So if i add &mute=1 to my embeded youTube url, the video plays. But when mute=1 is not added, it breaks instantly.

I have tested on 2 iPhones and 1 iPad Pro, same issue on all 3 devices, currently running softwareversion 13.3.

This is the error that is thrown and shown in Xcode:

 [assertion] Error acquiring assertion: <NSError: 0x28349c330; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x103e67080; requestedReason: MediaPlayback; reason: MediaPlayback; flags: PreventTaskSuspend | PreventTaskThrottleDown | WantsForegroundResourcePriority>;
    }
}
[ProcessSuspension] 0x1149d0f28 - ProcessAssertion() PID 1358 Unable to acquire assertion for process with PID 1358
[ProcessSuspension] 0x1149d0f28 - ProcessAssertion::processAssertionWasInvalidated()

[assertion] Error acquiring assertion: <NSError: 0x2834aac40; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x105a2fbc0; requestedReason: MediaPlayback; reason: MediaPlayback; flags: PreventTaskSuspend | PreventTaskThrottleDown | WantsForegroundResourcePriority>;
    }
}

[ProcessSuspension] 0x1149d0f78 - ProcessAssertion() PID 1358 Unable to acquire assertion for process with PID 1359
[ProcessSuspension] 0x1149d0f78 - ProcessAssertion::processAssertionWasInvalidated()

I have tried enablind/disabling all sorts of permissions. I tried looking through CDVWKWebViewEngine.m since i suspect there are some errors there. But in the end, it might be some simple permission i need to enable… or even some iOS related setting the user needs to enable/disable.

I really hope someone else have a solution to this problem, since it frustrates me a great deal. If not a solution, at least some ideas… thanks!

Posts: 1

Participants: 1

Read full topic

Help getting an old Ionic 1 app up and running

$
0
0

@Martin_Andersen wrote:

I have started to work on an old codebase using Ionic 1.x. What should I install to get it running?
node, cordova, ionic versions?

right now I am using node 8 LTS and Ionic 1.7.16 with Cordova 8. When I run ionic serve I get this error:

Posts: 1

Participants: 1

Read full topic

Firebase Dynamic Links not recognized in IOS

$
0
0

@MozzarillaSticks wrote:

Hello,

We are using the Firebase dynamic links plugin to handle links created by a backend server using Firebase REST API.

The plugin works without any issues on Android. But in IOS, when someone clicks the link the app opens but the onDynamicLink() is never called.

We are calling onDynamicLink() in the initializeApp() inside platform ready callback and added GoogleAndroidClientId and GoogleIOSClientId to the platform preferences as mentioned in the documentations. We also have both google-services.json and GoogleService-Info.plist in the project root folder.

We are using a custom domain with the dynamic links and configured it in Firebase console and in XCode we added FirebaseDynamicLinksCustomDomains as mentioned here.

We get couple of errors in XCode console:

[Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure]; ( FirebaseApp.configure() in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8

and (API Keys removed)

2020-03-12 22:15:10.220893+0300 Doorek[32896:4363162] Starting Firebase DynamicLinks plugin 2020-03-12 22:15:10.485683+0300 Doorek[32896:4363376] Task <C948DCF9-2A18-40F9-8A24-FDF61460D9C3>.<2> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x28255f5d0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=, NSErrorFailingURLKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.}

cordova plugin list:

cordova-plugin-androidx 1.0.2 “cordova-plugin-androidx”
cordova-plugin-androidx-adapter 1.1.0 “cordova-plugin-androidx-adapter”
cordova-plugin-device 2.0.3 “Device”
cordova-plugin-firebase-dynamiclinks 4.0.3 “FirebaseDynamicLinksPlugin”
cordova-plugin-ionic-keyboard 2.2.0 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 4.1.3 “cordova-plugin-ionic-webview”
cordova-plugin-splashscreen 5.0.3 “Splashscreen”
cordova-plugin-statusbar 2.4.3 “StatusBar”
cordova-plugin-whitelist 1.3.4 “Whitelist”
cordova-plugin-x-socialsharing 5.6.4 “SocialSharing”
cordova-sqlite-storage 4.0.0 “Cordova sqlite storage plugin - cordova-sqlite-storage plugin version”
cordova-support-android-plugin 1.0.1 “cordova-support-android-plugin”
cordova-support-google-services 1.3.2 “cordova-support-google-services”
es6-promise-plugin 4.2.2 “Promise”

Cordova-ios version 5.1.0

Ionic 5 & Angular 9.

I’ve gone through our configurations in Firebase and our implementation tens of times and I honestly don’t know what is wrong. It just does not work in IOS.

Appreciate any help.

Thanks

Posts: 1

Participants: 1

Read full topic

Ionic 4 - submit form with android keyboard "enter/go"

$
0
0

@jordanblaketold wrote:

Anyone knows how to make works, submit a reactive form in android with enter/go key,i need to implement it on my login page but i tried (keypress.enter) and (ngSubmit) but dont work, this is my form:

 <form [formGroup]="loginForm" class="ion-margin-top" (ngSubmit)="loginWithUser()">
                    <ion-row >
                        <ion-col size="12">
                                <ion-item lines="none">
                                    <ion-label position="floating">Email</ion-label>
                                    <ion-input formControlName="email" type="email"></ion-input>
                                </ion-item>
                        </ion-col>
                        <ion-col size="12">
                                <ion-item lines="none">
                                    <ion-label position="floating">Password</ion-label>
                                    <ion-input formControlName="password" type="password"></ion-input>
                                </ion-item>
                        </ion-col>
                    </ion-row>
                    <ion-row>
                        <ion-col>
                            <ion-button (click)="loginWithUser()">
                                Login
                            </ion-button><br>
                        </ion-col>
                    </ion-row>
                </form>

ts

loginWithUser() {
console.log(this.loginForm.value)
}

any help is welcome

Posts: 1

Participants: 1

Read full topic

Electron target: empty page

$
0
0

@mandolyte wrote:

I have tried to use capacitor to generate electron apps from both an exist React Web app and using the “tabs” Ionic app. In both cases I only get an empty page with the console message attached. Here are the commands I used for the Ionic tabs app. What am I missing?

from https://capacitor.ionicframework.com/docs/getting-started/with-ionic:
- created app with `ionic start myApp tabs --capacitor`
- verified working with `ionic serve`
- did a build with `ionic build`
- initialized capacitor with `npx cap init myApp org.unfoldingword.myApp`
  - used npm client
- changed webDir value in capacitor.config.json to `build`
- added "electron" as a target platform with `npx cap add electron`
- started electron client with `npx cap open electron`

Ionic Electron

Posts: 1

Participants: 1

Read full topic


How do you do Build on a Windows machine and Mac?

$
0
0

@kim_ras wrote:

Hi,
I am rebuilding an old Cordova app where i used Phonegap-Build to build a iOS app.
I am hoping I can get everything working as PWA but if I need a iOS app I will need to setup some sort of DevOp environment to build on both Windows and Mac. I use github as repository, but would like a automated rebuild on the Mac when ever I publish on the Windows machine.

How do you do this in your projects. ?

Posts: 1

Participants: 1

Read full topic

Ionic 4: Custom Camera View

$
0
0

@MaheshKarumuri wrote:

Hi there!

I’ve been working on an ionic 4 application with angular framework. In my application, I want to develop a custom camera screen.

I’ve gone through the following plugins:
https://ionicframework.com/docs/native/camera ,
https://ionicframework.com/docs/native/camera-preview ,
https://ionicframework.com/docs/native/media-capture

But unfortunately I’m not able to make it out. Can you please help me out.
Any suggestions are welcome.

Thanks,
Mahesh

Posts: 1

Participants: 1

Read full topic

Where to place an IonMenu (in the code)

$
0
0

@lhk wrote:

short version:
I would like to have the same IonMenu in all my IonPages. Is there a way to move the menu above the pages, maybe next to the routing?

How do I set this up properly?

Detailed version:

My app has an IonMenu that is used to navigate between routes. It has a list of entries, each of them an IonItem that links to a route like ‘/home’, ‘/config’, etc.

Here’s a mock up of the current state

<router>
  <route path="/home">
    <lots of layout code for the menu>
    <page>
  </route>
  <route path="/about">
    <same menu code again>
    <another page>
  </route>
  ...
</router>

So this is horrible code duplication, the same code for the menu is duplicated on each page.

As far as I can see, there would be two solutions:

  • make a custom component for the menu. Then it’s only a single tag (and I would have to pass in the content-id via props)
  • move the menu up, above the router

I would prefer the second solution. Because the menu really is the same everywhere, it doesn’t depend on the routes. So I think it should be specified outside of the routing, as a sibling to the router. That would mirror the structure of the UI.

As far as I understand, there are the following requirements:

  • The IonMenu needs to be given a contentId. I think this should be IonRouterOutlet. The contentId specifies an element on which to listen for swipe actions. And I want that element to be the output of the routing.
  • There needs to be a toolbar with the IonMenuButton. I think this should go into an IonHeader. Intuitively I would place this header next to the IonMenu, as another sibling to the router. But the documentation says that: It’s important to note that ion-header needs to be the one of the three root elements of a page. And I’ve got the impression that they mean an actual literal IonPage here.
  • Every Route must be an IonPage and IonPages must not be nested inside of each other.

I tried placing the IonHeader next to the routing, but then the pages and the header overlap each other. This doesn’t seem to work. So I moved the header inside of the IonPage and came up with the following code (simplified to provide a minimal example):

App.tsx:

 <IonApp>
    <IonMenu side="start" contentId="main-content">
      <IonList>
        <IonItem routerLink="/home">
          <IonLabel>home</IonLabel>
        </IonItem>
        <IonItem routerLink="/config">
          <IonLabel>config</IonLabel>
        </IonItem>
      </IonList>
    </IonMenu>

      <IonReactRouter>
        <IonRouterOutlet id='main-content'>
          <Route path="/home" component={Home} exact={true} />
          <Route path="/config" component={Config} exact={true} />
          <Route exact path="/" render={() => <Redirect to="/home" />} />
        </IonRouterOutlet>
      </IonReactRouter>
  </IonApp>

Home.tsx:

    <IonPage>
      <IonHeader>
        <IonToolbar>
          <IonButtons slot="start">
            <IonMenuButton></IonMenuButton>
          </IonButtons>
          <IonTitle>Routing Menu</IonTitle>
        </IonToolbar>
      </IonHeader>
      <IonContent>
        <IonButton routerLink="/config">To the config!</IonButton>
      </IonContent>
    </IonPage>

Config.tsx (this one without the menubar)

      <IonPage>
        <IonContent>
          <IonButton routerLink='/home'>To the home!</IonButton>
        </IonContent>
      </IonPage>

This code doesn’t work. If I transition between routes with the buttons, they are changed properly, with a small animation. But if the menu is used for navigation, the page flickers and seems to re-render completely. There is no transition animation between the pages.

What is the correct way to do this?

Posts: 2

Participants: 1

Read full topic

How to dismiss LoadingController through code in Ionic 5 app?

$
0
0

@Sweg wrote:

In my Ionic 5 app, I am displaying a LoadingController like so:

async presentLoading() {
    const loading = await this.loadingCtrl.create({
      message: 'Please wait...',
    });
    await loading.present();
  }

getPosts() {
    this.presentLoading();

query.get()
      .then((docs) => {
        docs.forEach((doc) => {
          this.posts.push(doc);
        })
        this.cursor = this.posts[this.posts.length - 1];
      }).catch((err) => {
        console.log(err)
      })
}

Once this.posts is populated, I want the LoadingController to be dismissed.

Can someone please tell me how to do this? Thanks a lot in advance!

Posts: 1

Participants: 1

Read full topic

5-star ranking as in tutorial not working in app

$
0
0

@PameNietop wrote:

Hello all,

I’m pretty new to Ionic, started building an App a while ago. I wanted to include a 5-star rating component so I used the method explained here:

I followed all the instructions, the problem is I get an error when I call the ranking component in the html and I cant find why:

<app-rating [(rating)]='rating'></app-rating>

That’s what I have in the html, and the error reads “Identifier ‘rating’ is not defined. The component declaration, template variable declarations, and element references do not contain such a member”

This is the beginning of my .ts file:

import { Component, Input, EventEmitter ,Output} from "@angular/core";

@Component({
  selector: 'app-rating',
  templateUrl: './rating.component.html',
  styleUrls: ['./rating.component.scss'],
})


export class RatingComponent {
  @Input() rating: number ;

  @Output() ratingChange: EventEmitter<number> = new EventEmitter();;

  constructor() {}

Any help is really appreciated, as I’m just learning Angular/ionic, I don’t have all the knowledge to be able to find a solution on my own. I tried with no luck. Please help!

Thanks

Posts: 1

Participants: 1

Read full topic

Navigating nested routes

$
0
0

@ehboym wrote:

Hi

I have a tab application with a toolbar at the bottom and a list inside a tab:
App

Navigation is controlled by a router you can see the routes below.

app-routing.module -> loads -> tabs-routing.module -> loads -> protocols-routing.module -> loads -> p-gisha-clalit-routing.module && p-dom-lev-mevigarim-routing.module

Selecting a list item should load a page in the tab area.

while the tab buttons works perfectly, when I click the list items I do not get any response. If I click the second list item which points to routerLink="/tabs/medsequipment" the app loads the correct page. But, when I click the top list item which has routerLink=“p-gisha-clalit” the app does nothing. It mite be loading some default page but the visual effect is a click animation with no reaction.

I suppose the route is broken in some place but I cant find the problem in that route.

Ill appreciate any incites.

Thanks

Erez

---------------- app code below ------

App routing:

tabs-routing.module:

const routes: Routes = [
  {
    path: 'tabs',
    component: TabsPage,
    children: [
      {
        path: 'protocols',
        loadChildren: '../protocols/protocols.module#ProtocolsPageModule'
      },
      {
        path: 'medsequipment',
        loadChildren: '../medsequipment/medsequipment.module#MedsequipmentPageModule'
      },
      {
        path: 'gentables',
        loadChildren: '../gentables/gentables.module#GentablesPageModule'
      },
      {
        path: 'directive',
        loadChildren: '../directive/directive.module#DirectivePageModule'
      }
    ]
  },
  {
    path: '',
    redirectTo: 'tabs/protocols'
  }
];

protocols-routing.module:

const routes: Routes = [
  {
    path: '',
    component: ProtocolsPage,
    children: [
      {
        path: 'p-gisha-clalit',
        loadChildren: '../protocolsPages/p-gisha-clalit/p-gisha-clalit.module#PGishaClalitPageModule'
      },
      {
        path: 'p-dom-lev-mevigarim',
        loadChildren: '../protocolsPages/p-dom-lev-mevigarim/p-dom-lev-mevigarim.module#PDomLevMevigarimPageModule'
      }
    ]
  },
  {
    path: '',
    redirectTo: 'tabs/protocols'
  }
];

p-gisha-clalit-routing.module && p-dom-lev-mevigarim-routing.module
are very similar. p-gisha-clalit-routing.module is:

const routes: Routes = [
  {
    path: '',
    component: PGishaClalitPage
  }
];

The list in protocols is:

<ion-content>
  <ion-list>
    <ion-item class="HEBListItem" detail ="false" routerLink="p-gisha-clalit">
      <ion-label>גישה כללית למטופל</ion-label>
      <ion-icon name="caret-back-outline" item-right></ion-icon>
    </ion-item>
    <ion-item class="HEBListItem" detail ="false" routerLink="/tabs/medsequipment">
      <ion-label>דום לב במבוגר</ion-label>
      <ion-icon name="caret-back-outline" item-right></ion-icon>
    </ion-item>
  </ion-list>
</ion-content>

Posts: 1

Participants: 1

Read full topic

Ionic Version 3 Gestures

$
0
0

@Kil1oGram wrote:

Hey Geeks

I was watching a video on youtube on how to use gestures. link https://youtu.be/AW80XVSOLZg

I have fully developed an app on ionic 3 and want to implement this functionality. This simple and its not that complex. I have tried to implement this using tabs(slide up on another tab) but its not working proper because it gets to using multiple tabs. If gestures on ionic 3 are not really implementable please can i get an update as soon as possible so that i can find another alternative.

Posts: 1

Participants: 1

Read full topic


How to access the alpha of an --ion-color

$
0
0

@sakotturi wrote:

I noticed this syntax being used by ion-chip:

:host(.ion-activated) {
    --background: rgba(var(--ion-text-color-rgb,0,0,0),0.2);
}

It looks like a way of getting the 0.2 opacity of a color set by a css variable. so I thought I would try it:

 border: 1px solid rgba(var(--ion-color-success), 0.5);

but this doesn’t work. also tried:

 --border: 1px solid rgba(var(--ion-color-success), 0.5);

I find the ion-success color to be too strong and would love to be able to get the 50% version of it.
I’m open to any ideas, not necessary nesting a variable from inside a rgba()…

Posts: 1

Participants: 1

Read full topic

Photo-library cordova ios plugin syntax err issue

$
0
0

@peterkhang wrote:

All tough Ionic team don’t maintain cordova plugins because that is just open module,
I am just notifying this issue.


match.rangeAt(a0) -> should be changed to match.range(at:0)

final class PhotoLibraryService {
::::

fileprivate func getDataFromURL(_ url: String) throws -> Data {
if url.hasPrefix(“data:”) {

        guard let match = self.dataURLPattern.firstMatch(in: url, options: NSRegularExpression.MatchingOptions(rawValue: 0), range: NSMakeRange(0, url.characters.count)) else { // TODO: firstMatchInString seems to be slow for unknown reason
            throw PhotoLibraryError.error(description: "The dataURL could not be parsed")
        }

        // **this is error line** [
        let dataPos = match.rangeAt(0).length
        // **this is error line** ]

        let base64 = (url as NSString).substring(from: dataPos)
        guard let decoded = Data(base64Encoded: base64, options: NSData.Base64DecodingOptions(rawValue: 0)) else {
            throw PhotoLibraryError.error(description: "The dataURL could not be decoded")
        }

        return decoded

    } else {

        guard let nsURL = URL(string: url) else {
            throw PhotoLibraryError.error(description: "The url could not be decoded: \(url)")
        }
        guard let fileContent = try? Data(contentsOf: nsURL) else {
            throw PhotoLibraryError.error(description: "The url could not be read: \(url)")
        }

        return fileContent

    }
}

Posts: 1

Participants: 1

Read full topic

How to prevent ion-item from "item-interactive-disabled" when its child is disabled?

$
0
0

@tomjaihk wrote:

Suppose I have code:

<ion-item>
     <ion-input formControlName="someCtrl" [disabled]="lockControl"></ion-input>
     <ion-icon name="{{lockControl? 'unlock' : 'lock'}}" (click)="handler()"></ion-icon>
</ion-item>

When I click the ion-icon, the ion-input can be disabled as I expect. But unfortunately, the click event of ion-icon is also disabled as well, which I don’t expect. Then I discover that if I disable the input, whole ion-item become “item-interactive-disabled” so the icon is disabled.

How can I solve this problem?

Posts: 1

Participants: 1

Read full topic

CRUD picture to firebase storange ionic 4

$
0
0

@ayoimansor wrote:

Hye everyone,

currently i am in the midst to do CRUD for user to add image and for other user to view only.

Do you have any suggestion on how to add image to firebase?

Thank you

Posts: 1

Participants: 1

Read full topic

How to implement map search functionality in Ionic 5 app

$
0
0

@Sweg wrote:

I am trying to create an ionic app that has two types of users - customers & suppliers.

Use case example:
I sign in as a customer, & by default I can see all the suppliers within 5km’s of me on a map. I should then be able to select a supplier on the map, & contact them via the app.

Can someone please tell me if there are specific ionic plugins or other plugins that I can use in my ionic app to accomplish the above?

So far, I’ve found the following resources that may be helpful but I’m not 100% sure if they’re able to help with my requirement above:

https://github.com/ionic-team/ionic-native-google-maps/blob/d7898d7a58940a9eb478ee4a1ef5d3d431db9e25/documents/README.md

https://ionicframework.com/docs/native/geolocation

Thanks for reading this, & I appreciate any advice or feedback!

Posts: 1

Participants: 1

Read full topic

Viewing all 70429 articles
Browse latest View live


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