-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBeacon plugin not working using Ionic v4 beta #2631
Comments
I have the same issue, have you fixed it now? |
I also have a similar issue. In my case, debugging shows that the android app is throwing an error when attempting to create the Delegate object:
This throws an error in the ionic-native ngx module from the line that tries to create a new Delegate calling the cordova plugin (line 29 of ngx/index.js):
The error I see in the Chrome debugger console is:
Single stepping through it, it seems like the cordova.plugins interface is set up, so I don't really know what it is complaining about. Thoughts? |
I also have problems with the iBeacon plugin, using 5.0.0.0-beta.20 but same error on previous versions. Error: Uncaught (in promise): TypeError: undefined is not an object (evaluating 'new ionic_native_core__WEBPACK_IMPORTED_MODULE_1_["cordova"].plugins.locationManager') |
cc @mlynch can you take a look for me? |
No changes in beta 21, same error as described above |
@halindrome Do you know what I can do in that case? I have the same issue with the location manager, I am currenty using the beta 21, but receive the exact same error as you. |
I have the same issue, please solve it!! |
Please fix it. |
Hi @danielsogl @mlynch here you have an example of not working plugin i've created new app from scratch with the CLI (ionic version 4) but i have in console |
same issue |
@ihadeed @danielsogl Hi guys some help on this? we are building a nice app to track children that are taking the bus to send notifications to parents if they have took the bus or not. we are using ionic and beacon but this plugin is not working... there is the same issue opened here without response yet |
I have the same problem but with the new realase of V4. Any solution or idea to solve this problem? I would like to add some comments. Maybe it could be help someone to find a solution. When I used V4 Beta I added the pluggin using npm install @ionic-native/ibeacon**@beta**. I updated Ionic and I started to use the version 4 and I cleaned my project and I installed all plugins again following the installation commads described in the web page of Ionic Native, without using @beta anymore. All plugings workes fine, but IBeacon import in app.modules.ts was not recognized if one uses "import { IBeacon } from '@ionic-native/ibeacon**/ngx**'". Installing the plugin using @beta achives the import recognition, but the plugin still not working. I think, that if is not possible to solve this problem I will have to back to work with our old code for version 3 of Ionic. Thank you for your help. |
Fortunately Ionic 4 stable was released yesterday and maybe we'll get more attention to this issue, i've opened other issues in the cordova plugin repo i've also asked if this project is still mantained but seems not |
Any solution yet guys? |
nothing here.. i've asked same question on the ionic slack to Mike an ionic mantainer he asked me for a live broken example but i don't have time now to perpare it, someone has some basic example to share with him? https://ionic-worldwide.slack.com/archives/C03AJV5A5/p1548779396066400 |
Ok, done. |
Thank you
Thank you, we all appreciate it. Hopefully we hear back soon. For anyone looking for an interim solution, I've managed to get the plugin working in Ionic v3 in the foreground and background but when the app is closed it is not relaunching the application. If anyone has any solution it would be greatly appreciated. Thanks |
@arneldomingo can you tell me a little more? Thanks |
@arneldomingo can you create a pull request with that? or a fork with the fix in your github ? thanks |
@arneldomingo It worked for me! Literally saved my life. |
Thank you! Got this working and monitoring iBeacons in the background and foreground. I'll make a PR (Still no luck with monitoring when the app is closed) |
Idk if it's intended because is my first time working with beacons,when I detect a beacon with a certain uuid, I can't detect it anymore for some minutes, even restarting the app. Maybe is due to the files that we modified to fix the bug, or is there any kind of timer to detect a beacon again? |
Hey @arneldomingo. It could be good to compare with my file index.js Thanks! |
This WE i found time to try all my beacons, debugging the plugin it looks like that cordova variable is shadowed but there is no point to use this lib which is not mantained anymore. |
@tommasorossi I created a plugin for ibeacon in Swift that's largely unfinished. It connects and ranges, but the delegate callbacks don't work, so you'd have to go into the Swift code and customize it there. I'm going to keep working on it, just in case people don't want to toss their iBeacons in the trash. |
@tommasorossi iOS will not wake up in the background for Eddystone beacons - which are also not supported anymore by Google. |
Hi everyone. I have the new beacon plugin setup on my account: https://github.com/elTigre9/cordova-plugin-beaconing. I hope it comes in handy! NOTES:
|
Here's a copy of those files that need to be modified https://github.com/IT-Dan/Ionic4ibeacon/. |
I cannot find any working solution for monitoring iBeacons when the app is closed. This repo is the closest I can get to it, it works in the foreground/background but not when the app is closed. Does anyone know of a working solution or will I have to learn swift? |
I can confirm that the patch to use |
This worked for me... @IT-Dan TY |
can you share how you used that plugin in ionic? |
It is said that this is ionic-native bug here, dated 28-03-2019. |
anyone was able to make advertising work? to me |
FYI, if you're trying to do beacon stuff under Capacitor, I've written a Capacitor plugin for it: https://github.com/rangerrick/capacitor-ibeacon Haven't had a chance to implement the Android side yet, so it's iOS-only for now. |
@EdByrnee can u provide ur working code , please.?
the output that i am getting is : plus when i was trying evothing's eddystone after adding the plugin the advertising code is not working as the downloaded plugin's code itself doesn't has the startadvertising function but online where i see the source code it is present |
@tommasorossi i am not able to use that lib. as when i try to add it as a plugin only scanning code gets add as plugin not the advertising code. |
I had the same issue, the origin of problem is the version android try with it |
I had the same issue, the origin of problem is the version android try with it |
Thanks! You can find the files to be modified in ionic5 in https://github.com/YouQam/ionic5ibeacon The solution has been tested using both iOS and Android devices. |
I made a pull request for the Ionic Native wrapper of this library last week and it has already been released with version 5.28.0: Hope it helps you guys! |
There has been no recent activity and this issue has been marked inactive. |
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/
Current behavior:
the following error is displayed in xcode when running from the device
ERROR: [Cordova-Plugin-IBeacon] WARNING did not receive delegate ready callback from dom after 30 seconds
Expected behavior:
beacon ranging and monitoring should start
Steps to reproduce:
Using the start app
ionic start myApp tabs --type=angular
Installing the ibeacon plugin
ionic cordova plugin add cordova-plugin-ibeacon
$ npm install --save @ionic-native/ibeacon@beta
adding in the app.module.ts the plugin
Related code:
home.page.ts
home.page.html
Other information:
Ionic info:
The text was updated successfully, but these errors were encountered: