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

Impedir capturas de pantalla

$
0
0

@YotAlexander wrote:

Tengo una aplicacion la cual va a mostrar informacion confidencial me interesa saber si es posible Bloquear las capturas de pantalla tanto de iOS, como Android

Posts: 1

Participants: 1

Read full topic


React Native + Ionic Without Capacitor

$
0
0

@danieldugger wrote:

Has anyone successfully add ionic to a react native project and not used capacitor? I would love to leverage all of the markup already written and would like to not use capacitor or cordova.

I tried following their instructions for the beta press release and running the sync command and it does not compile.

Posts: 1

Participants: 1

Read full topic

How to prevent url to open externaly in Chrome etc

$
0
0

@Saban wrote:

Hello,
Can someone help me how to prevent my OneSignal url from opening externaly in chrome?
When I click on push notification I have received, It leads me to chrome.
But I want to stop that and want to trigger opening my own app page instead of that opening in browser.
Thanks

Posts: 1

Participants: 1

Read full topic

Date and time Format

$
0
0

@geo3433 wrote:

Ion-datetime input looks like that "“2019-08-31T06:31:38.586+03:00"” when it is converted to string.
The thing is, regardless of picking date or time, the output in both cases contains both date and time. How can time or date be isolated from the string depending on whether ion-datetime is used for picking time or date?

Posts: 1

Participants: 1

Read full topic

Build Error : Cannot read property 'length' of undefined in New Project

$
0
0

@Kelvin150 wrote:

I reopened my old Ionic project and when i tried to build it i got “Cannot read property ‘length’ of undefined” error.

Note: I updated my Android Studio Recently

I have tried uninstalling and installing node and ionic

Error

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=H:\sdk (DEPRECATED)
Cannot read property ‘length’ of undefined
[ERROR] An error occurred while running subprocess cordova.

    cordova.cmd build android exited with exit code 1.

ionic info :

Ionic:

   Ionic CLI          : 5.2.7
   Ionic Framework    : ionic-angular 3.9.5
   @ionic/app-scripts : 3.2.2

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic
-webview 4.1.1, (and 4 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.8

System:

   Android SDK Tools : 25.2.3 (H:\sdk)
   NodeJS            : v10.16.3 (J:\Program Files\nodejs\node.exe)
   npm               : 6.11.2
   OS                : Windows 8.1

I am getting this error while running ionic cordova build android . It isn’t building. Any help would be appreciated

Posts: 1

Participants: 1

Read full topic

How to disable ip https validation in the ios simulator?

$
0
0

@Jefferk wrote:

I am creating an ios webview using Ionic 4. I have already built the ios platform and I am testing on xcode with the iphone XR-12 simulator. My application calls an iframe to an ip https test with a self-signed certificate. The problem is that ios does not allow me to access this ip because it is self-signed. I’m calling this server with iframe and also use web service that access it from httpclient ionic. I cant access to server.

I have already tried adding the exception using NSAppTransportSecurity

    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
        <key>NSExceptionDomains</key>
        <dict>
            <key>MI IP</key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <false/>
                <key>NSExceptionAllowInsecureHTTPSLoads</key>
                <false/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <true/>
                <key>NSExceptionMinimumTLSVersion</key>
                <string>TLSv1.2</string>
                <key>NSThirdPartyExceptionAllowInsecureHTTPSLoads</key>
                <false/>
                <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
                <true/>
                <key>NSThirdPartyExceptionMinimumTLSVersion</key>
                <string>TLSv1.2</string>
                <key>NSRequiresCertificateTransparency</key>
                <false/>
            </dict>
        </dict>
    </dict>

But in a forum I read that it doesn’t work with ip and that I need a domain like www.example.com

So I tried to modify the host file but I would have to change all redirects and the css and links do not work correctly so I ruled out this possibility of editing the hosts Also try installing the certificates in the simulator. I was dragging the certificate to the simulator and install it and also activate it in certificate trust settings. But it does not work

Already try adding this code in AppDelegate.m

@implementation NSURLRequest(DataController)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
{
    return YES;
}

Also try adding this code in CDVWKWebViewEngine.m

- (void)webView:(WKWebView *)webView
didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge
                                   *)challenge completionHandler:(void (^)
                                                                  (NSURLSessionAuthChallengeDisposition
                                                                   disposition, NSURLCredential *credential))completionHandler {
    SecTrustRef serverTrust = challenge.protectionSpace.serverTrust;
    completionHandler(NSURLSessionAuthChallengeUseCredential,
                      [NSURLCredential credentialForTrust:serverTrust]);
}

Also add this in config.xml

<preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine"/>

But nothing works

In the logs from simulator ios

Task <837DAB71-F2D7-46C1-A29A-D1AD6736493F>.<2> load failed with error Error Domain=NSURLErrorDomain Code=-1202 “The certificate for this server is invalid. You might be connecting to a server that is pretending to be “IP WEB SITE” which could put your confidential information at risk.” UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=( “” ), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://IPWEB:4430/domesticas3p/registro, NSErrorFailingURLStringKey=https://WEBIP/domesticas3p/registro, NSUnderlyingError=0x7fa1a8e15650 {Error Domain=kCFErrorDomainCFNetwork Code=-1202 “(null)” UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=, _kCFNetworkCFStreamSSLErrorOriginalValue=-9843, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9843, kCFStreamPropertySSLPeerCer

And dont show nothing in the place where is the iframe and the sime proble calling to web service

Sorry my english, and thank you your help :slight_smile:

Posts: 1

Participants: 1

Read full topic

Incident on creation of new app

Float (decimal) as ion-route parameter failing

$
0
0

@JimGale wrote:

Using this, if works when the lat, lon or lat/lon are integers, but not containing decimals (404). How does one achieve this?

            <ion-route url="/" component="tab-home" />
            <ion-route url="/:city" component="tab-home" />
            <ion-route url="/:lat/:lon" component="tab-home" />
            <ion-route url="/z/:lat/:lon" component="tab-home" />
            <ion-route url="/:country/:state/:city" component="tab-home" />

I wonder if this is an iis/mime issue, expecting a filename to map based on the period.

Posts: 1

Participants: 1

Read full topic


.aab file is not generated

$
0
0

@ismailcse11 wrote:

D:\ionic\mobile-directory\platforms\android>gradlew bundleRelease

> Configure project :app
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
config.xml
../config.xml
../../config.xml
../../../config.xml
preference = 9
name = ScrollEnabled, value = false
name = android-minSdkVersion, value = 19
name = BackupWebStorage, value = none
name = SplashMaintainAspectRatio, value = true
name = FadeSplashScreenDuration, value = 300
name = SplashShowOnlyFirstTime, value = false
name = SplashScreen, value = screen
name = SplashScreenDelay, value = 3000
name = GOOGLE_MAPS_ANDROID_API_KEY, value = AIzaSyCtKVHlVCD564681FX-5uOhohxFuqHWs9M

> Configure project :CordovaLib
publishNonDefault is deprecated and has no effect anymore. All variants are now published.

> Task :CordovaLib:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

BUILD SUCCESSFUL in 21s
23 actionable tasks: 23 executed

.aab files is not generated
What should i do?

Posts: 1

Participants: 1

Read full topic

(Ionic4) Number of pages in stack?

$
0
0

@wmjoers wrote:

Hi all!

I’m creating an Ionic 4 app and use the NavController (from ‘@ionic/angular’) to navigate to and from pages.

Is there a way to find out how many pages there are in the navigation stack?

I found some docs about how to do this in Ionic3 but the API has clearly changed since then.

Best Regards
/John

Posts: 1

Participants: 1

Read full topic

Lzipalign.exe entry poing not found ionic

Angularfire2 on Ionic3

$
0
0

@lqrz wrote:

I’m trying to use Angularfire2 on an Ionic3 app.

When installing it npm install angularfire2 , I get a deprecation warning:

npm WARN deprecated angularfire2@5.2.1: AngularFire has moved, we're now @angular/fire .

But if trying to install the new @angular/fire npm install @angular/fire I see that every version requires an @angular/core >= 6.0.0 -which is greater than the Ionic3 supported on (i.e. “5.2.11”).

So, my question is how can I make use of a non-deprecated angularfire2 lib on Ionic3?

(You can also find this question on SO: https://stackoverflow.com/questions/57739589/angularfire2-ionic3?noredirect=1#comment101918279_57739589 )

Posts: 1

Participants: 1

Read full topic

List in ion-content is not scrolling correctly on iOS

$
0
0

@alex796 wrote:

Hi,

i have an ion-list inside an ion-content on a page which is used in a popover. Everything works fine on Android and in Safari when using ionic serve but on iOS (simulator and actual device) the content cannot be scrolled when the list is longer. If you try to scroll, it only “bounces” back.

I already tried everything I found in the forum and on the net, nothing helped.
iOS is Version 12.4.

Here’s the relevant code snippets:
page.html:

<ion-content padding no-bounce overflow-scroll="true" scroll="true">
    <p class="bold">{{'NOTIFICATIONS_AND_NEWS'|translate}}</p>
    <ion-list>
        <div *ngFor="let aNews of news">
            <ion-item *ngIf="aNews.deleted==false">
                    <ion-label text-wrap class="ion-margin-top" [style.font-weight]="aNews.read==true ? 'normal': 'bold'">{{aNews.title_de}}
                        <span style="position: absolute; right:0px;"><ion-icon name="close-circle" (click)="deleteClicked(aNews);"></ion-icon></span>
                    </ion-label>
                    <ion-note [style.font-weight]="aNews.read==true ? 'normal': 'bold'">{{aNews.text_de}}</ion-note>
                    <div class="gap"></div>
              </ion-item>
          </div>
    </ion-list>
</ion-content>

popover opened from tab1.page.ts;

async newsClicked(ev: any) {
    const popover = await this.popoverController.create({
      component: NewsPage,
      event: ev,
      translucent: false,
      cssClass: 'newspopover'
    });

    popover.onDidDismiss().then(() => { this.markNewsAsRead(); });

    return await popover.present();
  }

css class “newspopover” in global.scss:

.newspopover {
  --min-width: 80%;
  --max-width: 95%;
  overflow-y: scroll!important;
  -webkit-overflow-scrolling: touch;
}

Ionic info is:

Ionic:

   Ionic CLI                     : 5.2.7 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.5.0
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @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   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 6 other plugins)

Utility:

   cordova-res : 0.3.0 (update available: 0.6.0)
   native-run  : 0.2.1 (update available: 0.2.8)

System:

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

Any help is greatly appreciated. Thanks!

Posts: 4

Participants: 2

Read full topic

Can't subscribe to topics on ios (Error Domain=com.google.fcm Code=5) ionic3?

Ionic 4 - Blocked Youtube video "Cross-Origin Read Blocking (CORB)"

$
0
0

@boussarhane wrote:

I’m trying to show a youtube video on my HTML page (activity-video.page.html)

<video>
    <source [src]="videoURL" />
</video>

My (activity-video.page.ts) looks like:

videoURL: string;
  constructor(navParams: NavParams, private modalController: ModalController) {
    this.videoURL = navParams.get("videoURL");
  }

BUT!! DevTools shows me this message:

Cross-Origin Read Blocking (CORB) blocked cross-origin response https://m.youtube.com/watch?v=fqI-feIYfhY with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.

Posts: 1

Participants: 1

Read full topic


Ion-list item background color

$
0
0

@michelled wrote:

Please advise on how to change the color of a list. I cant change it from the value in the variables file --ion-background-color: #f2f2f2. I have tried everything.

My page background is #f2f2f2.

The image show the modal page with a red background. The list has to be white.

Posts: 1

Participants: 1

Read full topic

How to set default tab

$
0
0

@ldoldan wrote:

Hello everyone! I am building a simple tabs navigation and I am trying to set the default tab.

I read in the docs that I should use the selectedTab attribute in the ionic-tab-bar, but it does not seem to work.

This is my routes tree:

  {
    path: "",
    component: LayoutComponent,
    children: [
      {
        path: "page1",
        children: PAGE1_ROUTES
      },
      {
        path: "page2",
        children: PAGE2_ROUTES
      },
      {
        path: "page3",
        children: PAGE3_ROUTES
      }
    ]
  }

And here is my Layout component:


<ion-router-outlet></ion-router-outlet>

<ion-tabs>
  <ion-tab-bar selectedTab="page2" class="bottom-navigation" slot="bottom">
    <ion-tab-button tab="page1">
      <ion-icon name="options" class="icon"></ion-icon>
      <ion-label class="label">Page 1</ion-label>
    </ion-tab-button>
    <ion-tab-button tab="page2">
      <ion-icon src="/assets/icons/~" class="icon"></ion-icon>
      <ion-label class="label">Page 2</ion-label>
    </ion-tab-button>
    <ion-tab-button tab="page3">
      <ion-icon src="/assets/icons/~" class="icon"></ion-icon>
      <ion-label class="label">Page 3</ion-label>
    </ion-tab-button>
  </ion-tab-bar>
</ion-tabs>

I want Page2 to be loaded when the app starts. Any idea how to achieve it?

Thank you!

Posts: 1

Participants: 1

Read full topic

The color of the items is not displayed correctly

$
0
0

@lunny wrote:

Hi guys, when I try my application on Android it doesn’t fully load the color of some components and they show gray.
Can you help me?

Posts: 1

Participants: 1

Read full topic

Refresh data on a page?

$
0
0

@Anarxy wrote:

Hi, I’m a beginner, and i try to do an app with a shopping cart.
So i write a litlle function to delete the items of the cart. But i need to switch page to see the change.

Why ?

Thanks !

(and sorry for bad english :slight_smile: )

Posts: 1

Participants: 1

Read full topic

Call AlertController function

$
0
0

@geo3433 wrote:

From documentation

  async presentAlert() {
    const alert = await this.alertController.create({
      header: 'Alert',
      subHeader: 'Subtitle',
      message: 'This is an alert message.',
      buttons: ['OK']
    });

    await alert.present();
  }

this function generates an alert message and it is called after clicking a button. Is there any other way to call the function, just like you call a regular function, for the alert message to be displayed? Like presentAlert();

Posts: 1

Participants: 1

Read full topic

Viewing all 49286 articles
Browse latest View live


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