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

Get Swiper Instance from Slides component

$
0
0

@OrganGrindingMonkey wrote:

I’ve read through the documentation and it says that you can get an instance of the Swiper using getSwiper() => Promise.

I’m currently importing the Slider
import { (removed other imports...), IonSlides } from "@ionic/react";

and then using it in a React.FC.

return (
    <IonPage>
      <IonHeader>
        <IonToolbar>
          <IonTitle>Survey Name</IonTitle>
        </IonToolbar>
      </IonHeader>
      <IonContent>
        <IonSlides pager={true}>{questions}</IonSlides>
      </IonContent>
    </IonPage>
  );

I’m not sure where or how to get the instance to be able to control it programmatically?

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


How do I add a custom component to every single page's ion-content?

$
0
0

@Simbaclaw wrote:

Hi there,

I have a question regarding whether it is possible to make something like a global component that is present on all of my pages inside the ion-content area of my app.

My idea is the following: Create a scroll indicator arrow that is either on the top of the screen or on the bottom of the screen depending on whether the user has scrolled up or down the screen entirely.

So whenever the user is at the top of the page and the user is capable of scrolling down I want to display a down arrow at the bottom of ion-content displaying that the user can still scroll down.

Whenever someone clicks that button the user should jump down to the bottom of the page, same goes for scrolling to the top of the page.

I figured I could write my own custom component and then add it to all and every single page inside my ionic app’s ion-content. But this seems counter intuitive since I’d have to do this for every single page.

Is there perhaps a way to create a custom component that is added to each page’s ion-content element globally so that I won’t have to add it manually to each html page?

Please let me know your thoughts on this.

Posts: 1

Participants: 1

Read full topic

ImagePicker problem only on iPad

$
0
0

@etarom wrote:

Hi,
I encounter a problem that I can’t solve.
I use ImagePicker and Camera plugins.
Everything works correctly in the iPhone 8 13.4 simulator

While in iPads:
iPad-Pro - 12-9-inch — 4th-generation 13.4 and iPad-Air - 3rd-generation-, 13.4

when I run the command for open ImagePicker or Camera the application no longer responds, as if the ImagePicker window was not displayed but was open in background.

The permissions are set in the config and for security I ask them when I start the application.

 ionic -v                                                                                                     
5.4.16

config.xml

        <config-file parent="NSPhotoLibraryUsageDescription" target="*-Info.plist">
            <string>Need photo library access to get pictures from there.</string>
        </config-file>
        <config-file parent="NSPhotoLibraryAddUsageDescription" target="*-Info.plist">
            <string>Need photo library access to get pictures from there.</string>
        </config-file>
        <config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
            <string>You can take photos</string>
        </config-file>

Any suggestions?

Posts: 1

Participants: 1

Read full topic

Integrate material design icons on ionic 3

$
0
0

@hafids wrote:

I leave it here for anybody who need it.

library : https://materialdesignicons.com/

how to integrate :slight_smile:

npm install @mdi/font

create file : config/copy.config.js

var chalk = require("chalk");
const config = require('../node_modules/@ionic/app-scripts/config/copy.config');

console.log(chalk.green('\n***********************************************'));
console.log(chalk.green('\nCopy Custom Assets'));
console.log(chalk.green('\n***********************************************'));

module.exports = Object.assign(config, {
  copyMdi: {
    src: ['{{ROOT}}/node_modules/@mdi/font/**/*'],
    dest: '{{WWW}}/assets/fonts/mdi'
  }
})

add on config section on package.json

"config": {
    .....
    "ionic_copy": "./config/copy.config.js"
  }

add on variables.scss

@import "../assets/fonts/mdi/css/materialdesignicons.css";

How to use the icon

<span class="mdi mdi-home"></span>

Enjoy :slight_smile:

Posts: 1

Participants: 1

Read full topic

Hello i hove problem in android build

$
0
0

@Ahmadnasary wrote:

i hove a problem in ionic build for android in mac system please help me in this issue!

i get this error

You have been opted out of telemetry. To change this, run: cordova telemetry on.
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/Users/ahmadnasary/Library/Android/sdk (DEPRECATED)
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio

Posts: 1

Participants: 1

Read full topic

UIWebView on AppleStore what is the right deadline?

$
0
0

@ioclaudio wrote:

Hi,
this week I’ve submitted a new version of two apps for iOS and I’ve received two emails that notify me that by a certain date they will refuse the apps that use UIWebView APIs.

But the date is different, the first says April 2020:

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of new apps that use UIWebView APIs starting from April 2020. 
See https://developer.apple.com/documentation/uikit/uiwebview for more information.

the second December 2020:


ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of app updates that use UIWebView APIs starting from December 2020. 
See https://developer.apple.com/documentation/uikit/uiwebview for more information.

Which is the right deadline?

Claudio

Posts: 1

Participants: 1

Read full topic

Android showing blank capacitor app instead of ionic/react app

$
0
0

@ryfy wrote:

Environment: wsl2 - ubuntu-18.04
Test device: Pixel 3/Android 10

The road so far:

  • Ionic app loads fine in ionic serve
  • I have run ionic build, npx cap sync android and npx cap copy android
  • npx cap open android does not work due to another issue but I am able to manually open the project in android studio
  • I get some gradle warnings when building but the app is successfully sent to my device
  • When the app loads, it shows the capacitor splash screen then goes blank white - none of my code seems to be accounted for

Are these gradle version warnings the cause or is something else going on? I’m new to the android side of things so I’m not sure if there are build settings I’m missing since npx cap open android doesn’t work, or additional config I may have missed along the way.

The build log:

Executing tasks: [:app:assembleDebug] in project /home/me/mobile/myapp/android


> Configure project :app
google-services.json not found, google-services plugin not applied. Push Notifications won't work

> Configure project :capacitor-android
WARNING: API 'variant.getJavaCompiler()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompiler(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
WARNING: API 'variantOutput.getPackageLibrary()' is obsolete and has been replaced with 'variant.getPackageLibraryProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variantOutput.getPackageLibrary(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.

> Task :app:preBuild UP-TO-DATE
> Task :capacitor-android:preBuild UP-TO-DATE
> Task :capacitor-android:preDebugBuild UP-TO-DATE
> Task :capacitor-android:checkDebugManifest UP-TO-DATE
> Task :capacitor-android:processDebugManifest UP-TO-DATE
> Task :capacitor-cordova-android-plugins:preBuild UP-TO-DATE
> Task :capacitor-cordova-android-plugins:preDebugBuild UP-TO-DATE
> Task :capacitor-cordova-android-plugins:checkDebugManifest UP-TO-DATE
> Task :capacitor-cordova-android-plugins:processDebugManifest UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :capacitor-android:compileDebugAidl NO-SOURCE
> Task :capacitor-cordova-android-plugins:compileDebugAidl NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :capacitor-android:packageDebugRenderscript NO-SOURCE
> Task :capacitor-cordova-android-plugins:packageDebugRenderscript NO-SOURCE
> Task :app:compileDebugRenderscript UP-TO-DATE
> Task :app:checkDebugManifest UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:generateDebugSources UP-TO-DATE
> Task :capacitor-android:compileDebugRenderscript UP-TO-DATE
> Task :capacitor-android:generateDebugBuildConfig UP-TO-DATE
> Task :capacitor-android:generateDebugResValues UP-TO-DATE
> Task :capacitor-android:generateDebugResources UP-TO-DATE
> Task :capacitor-android:packageDebugResources UP-TO-DATE
> Task :capacitor-android:generateDebugRFile UP-TO-DATE
> Task :capacitor-android:prepareLintJar UP-TO-DATE
> Task :capacitor-android:generateDebugSources UP-TO-DATE
> Task :capacitor-android:javaPreCompileDebug UP-TO-DATE
> Task :capacitor-android:compileDebugJavaWithJavac UP-TO-DATE
> Task :capacitor-android:processDebugJavaRes NO-SOURCE
> Task :capacitor-android:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
> Task :capacitor-cordova-android-plugins:compileDebugRenderscript UP-TO-DATE
> Task :capacitor-cordova-android-plugins:generateDebugBuildConfig UP-TO-DATE
> Task :capacitor-cordova-android-plugins:generateDebugResValues UP-TO-DATE
> Task :capacitor-cordova-android-plugins:generateDebugResources UP-TO-DATE
> Task :capacitor-cordova-android-plugins:packageDebugResources UP-TO-DATE
> Task :capacitor-cordova-android-plugins:generateDebugRFile UP-TO-DATE
> Task :capacitor-cordova-android-plugins:prepareLintJar UP-TO-DATE
> Task :capacitor-cordova-android-plugins:generateDebugSources UP-TO-DATE
> Task :capacitor-cordova-android-plugins:javaPreCompileDebug UP-TO-DATE
> Task :capacitor-cordova-android-plugins:compileDebugJavaWithJavac UP-TO-DATE
> Task :capacitor-cordova-android-plugins:processDebugJavaRes NO-SOURCE
> Task :capacitor-cordova-android-plugins:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:processDebugManifest
> Task :app:processDebugResources
> Task :app:compileDebugJavaWithJavac UP-TO-DATE
> Task :app:compileDebugNdk NO-SOURCE
> Task :app:compileDebugSources UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders UP-TO-DATE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :capacitor-android:mergeDebugShaders UP-TO-DATE
> Task :capacitor-android:compileDebugShaders UP-TO-DATE
> Task :capacitor-android:generateDebugAssets UP-TO-DATE
> Task :capacitor-android:packageDebugAssets UP-TO-DATE
> Task :capacitor-cordova-android-plugins:mergeDebugShaders UP-TO-DATE
> Task :capacitor-cordova-android-plugins:compileDebugShaders UP-TO-DATE
> Task :capacitor-cordova-android-plugins:generateDebugAssets UP-TO-DATE
> Task :capacitor-cordova-android-plugins:packageDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:validateSigningDebug UP-TO-DATE
> Task :app:signingConfigWriterDebug UP-TO-DATE
> Task :app:transformClassesWithDexBuilderForDebug UP-TO-DATE
> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug UP-TO-DATE
> Task :app:transformDexArchiveWithDexMergerForDebug UP-TO-DATE
> Task :app:mergeDebugJniLibFolders UP-TO-DATE
> Task :capacitor-android:compileDebugNdk NO-SOURCE
> Task :capacitor-android:mergeDebugJniLibFolders UP-TO-DATE
> Task :capacitor-android:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
> Task :capacitor-android:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
> Task :capacitor-cordova-android-plugins:compileDebugNdk NO-SOURCE
> Task :capacitor-cordova-android-plugins:mergeDebugJniLibFolders UP-TO-DATE
> Task :capacitor-cordova-android-plugins:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
> Task :capacitor-cordova-android-plugins:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
> Task :app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
> Task :app:packageDebug
> Task :app:assembleDebug

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 6s
59 actionable tasks: 3 executed, 56 up-to-date

Any help you can give is surely appreciated!

Posts: 1

Participants: 1

Read full topic

Save onesignal push notification to local storage when app is closed

$
0
0

@Nicosrn wrote:

Hello!

I am trying to save the data from onesignal push notification in my local storage when the app is closed. I am able to receive push notifications but it´s not working to save this to my local storage if the app is not running. Is it not possible to access local storage if the app is not opened? Please show me a way to do this. I try to do this on ios.

Posts: 1

Participants: 1

Read full topic


Can't install CLI on Mac OS Catalina

$
0
0

@peterbarone315 wrote:

npm install -g @ionic/cli

/Users/peterba/.npm-packages/bin/ionic -> /Users/peterba/.npm-packages/lib/node_modules/@ionic/cli/bin/ionic

  • @ionic/cli@6.4.1

updated 1 package in 6.805s

Peters-MBP:~ peterba$ ionic --help

-bash: ionic: command not found

I’m having an issue installing the CLI on my mac. Does anyone have any advice?

Posts: 1

Participants: 1

Read full topic

Add tutorials inside the app to show users how the app works

$
0
0

@Rashadab wrote:

I saw some apps that have like a kind of tutorial or guide that shows user how to navigate in the app. I am wondering if that is possible with ionic. I am not even sure what are they called anyhow.
Any idea?

Thanks

Posts: 1

Participants: 1

Read full topic

Ionicon inside clickable ion-card does not work with float

$
0
0

@th4t-gi wrote:

I posted this question on stack over first here.

I have a list of ion-cards that are clickable with a set of icons that appear when you hover over it. My problem is that the floating nature of the icons means that they are not actually where they look to be (shown in the image below) and so the ion-card click covers it up. I already know that I need $event.stopPropagation() in there but that does not fix it.

My question is then: How could I be able to click the ion-icons but not disrupt the position of any other elements in the process?

Thanks in advance

floating icon buttons do not show up on Chrome Element inspection

HTML

<ion-card *ngFor='let packet of packets; let i = index' (click)='mobile? presentActionSheet(packet): navToPacket(packet)'>
  <div id='card-icons'>
    <ion-icon (click)='editMeta(packet); $event.stopPropagation()' name="create-outline"></ion-icon>
    <ion-icon (click)='nav(["packet", packet.meta.computer.id, "stats"]); $event.stopPropagation()'
      name="bar-chart-outline">
    </ion-icon>
    <ion-icon (click)='presentMoreActionSheet(packet)' name="ellipsis-vertical"></ion-icon>
  </div>

  <ion-card-header>
    <ion-card-subtitle>Awesome Subtitle</ion-card-subtitle>
    <ion-card-title>Awesome Title</ion-card-title>
  </ion-card-header>
  <ion-card-content>
    Awesome content
  </ion-card-content>
</ion-card>

CSS

#card-icons {
  ion-icon {
    font-size: 30px;
    padding: 10px 5px;
  }
  visibility: hidden;
  float: right;
}
ion-card:hover #card-icons {
  visibility: visible;
}

Posts: 1

Participants: 1

Read full topic

Get runnig programming list

How to add a flag icon in ion-select-option

$
0
0

@Rashadab wrote:

I am trying to add a flag icon inside a an ion-select-option.

  <ion-item>
    <ion-label>Popover</ion-label>
    <ion-select [interfaceOptions]="customPopoverOptions" interface="popover" placeholder="Select One">
      <ion-select-option value="brown">Brown</ion-select-option>
      <ion-select-option value="blonde">Blonde</ion-select-option>
      <ion-select-option value="black">Black</ion-select-option>
      <ion-select-option value="red">Red</ion-select-option>
    </ion-select>
  </ion-item>

Instead of the words, I want flags.
I am trying the following but it is not working

<ion-select [interfaceOptions]="customPopoverOptions" interface="popover">
  <ion-select-option value="brown"><span class='flag-icon flag-icon-gb-eng' slot="end"></span></ion-select-option>
  <ion-select-option value="blonde"><span class='flag-icon flag-icon-gb-eng' slot="end"></span></ion-select-option>
 <ion-select-option value="black"><span class='flag-icon flag-icon-gb-eng'slot="end"></span></ion-select-option>
<ion-select-option value="red"><span class='flag-icon flag-icon-gb-eng' slot="end"></span></ion-select-option>
  </ion-select>
                
                  

Posts: 1

Participants: 1

Read full topic

Keeping state beetween tabs during navigation

$
0
0

@Gsouillard wrote:

Hello guys,
I have started my new Ionic React App.

However, I encounter small problems with navigation.
Indeed, my application uses Tabs navigation, but when I change tabs, the state is not save.

For example, if I load a list of 100 items on my Tab1, and then switch to Tab2, I should reload the list when I return to Tab1.

I did not have this problem on Angular.

Is there a way to keep the state between 2 tabs?

My render part of App.tsx :


 <IonApp>
     <IonReactRouter>
       <IonTabs>
         <IonRouterOutlet>
           <Route path="/tab1" component={Tab1} exact={true} />
           <Route path="/tab2" component={Tab2} exact={true} />
           <Route path="/tab3" component={Tab3} />
           <Route path="/detail/:symbol/:hash/:uuid" component={Detail} />
           <Route path="/" render={() => <Redirect to="/tab1" />} exact={true} />
         </IonRouterOutlet>
         <IonTabBar slot="bottom" mode="md">
           <IonTabButton tab="tab1" href="/tab1">
             <IonIcon icon={logo} />
             <IonLabel>Tab 1</IonLabel>
           </IonTabButton>
           <IonTabButton tab="Tab2" href="/tab2">
             <IonIcon icon={cashOutline} />
             <IonLabel>Tab2</IonLabel>
           </IonTabButton>
           <IonTabButton tab="tab3" href="/tab3">
             <IonIcon icon={logo} />
             <IonLabel>Tab3</IonLabel>
           </IonTabButton>
         </IonTabBar>
       </IonTabs>
     </IonReactRouter>
   </IonApp>

Thank you in advance !

Posts: 1

Participants: 1

Read full topic

Problem with running the command ionic cordova run android --device

$
0
0

@pemiro wrote:

Hi there,
I am having problem when I run the command ionic cordova run android --device to see the app on the wired device (android 10). The problem is that I am throwing the error
ANDROID_SDK_ROOT = undefined (recommended setting)
ANDROID_HOME = C: \ AndroidSdk (DEPRECATED)
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
[ERROR] An error occurred while running subprocess cordova.

    cordova.cmd build android --device exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

I have already configured the gradle in the environment variables

this is my ionic info:

Ionic:

   Ionic CLI                     : 6.3.0 (C:\Users\a\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 5.0.7
   @angular-devkit/build-angular : 0.803.26
   @angular-devkit/schematics    : 8.3.26
   @angular/cli                  : 8.3.26
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 1.5.2
   @capacitor/core : 1.5.2

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 7 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 1.0.0

System:

   Android SDK Tools : 26.1.1 (C:\AndroidSdk)
   NodeJS            : v12.16.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.13.4
   OS                : Windows 10

I don’t know what else to do, can you help me? I have been doing this for several days now. I have configured the gradle, sdk, everything and nothing even.
Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Ionicframework.com is down

Ionic 4 error ios file:///private/var/containers/Bundle/Application/E5E616C0-4389-4848-80FC-6B7EFAF90D41/.../index.html

$
0
0

@santiago_vasquez06 wrote:

Hi everyone, I would appreciate it if you could help me solve this problem with the platform IOS,
when running the application show the splash screen and after the screen shows a white screenshot

this is the stack shown in the execution (xcode)

the application stays like this

Ionic:

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

Capacitor:

   Capacitor CLI   : not installed
   @capacitor/core : not installed

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0, ios 4.5.5
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 15 other plugins)

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   ios-sim : ios-sim/9.0.0 darwin-x64 node-v10.17.0
   NodeJS  : v10.17.0 (/usr/local/bin/node)
   npm     : 6.11.3
   OS      : macOS Catalina

Posts: 1

Participants: 1

Read full topic

Ionic 5 and Capacitor: notch overlap problem

$
0
0

@shinix wrote:

Hi everybody !

Yesterday i have updated my Ionic App from Cordova to Capacitor and after that, status bar and tab bar overlap the content.

I don’t understand why, here’s a list of thing i’ve tried:

  • Check my meta viewport and it’s correct <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />

  • Add body css (you can see after screenshots).

  • Remove / install iOS / update iOS / update Ionic / update all plugins

with margin
Result when i use :

body{
	margin-top: constant(safe-area-inset-top);
	margin-top: env(safe-area-inset-top);
}

And if i remove margin-top:
without margin

Do you have any idea ?

Finally, my ionic info output:

Ionic:

   Ionic CLI                     : 6.4.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.7
   @angular-devkit/build-angular : 0.901.0
   @angular-devkit/schematics    : 9.1.0
   @angular/cli                  : 9.1.0
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 1.5.2
   @capacitor/core : 1.5.2

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : none
   Cordova Plugins   : no whitelisted plugins (0 plugins total)

Utility:

   cordova-res (update available: 0.11.0) : 0.9.0
   native-run (update available: 0.3.0)   : 0.2.2

System:

   ios-deploy : 1.9.4
   ios-sim    : ios-sim/9.0.0 darwin-x64 node-v13.10.1
   NodeJS     : v13.10.1 (/usr/local/Cellar/node/13.10.1/bin/node)
   npm        : 6.14.4
   OS         : macOS Catalina
   Xcode      : Xcode 11.4 Build version 11E146

Posts: 1

Participants: 1

Read full topic

Get UID before pushing item to real time database

$
0
0

@androunie wrote:

Hello Ionic friends :slight_smile:

I am having a problem in Ionic 3. I am trying to push an element into my database like this:

fireSneakers refers to ==>

fireSneakers = firebase.database().ref('/sneakers-list');

I would like to add my item with the UID like this I can refer to it when I push an image into the Firebase storage (and therefore the item is stored with it’s key UID and in the storage the image to the item is also stored with it’s UID ==> see (this.createPost(this.Picture, uid)))

I tried different ways to get the UID, like this for example:

uid : firebase.database().ref('/items/').push(s).key;

But it does not the job

Here is what I would like to have in my database :

Capture d’écran 2020-04-02 à 17.42.09

–> The UID : MpV2R2E50nORQnk3xIW1LAhyRlg1 would also refers to the attribute UID, and also to the image into my database storage when I upload (through the method createPost())

Thanks in advance :smiley:

Posts: 1

Participants: 1

Read full topic

Is ionic 3 APK Supports for android TV

Viewing all 70434 articles
Browse latest View live