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

Ionic 4 capacitor not working with ionic/angular i need to add Event

$
0
0

@Bhagirath123 wrote:

in ionic 4 capacitor ionic/angular not working i need to add Event for event publish and event subscribe for login and logout time

any one help me out for this issue

Posts: 1

Participants: 1

Read full topic


Apple §4.2 Minimum Functionality

$
0
0

@ThomasGuettler wrote:

I have a website which works very fine on mobile devices.

Customers want an app for this website.

My preferred solution is to create a very simple app which is roughly
only chrome which opens my website.

Unfortunately Apple §4.2 Minimum Functionality does not allow “repackaged websites”.

Is capacitor the right tool to create a native app which will be accepted by the apple rules?

Is there a way to keep the app very slim?

A website has the huge benefit that I can update it any time.

Updating a native app is much slower. To get it into the apple store takes several days.

I really would like to have daily code updates.

Can capacitor help here?

Posts: 1

Participants: 1

Read full topic

Test web api works on Ionic lab and emulator but not in device

$
0
0

@ManelHK wrote:

Hello, I have just 2 weeks in ionic programming!
I developped a webapi (ASP.Net) and publish it on a web hosting server with the mssql data base.
my ionic app will connect to the webapi by an URL provided from the host server (SmarterASP).

when I tested login it works well on ionic lab and emulater but not on my device,

ionic cordova run android --device --consolelogs --verboseg

I get this error in my home page after click on the button Sign up
image

this is my share.ts

import {Injectable} from '@angular/core';
import {Http, Headers,RequestOptions, RequestMethod} from '@angular/http';
import 'rxjs/add/operator/map'

@Injectable()
export class ShareService{
    constructor(private http:Http){

    }
    login(login,pass){
        var _url="http://hostnamesite.com/api/APILogin";
        var _body={"loginUser":login,"passwordUser":pass};
        var _header=new Headers({'Content-Type':'Application/json','Access-Control-Allow-Origin':'*'});
        var _option=new RequestOptions({method:RequestMethod.Post,headers:_header});
        return this.http.post(_url,_body,_option).map(res=>res.json());
    }
}

this is my home.ts

import { Component,ErrorHandler } from '@angular/core';
import {NavController} from '@ionic/angular';
import {ShareService} from '../share/share';
import {ToastController}from '@ionic/angular';
import { LoadingController } from '@ionic/angular';
import {Router} from '@angular/router'

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})


export class HomePage {
  loginUser:string;
  passwordUser:string;
  constructor(public navCtrl:NavController,public share:ShareService,public toastCtrl:ToastController,private router: Router,public loadingController: LoadingController) {}

async signin(){
  const loading = await this.loadingController.create({
  
    message: 'Please wait...',
    duration: 5000
  });
  await loading.present();
this.share.login(this.loginUser,this.passwordUser).subscribe(async data=>{
  if(data==null){
    const toast=await this.toastCtrl.create({
      message:'Login Failed',
      duration:3000,
      
    });
    toast.present();
  }else{
    this.router.navigateByUrl('/dashbord');
  }
  loading.dismiss();
 
},async err => {
 console.log(err);
  const toast=await this.toastCtrl.create({
    message:'Connexion Error: Check internet connexion please! More details:<br/>'+err,
    duration:3000,
    color: 'danger',
    
  });
  toast.present();
  loading.dismiss();

});
}}

Blockquote
ionic info

Ionic:

Ionic CLI : 6.6.0 (C:\Users\admin\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 5.1.0
@angular-devkit/build-angular : 0.803.26
@angular-devkit/schematics : 8.3.26
@angular/cli : 9.1.5
@ionic/angular-toolkit : 2.2.0

Cordova:

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

Utility:

cordova-res : 0.13.0
native-run : 1.0.0

System:

NodeJS : v12.16.2 (C:\Program Files\nodejs\node.exe)
npm : 6.14.4
OS : Windows 8.1

Posts: 1

Participants: 1

Read full topic

@mauron85/cordova-plugin-background-geolocation

$
0
0

@TomasMoskala wrote:

Hi,
I installed background-geolocation and cannot build the app in Android studio anymore

npm install @mauron85/cordova-plugin-background-geolocation
npm install @ionic-native/background-geolocation
ionic cap sync

Android studio
\android\capacitor-cordova-android-plugins\src\main\java\com\evgenii\jsevaluator\JsEvaluator.java:4: error: package android.support.annotation does not exist
\android\capacitor-cordova-android-plugins\src\main\java\com\marianhello\bgloc\BackgroundGeolocationFacade.java:17: error: package android.support.v4.content does not exist
and many more.

I also installed
npm install cordova-plugin-geolocation
npm install @ionic-native/geolocation
beofre that and it worked fine but not in the background.
What did I forget about?

Posts: 1

Participants: 1

Read full topic

Iframe not working properly in Iphones

$
0
0

@YXUN wrote:

Hey guys, I write this code in my HTML and CSS, it’s working flawlessly in Android devices but NOT IN iOS. Can anyone help me with my code?

HTML

**

**
** <iframe src=“https://linkhere.com” **
** allowfullscreen SameSite=“None” secure>**
**
**

CSS
.iframe-container {
** overflow: hidden;**
** padding-top: 500%;**
** position: relative;**
** }**


** .iframe-container iframe {**
** border: 0;**
** height: 100%;**
** left: 0;**
** position: absolute;**
** top: 0;**
** width: 100%;**
** }**


** /* 4x3 Aspect Ratio /*
** .iframe-container-4x3 {**
** padding-top: 75%;**
** }**

** .iframe-error iframe {**
** border: 0;**
** height: 0%;**
** left: 0;**
** position: absolute;**
** top: 0;**
** width: 0%;**
** }**

Is there anything wrong with my code? It’s not fully displayed in iPhone but it works perfectly in android. Also, I can’t scroll in iPhone but android works nicely.

Please advise me what I did wrong with my iframe code, I need to change it to suit iPhone as I have a separate codebase for android and ios.

Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Working on a Design System Sketch/Figma library that is using Ionic Icons

$
0
0

@muschko wrote:

Hey you guys from Ionic,

first of all thanks for your great work!

I’m Henning a Freelance UI/UX Designer from Germany and i’m currently working on a Sketch/Figma Design System called Plain. Within the system i’m using the Ionic Icon set.

Is there something i have to care about with the license? Is it ok to do so? Of course you will get an appropriate credit on the website and inside the libraries.

Thanks in advance,
Henning
http://www.muschko.net

Posts: 1

Participants: 1

Read full topic

on-Select is hidden behind Ion Modal

$
0
0

@JEricaM wrote:

Ionic version:
@ionic/core”: “^5.0.7”,

If I put an ion-select inside an ion-modal , the ion-select disappear behind the modal and it’s impossibile to use.
How this can be fixed?

Posts: 4

Participants: 2

Read full topic

Ionic 5 - Instagram/SocialShare - iOS

$
0
0

@alpar165 wrote:

After I added and installed social-sharing and instagram plugins, I couldn’t share my taken image, when the popup shows up after taking the picture, it shows a white square with “instagram” text. and under it says “Instagram Photo Exclusive” and the size of the image. Bellow these should show up the Instagram app (it only shows AirDrop, Chrome, Notes), but there’s nothing related with Instagram.
The only difference might be that I am using the CameraPreview plugin as well, because I have to compare an image in the app with the live camera preview. So I found this plugin camera-preview

I am using the newest angular 9, Ionic 5. Everything is updated to the latest version (plugins, dependencies).

I really need to resolve this image sharing option on Instagram, within my app, with the taken image,
thanks in advice!

Posts: 4

Participants: 2

Read full topic


iOS build error: 'Could not find Xcode project' and 'modify_cap_ios_config'

$
0
0

@haullex wrote:

I can’t finish the build on ionic app flow. However the build itself succeeds, but generating ipa is failing.

[15:23:30]: — Step: modify_cap_ios_config —
[15:23:30]: -----------------------------------
[15:23:30]: Error setting value ‘/Users/ionic/builds/project-0/ios/App/App.xcodeproj’ for option ‘xcodeproj’
[15:23:30]: You passed invalid parameters to ‘modify_cap_ios_config’.
[15:23:30]: Check out the error below and available options by running fastlane action modify_cap_ios_config

Also at the end of log I am getting:
[!] Could not find Xcode project

Posts: 1

Participants: 1

Read full topic

FCM Problem After Ionic 5 & Angular 9 Update

$
0
0

@LacOniC wrote:

Recently i upgraded my Ionic 4 project to Ionic 5 and Angular 9. I updated all other packages also. Then some feedbacks reported about notification problems. I noticed that:

When i install app first time, it wants permission for notifications and that time this code works:

token = await this.firebase.getToken();

But works only once. After login or reopen app this code never works.

Btw, i give FCM token to users after login, normally. Because of it does not work second time, i can not pair users with FCM tokens so i can not send user specific notifications.

Not: First i suspected about FirebaseX. So i tried last version (9.1.1-cli) then my old version (7.0.1) and nothing changed. Now i use 8.0.1.

Posts: 1

Participants: 1

Read full topic

Error deploy in apple

$
0
0

@davidbmx wrote:

I have an application with ionic 5 and capacitor, but when uploading in apple it returns the following error
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

the only cordova plugin I use is @ mauron85 / cordova-plugin-background-geolocation

and I have not managed to deploy on apple

Posts: 1

Participants: 1

Read full topic

Ionic 5 + Capacitor: Cannot read property 'kind' of undefined

$
0
0

@Daveshirman wrote:

Q) How can I get my app to build in prod?

I recently switched my app from cordova to capacitor using the official migration guide, now I can’t do a production build.

Yes, I’ve deleted and reinstall all node_modules.

  • ionic build works fine
  • ionic build --prod broken with error below

Searched tons of posts about this, nothing seems to work.

ERROR in ./node_modules/@ionic/angular/fesm2015/ionic-angular.js
Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
TypeError: Cannot read property 'kind' of undefined

My Ionic info:

Ionic:

   Ionic CLI                     : 6.9.1 (/Users/daveshirman/.nvm/versions/node/v13.12.0/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.1.1
   @angular-devkit/build-angular : 0.801.3
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 2.1.0
   @capacitor/core : 2.1.0

Utility:

   cordova-res (update available: 0.14.0) : 0.11.0
   native-run (update available: 1.0.0)   : 0.2.8

System:

   NodeJS : v13.12.0 (/Users/daveshirman/.nvm/versions/node/v13.12.0/bin/node)
   npm    : 6.14.5
   OS     : macOS Mojave


Thanks for any help.

Posts: 1

Participants: 1

Read full topic

How to download a files and store locally in ipad

$
0
0

@rahimhaji wrote:

Dear Friends,

Greetings! i want to connect a json file and read the name of the files and download those files one by one from internet(my download location) and store locally in my Ipad appstorage path.

Please help me to do this. How can i do this…

Thanks in advance,

Thanks and Regards,
Syed Abdul Rahim

Posts: 1

Participants: 1

Read full topic

Ioinic 5 - java.lang.RuntimeException: Unable to instantiate application android.permission.READ_PHONE_STATE: java.lang.ClassNotFoundException

$
0
0

@tejakumar wrote:

Hello,

can anyone help me with this?

java.lang.RuntimeException: Unable to instantiate application android.permission.READ_PHONE_STATE: java.lang.ClassNotFoundException: Didn’t find class “android.permission.READ_PHONE_STATE” on path: DexPathList[[zip file “/data/app/com.practice.myapp -2/base.apk”],nativeLibraryDirectories=[/data/app/com.practice.myapp-2/lib/arm64, /vendor/lib64, /system/lib64]]

at android.app.LoadedApk.makeApplication(LoadedApk.java:584)

at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4801)

at android.app.ActivityThread.access$1800(ActivityThread.java:151)

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1461)

at android.os.Handler.dispatchMessage(Handler.java:102)

at android.os.Looper.loop(Looper.java:157)

at android.app.ActivityThread.main(ActivityThread.java:5603)

at java.lang.reflect.Method.invoke(Native Method)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:774)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)

Caused by: java.lan…

Posts: 1

Participants: 1

Read full topic

SQLite performance when executed first time

$
0
0

@adeel2083 wrote:

I am using SQLite with ionic

Ionic:

Ionic CLI : 6.6.0 (C:\Users\ADEEL\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 5.0.5
@angular-devkit/build-angular : 0.900.7
@angular-devkit/schematics : 9.0.7
@angular/cli : 9.0.7
@ionic/angular-toolkit : 2.2.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, browser 6.0.0
Cordova Plugins : cordova-plugin-ionic-webview 4.1.3, (and 9 other plugins)

Utility:

cordova-res (update available: 0.13.0) : 0.6.0
native-run (update available: 1.0.0) : 0.2.8

System:

Android SDK Tools : 26.1.1 (C:\Users\ADEEL\AppData\Local\Android\Sdk)
NodeJS : v12.16.1 (C:\Program Files\nodejs\node.exe)
npm : 6.13.4
OS : Windows 10

I have a table with 16 records in log_book table and 1 record each in department and location. when i run the query first time it will take almost 15 to 20 seconds but after that it runs in milliseconds. Calling function as follow

getLogBooks(): Promise<LogBook>{
return this.storage.executeSql(SELECT l.id, l.log_book_id, IFNULL(l.machine_no, "") machine_no , d.department_name, loc.location_name, l.section, l.area FROM log_book l INNER JOIN departments d ON l.department_id = d.id INNER JOIN locations loc ON l.location_id = loc.id WHERE l.deleted_at IS NULL, )
.then(res => {
const items: LogBook = ;
console.log(‘Log BOOK’, res.rows.length)
if (res.rows.length > 0) {
for (let i = 0; i < res.rows.length; i++) {
items.push({
id: res.rows.item(i).id,
LogBookID: res.rows.item(i).log_book_id,
MachineNo: res.rows.item(i).machine_no,
Department: res.rows.item(i).department_name,
Location: res.rows.item(i).location_name,
Section: res.rows.item(i).section,
Area: res.rows.item(i).area
});
}
}
return items;
});
}

Table structure

CREATE TABLE IF NOT EXISTS log_book (
id integer primary key autoincrement,
log_book_id varchar(50) NOT NULL,
machine_no varchar(50) DEFAULT NULL,
department_id int(11) NOT NULL,
location_id int(11) NOT NULL,
section varchar(50) NOT NULL,
area varchar(50) NOT NULL,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
created_by int(11) DEFAULT NULL,
updated_by int(11) DEFAULT NULL,
deleted_at datetime DEFAULT NULL
);

CREATE TABLE IF NOT EXISTS departments (
id integer primary key autoincrement,
department_name varchar(50) NOT NULL,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
created_by int(11) DEFAULT NULL,
updated_by int(11) DEFAULT NULL,
deleted_at datetime DEFAULT NULL
);

CREATE TABLE IF NOT EXISTS locations (
id integer primary key autoincrement,
location_name varchar(50) NOT NULL,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
created_by int(11) DEFAULT NULL,
updated_by int(11) DEFAULT NULL,
deleted_at datetime DEFAULT NULL
);

What i am doing wrong.

Thanking you in anticipation

Posts: 1

Participants: 1

Read full topic


Ion footer surpasses screen on back transition

$
0
0

@Astrid5 wrote:

My ion-footer is surpassing the screen when I click the back button, and disappears only after a few seconds. Here are some screen shots:

  1. Click on back-button:

  1. Footer surpasses

  1. Ion tabs shows up after a few seconds

I tried

ionViewWillLeave() { const rootElement = document.getElementById('buy'); rootElement.classList.add('ion-page-invisible'); }

and
.ion-page-invisible { opacity: 0; }

but the footer shouldn’t behave like this. Any thoughts?

Posts: 1

Participants: 1

Read full topic

The method startRecordVideo of the plugin cordova-plugin-camera-preview doesn't exist

Capacitor: Removing IDFA via CocoaPods

$
0
0

@ebellempire wrote:

Submitting my iOS build for review, I get the familiar error:

Your app is using the Advertising Identifier (IDFA). You must either provide details about the IDFA usage or remove it from the app and submit your binary again.

I know this is from using cordova-plugin-google-analytics. When my app actually used Cordova, I would just remove libAdIdAccess.a and AdSupport.framework from the Linked Libraries section in Xcode. But now I am using Capacitor, so it’s added using CocoaPods.

What is the best way to ensure that the offending libraries are always removed?

Below are some areas in Xcode where I see the issue but am uncertain how best to proceed.

Posts: 1

Participants: 1

Read full topic

Ion-content rendering with ion-tabs and ion-header

$
0
0

@SMALHO wrote:

I have a basic 3 tab page that I’m trying to build out using Ionic 5 and Angular 8. I route each tab to the appropriate component using angular’s routing module. All 3 of these tabs will have the same ion-header though, so I added the ion-header html to the tabs html file rather than in the components html file (the components are surrounded with an ion-content html tag), however when I do this the ion-content from each of my components renders behind the ion-header. If I add the ion-header into the component html file rather than the tabs html file then the content properly renders below the header. The same is true for the ion-tabs. How can I have the ion-content tag of each of my components properly render between the header and footer of the parent page/module?

Posts: 1

Participants: 1

Read full topic

"Invalid Bundle. The asset catalog at 'Payload/App.app/Assets.car'

$
0
0

@Bretto wrote:

I am using Transporter 1.1.1 to push an IOS11 ipa I am getting this error:
ERROR ITMS-90596: “Invalid Bundle. The asset catalog at ‘Payload/App.app/Assets.car’ can’t be processed. Rebuild your app, and all included extensions and frameworks, with the latest GM version of Xcode and resubmit.”

Posts: 1

Participants: 1

Read full topic

Viewing all 71274 articles
Browse latest View live


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