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

Ionic 5 + Angular 8 + iBeacon native plugin doesn't work

$
0
0

@3kSolutions wrote:

Hi all!

I’m trying to integrate iBeacon plugin into my Ionic 5 App but it doesn’t work at all.

When I try to call

this.delegate = this.ibeacon.Delegate();

then on the device, I obtain the following error all the time.

vendor-es2015.js:40772 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'locationManager' of undefined
TypeError: Cannot read property 'locationManager' of undefined

it is connected with the following code in the plugin:

var delegate = new _ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"].plugins.locationManager.Delegate();

I’ve added provider in the main module and also I’m using imports from ‘@ionic-native/ibeacon/ngx’

My package versions:

"@ionic/core":  "5.1.0"
"@ionic-native/core": "5.25.0"
"@ionic-native/ibeacon": "5.25.0"

I’m not sure if I’m doing something wrong or there is a bug in the plugin.

Thanks in advance for your help!

Posts: 1

Participants: 1

Read full topic


Ionic AlertController type Date

$
0
0

@ArinaAmir wrote:

Hello,

I have an alert with two inputs : title and date.

this.alertcontroller.create({

  header: 'Neue Notiz',

  inputs: [

    {

      type: 'text',

      name: 'title',

      placeholder: 'Titel'

    },

    {

      type: 'date',

      name: 'date',

      max: '',

      min: '',

    }

  ],

I want to change month names form English to German. I know how to do that with the us of ion datetime in html, however with alertController type: date I could not achieve that as it takes only max and min properties…
Any help will be appreciated.
Thanks

Posts: 1

Participants: 1

Read full topic

How do I improve deployment times for Ionic Android and Web applications hosted on Gitlab?

$
0
0

@nirmalhk7 wrote:

I use Ionic with my React website so that I get the website with same codebase on React and Android. I’ve managed to use CI/CD to automatically deploy my React website, however, I’m not sure how do I implement CI/CD for my Ionic Android application.

I’ve been using CI/CD for my Java Android apps, and I know from experience that deploying Android apps take a good 15 minutes , because you have to install all JDK and Android packages and libraries.

My React website takes much lesser time because npm is already preinstalled : my website pipelines finish in 3-5 mins at max. I cant afford to increase my website pipeline times for my Ionic Android app. Also, it isn’t very convenient to code the website when the Android app is in the same project directory.

Therefore, I wish to move my Android app out of my web app code : thus making it possible to have different pipelines for them and my website code is much more easier to manage . However, if I do that, I wouldn’t be able to apply changes done to my website app in my Ionic Android app (because they are not in same directories)

Does Ionic, Capacitor, or even Gitlab provide any solution to my problem?

Posts: 1

Participants: 1

Read full topic

Media Plugin Error On API 29+

$
0
0

@argoflo wrote:

The media plugin uses Environment.getExternalStorageDirectory() which is deprecated on API level 29. I would like to know if there is some fix for this?

Posts: 1

Participants: 1

Read full topic

Trouble changing package_name in Ionic 5

$
0
0

@Wrybread wrote:

I’m trying to submit my app built with Ionic 5 / capacitor, and the Play Store keeps rejecting the bundle:

In Android Studio I’ve opened AndroidManiest.xml and changed that first line:

[quote][/quote]

And I’ve opened strings.xml:

But somehow when I build the bundle it’s retaining the package name “io.ionic.starter”.

I’m building in Android Studio by clicking Build -> Generate Signed Bundle / APK -> Android App Bundle --> Release.

Do I need to change the package name anywhere else?

Do I need to do anything after changing the package name?

Posts: 4

Participants: 2

Read full topic

Check WKWebview on ionic 3

$
0
0

@stsness wrote:

Hi, I enabled WKWebview on my ionic 3 app, but I received Apple email with this deprecation again…
I think that something of the WKWebview plugin is enabled because I had modify CORS policity of my API.
How can I check if it is working to avoid Apple deprecation?

Thanks!

Posts: 1

Participants: 1

Read full topic

Ionic native binary crash Android

$
0
0

@simonhivehub wrote:

I get the error trying to de a debug build using cloud build in AppFlow.

[21:14:13]: fastlane finished with errors
/usr/local/bundle/bin/fastlane: [!] Shell command exited with exit status 1 instead of 0. (FastlaneCore::Interface::FastlaneShellError)

Welcome to Gradle 5.6.4!

Here are the highlights of this release:
 - Incremental Groovy compilation
 - Groovy compile avoidance
 - Test fixtures for Java projects
 - Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6.4/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> 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 more information.
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 more information.

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :capacitor-android:preBuild UP-TO-DATE
> Task :capacitor-android:preDebugBuild UP-TO-DATE
> Task :capacitor-android:compileDebugAidl NO-SOURCE
> Task :capacitor-cordova-android-plugins:preBuild UP-TO-DATE
> Task :capacitor-cordova-android-plugins:preDebugBuild UP-TO-DATE
> 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 NO-SOURCE
> Task :app:generateDebugBuildConfig
> Task :capacitor-android:compileDebugRenderscript NO-SOURCE
> Task :capacitor-android:generateDebugBuildConfig
> Task :capacitor-android:generateDebugResValues
> Task :capacitor-android:generateDebugResources
> Task :capacitor-android:packageDebugResources
> Task :capacitor-android:parseDebugLocalResources
> Task :capacitor-android:processDebugManifest
> Task :capacitor-android:generateDebugRFile
> Task :capacitor-android:javaPreCompileDebug

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

> Task :capacitor-android:bundleLibCompileDebug
> Task :capacitor-cordova-android-plugins:compileDebugRenderscript NO-SOURCE
> Task :capacitor-cordova-android-plugins:generateDebugBuildConfig
> Task :capacitor-cordova-android-plugins:generateDebugResValues
> Task :capacitor-cordova-android-plugins:generateDebugResources
> Task :capacitor-cordova-android-plugins:packageDebugResources
> Task :capacitor-cordova-android-plugins:parseDebugLocalResources
> Task :capacitor-cordova-android-plugins:processDebugManifest
> Task :capacitor-cordova-android-plugins:generateDebugRFile
> Task :capacitor-cordova-android-plugins:javaPreCompileDebug
> Task :capacitor-cordova-android-plugins:compileDebugJavaWithJavac
> Task :capacitor-cordova-android-plugins:bundleLibCompileDebug
> Task :app:javaPreCompileDebug
> Task :app:mainApkListPersistenceDebug
> Task :app:generateDebugResValues
> Task :app:generateDebugResources
> Task :app:mergeDebugResources
> Task :app:createDebugCompatibleScreenManifests
> Task :app:extractDeepLinksDebug
> Task :capacitor-android:extractDeepLinksDebug
> Task :capacitor-cordova-android-plugins:extractDeepLinksDebug
> Task :app:processDebugManifest
> Task :capacitor-android:compileDebugLibraryResources
> Task :capacitor-cordova-android-plugins:compileDebugLibraryResources
> Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     /builds/Simon-Hivehub/LeBarmanBruno/android/capacitor-cordova-android-plugins/build/intermediates/library_manifest/debug/AndroidManifest.xml:18:9-24:58: AAPT: error: resource string/activity_name (aka com.hivehub.lebarmanbruno:string/activity_name) not found.
         

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 7s
31 actionable tasks: 31 executed

Posts: 1

Participants: 1

Read full topic

FCM notifications not triggering onNotification method while app in background

$
0
0

@dikwata wrote:

I am using @ionic-native/fcm. I can get notifications on the notification tray but the onNotification method is not called while receiving the notification. It is only called when the notification is tapped on the notification tray. below is the code I’ am using:

this.fcm.onNotification().subscribe(data => {
if(data.wasTapped){

} else {

};
});

My payload for notification is as follows:
{
“notification”:{
“title”:“My notification”,
“body”:“My notification body”,
“sound”:“default”,
“click_action”:“FCM_PLUGIN_ACTIVITY”,
“icon”:“fcm_push_icon”
},
“data”:{
“param1”:“value1”,
},
“to”:"/topics/topicExample",
}

Posts: 1

Participants: 1

Read full topic


Ion toolbar background from backend

$
0
0

@Astrid5 wrote:

hey guys. I’m aware that a good method to set a ion-toolbar background is:

--background: url('assets/images/whatever.png')  center 100%;

When this background is different for each item I have on my database, how can I set this variable? I’m trying the following:

const element: any = document.getElementById('header');
element.style.background = this.event.get('backgroundImage').url();

It doesn’t work at all. Any tips? thanks!

Posts: 1

Participants: 1

Read full topic

How to read SMS on Ionic 5

$
0
0

@flaviotobias wrote:

How can I read SMS on Ionic 5?

I tried the tutorial below for Ionic 4 but it is not working, the SMSReceive variable is returning undefined.
Tutorial

The only ionic native plugin I found is only to send SMS not reading.

Can anyone help me?

Thanks

Posts: 1

Participants: 1

Read full topic

How to hide the back button at bottom Tab menu at home page?

$
0
0

@vgnjt wrote:

screenshot.335

Referring to the picture, How to I hide the back button at bottom Tab menu at home page?
I have found may to hide the back button but is at the top of the page. Is there a way to hide this button when user goes to Home Page?

Posts: 1

Participants: 1

Read full topic

postMessage() in iframe fails because document.referrer returns empty string in iOS

$
0
0

@2upmedia wrote:

I’m having a problem where a vendor’s javascript is throwing an error because document.referrer returns an empty string as a parameter being sent to postMessage().

Here’s the error I’m seeing.

I’ve read several things, perhaps Webkit is stripping the hostname for security reasons or there’s an HTTP header that’s stripping that referrer out (I haven’t found any of these headers). Or it has something to do with WKWebKit and having to use the ionic:// to serve local files. Just overall, not sure how to resolve this issue.

Any insights would be highly appreciated.

Here’s my $ ionic info:

Ionic:

   Ionic CLI         : 5.4.16
   Ionic Framework   : ionic1 1.0.0-beta.14
   @ionic/v1-toolkit : 2.0.11

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 5.4.4, cordova-plugin-ionic-webview 4.1.2, (and 17 other plugins)

Utility:

   cordova-res (update available: 0.14.0) : 0.9.0
   native-run (update available: 1.0.0)   : 0.3.0

System:

   Android SDK Tools : 26.1.1 (~/Library/Android/sdk)
   ios-deploy        : 1.10.0
   ios-sim           : 8.0.2
   NodeJS            : v8.16.0 (~/.nvm/versions/node/v8.16.0/bin/node)
   npm               : 6.4.1
   OS                : macOS Catalina
   Xcode             : Xcode 11.4.1 Build version 11E503a

Posts: 1

Participants: 1

Read full topic

IOS Capacitor Error Could not find REVERSED_CLIENT_ID url scheme in app .plist

$
0
0

@SaeedAnsari wrote:

Hello

I am getting an error when trying to use GooglePlusLogin on a IOS app. This features works on Android but is failing in IOS using Capacitors.

Error: Could not find REVERSED_CLIENT_ID url scheme in app .plist

Environment:
Ionic:

Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.11.10
@angular-devkit/build-angular : 0.803.25
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.0.0

Capacitor:

Capacitor CLI : 1.5.1
@capacitor/core : 1.5.1

Cordova:

Cordova CLI : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.0, (and 25 other plugins)

Utility:

cordova-res (update available: 0.14.0) : 0.6.0
native-run (update available: 1.0.0) : 0.2.9

System:

Android SDK Tools : 26.1.1 (/Users/saeedansari/Library/Android/sdk)
ios-deploy : 1.10.0
ios-sim : ios-sim/9.0.0 darwin-x64 node-v10.15.3
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.14.4
OS : macOS Mojave
Xcode : Xcode 11.3.1 Build version 11C504

  1. I have added the Reversed Client ID into the info.plist file,
  2. I have updated the GoogleService-info.plist file in IOS/App/App folder.
  3. I have also manually copied it in to the Capacitor-cordova-ios-plugin/resources folder as well but it keeps getting overriten to empty when i do the sync (may have something to do with the problem)
  4. I have added the Rever_client_id into the Target’s URL Types

I am not sure what i can do to fix this, Can you please help me understand what i can do to resolve this issue

Thank you

Saeed Ansari

Posts: 1

Participants: 1

Read full topic

Ion-slides no longer slidable on mobile sizes after update to Ionic 5.1.0

$
0
0

@sanz wrote:

Hi everyone :slight_smile:

Built an app with Ionic 5 / Angular 9.1 but had an issue with slides working erratically as per this issue. Seemed like Ivy was the issue so I disabled Ivy (“enableIvy”: false in tsconfig.app.json) which allowed the sliders to work correctly without issues again.

The fix was merged and was part of the recent 5.1.0 update. I updated my app expecting the issue to be resolved, however a different issue has presented itself :frowning:

I can now enable Ivy fine, however ALL sliders using ion-slides no longer work (can’t swipe to slide forward or backward), BUT only when in Developer Tools and using the various device sizes ie. Galaxy S5 etc. If “Toggle device toolbar” is NOT enabled (ie full screen web browser), swiping works fine.

An exception to this is if I hit refresh when on a page with a slider, the sliders then work from that point on.

It’s like on initial load, the slider is not initialised. I have used a mixture of basic sliders and sliders with options.

Ionic Info:

Ionic:

   Ionic CLI                     : 6.8.0 (/Users/scott/.npm-packages/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.1.0
   @angular-devkit/build-angular : 0.901.4
   @angular-devkit/schematics    : 9.1.4
   @angular/cli                  : 9.1.4
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 2.1.0
   @capacitor/core : 2.1.0

Utility:

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

System:

   NodeJS : v12.13.0 (/usr/local/Cellar/node/12.9.1/bin/node)
   npm    : 6.14.4
   OS     : macOS Catalina

package.json:

{
	"name": "name",
	"version": "0.1",
	"author": "Sanz",
	"homepage": "https://homepage",
	"scripts": {
		"ng": "ng",
		"start": "ng serve",
		"build": "ng build",
		"test": "ng test",
		"lint": "ng lint",
		"e2e": "ng e2e"
	},
	"private": true,
	"dependencies": {
		"@angular/common": "^9.1.5",
		"@angular/core": "^9.1.5",
		"@angular/fire": "^6.0.0",
		"@angular/forms": "^9.1.5",
		"@angular/platform-browser": "^9.1.5",
		"@angular/platform-browser-dynamic": "^9.1.5",
		"@angular/pwa": "^0.901.4",
		"@angular/router": "^9.1.5",
		"@angular/service-worker": "^9.1.5",
		"@capacitor/android": "^2.1.0",
		"@capacitor/core": "^2.1.0",
		"@capacitor/ios": "^2.1.0",
		"@egjs/view360": "^3.3.1",
		"@ionic/angular": "^5.1.0",
		"@ionic/cli": "^6.8.0",
		"@ionic/core": "^5.1.0",
		"@ionic/pwa-elements": "^1.5.2",
		"@ngneat/cashew": "^1.1.5",
		"@ngx-pwa/offline": "^9.1.0",
		"core-js": "^2.5.4",
		"firebase": "^7.14.3",
		"ngx-ionic-image-viewer": "^0.7.0",
		"rxjs": "^6.5.5",
		"tslib": "^1.11.2",
		"zone.js": "~0.10.2"
	},
	"devDependencies": {
		"@angular-devkit/architect": "~0.900",
		"@angular-devkit/build-angular": "^0.901.4",
		"@angular/cli": "^9.1.4",
		"@angular/compiler": "^9.1.5",
		"@angular/compiler-cli": "^9.1.5",
		"@angular/language-service": "^9.1.5",
		"@capacitor/cli": "^2.1.0",
		"@ionic/angular-toolkit": "^2.1.1",
		"@types/jasmine": "~3.3.8",
		"@types/jasminewd2": "~2.0.3",
		"@types/node": "^12.12.38",
		"codelyzer": "^5.1.2",
		"firebase-tools": "^7.12.1",
		"fuzzy": "^0.1.3",
		"inquirer": "^6.5.2",
		"inquirer-autocomplete-prompt": "^1.0.1",
		"jasmine-core": "~3.4.0",
		"jasmine-spec-reporter": "~4.2.1",
		"karma": "~4.1.0",
		"karma-chrome-launcher": "~2.2.0",
		"karma-coverage-istanbul-reporter": "~2.0.1",
		"karma-jasmine": "~2.0.1",
		"karma-jasmine-html-reporter": "^1.4.0",
		"protractor": "^5.4.4",
		"ts-node": "~7.0.0",
		"tslint": "~5.15.0",
		"typescript": "~3.8.3"
	},
	"description": "Description"
}

I have rebuilt the project (npm install), cleared caches etc.

Anyone come across this or have any idea I can try?

Thanks
Sanz

Posts: 1

Participants: 1

Read full topic

innerHTML is not working with ionic 4

$
0
0

@flycoders_sourav wrote:

i try to print using innerHTMLbut is not working with ionic 4

<div  *ngFor="let item of faqlist">

        <p [innerHTML]="item.page_content"></p>

      </div>

Please help me out
Thanks

Posts: 1

Participants: 1

Read full topic


Popover centering not working after ionic 4 to 5 update

$
0
0

@timKraeuter wrote:

I have used the trick described in https://github.com/ionic-team/ionic/issues/15036 and used in How to center a popover horizontally on iOS? to center the popovers in my app(especially when the virtual keyboards pop up). After updating from ionic 4 and angular 7 to ionic 5 and angular 9 the solution is not working anymore.

I have debugged in chrome and it seems like the “transform: translate(-50%, -50%) !important;” part is not considered anymore.

Ionic info:
Ionic:

Ionic CLI : 5.4.16
Ionic Framework : @ionic/angular 5.1.0
@angular-devkit/build-angular : 0.901.4
@angular-devkit/schematics : 9.1.4
@angular/cli : 9.1.4
@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.1.1, (and 14 other plugins)

Utility:

cordova-res : not installed
native-run : 1.0.0

System:

NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10

I would appreciate any help. I am not sure if the ionic or angular update is to blame.

Posts: 1

Participants: 1

Read full topic

SEO Services company india

The child component view duplicated while using ChangeDetectorRef detectChanges in ionic 4

$
0
0

@muru1778 wrote:

Hi all,
I am using ChangeDetectorRef - detectChanges in the parent view to detect the changes
The parent view has one child component. The child component receiving the input using following format (setter).

set name(name: string) {
    this._name = name
  }

But if there is any changes in the parent view child component gets duplicated sometimes in the parent view.If i am not using ChangeDetectorRef - detectChanges the child view not get duplicated.Here i attched the sample view

Untitled

Posts: 1

Participants: 1

Read full topic

Convert ionic project to apk

Facebook authentication

$
0
0

@kdefombelle wrote:

Hello,

I would like to implement Facebook authentication for my app and so I am looking at the options.
Facebook offers a Graph API to login.

Noticed these capacitor plugins to eventually ease the calls to the API https://libraries.io/npm/@byteowls%2Fcapacitor-oauth2
https://github.com/rdlabo-team/capacitor-facebook-login

I am wondering

  • if anyone has some guidance or feedback about the good way to implement this in an ionic app
  • and also whether we can test such authentication API as I read on Facebook API doc that the redirection URL should be in HTTPS: can we spawn the ionic app in HTTPS for web / ios / android?
    Screenshot 2020-05-08 at 6.46.04 PM

Thank you,

Posts: 1

Participants: 1

Read full topic

Viewing all 70972 articles
Browse latest View live


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