Code Monkey home page Code Monkey logo

Comments (45)

mylearning123 avatar mylearning123 commented on May 26, 2024 2

Hi, can you please provide some details about the missing library and way to fix that? I am facing the same error too.

from cordova-plugin-ibeacon.

meleksomai avatar meleksomai commented on May 26, 2024 1

It was a missing library. Problem solved. Thank you for the plugin again. I'm still exploring its capabilities.

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on May 26, 2024 1

@mylearning123 I'm not sure what might be the problem in your project, but it might be useful to have a look at the quickstart project, even if it's still in beta.

If any of you guys care to describe the problem and it's solution I'd be happy to add an entry to the FAQ so other people won't have to suffer that much.

Peter

from cordova-plugin-ibeacon.

mrtree1 avatar mrtree1 commented on May 26, 2024

@petermetz I did notice when I readded the advertising code that the plugin config file was missing a reference to CoreLocation. I added it when I added CoreBluetooth. That's the only dependency that we have.

from cordova-plugin-ibeacon.

aparusel avatar aparusel commented on May 26, 2024

I'm also experiencing this issue. CoreLocation and CoreBluetooth are both added as dependencies. Any advice? I cannot get this app running.

By the way:
What is the 'identifier' of a BeaconRegion? From Apple's native API I'm used to a beacon being defined only by UUID, major and minor....

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on May 26, 2024

@aparusel

Unfortunately I have no idea about the exact solution, as I never encountered it myself.

Did you manage to solve the problem in the meantime? If yes, I'd be very thankful if you could explain the details so the next person wondering around will get some useful information a lot quicker.

The identifier is a field to let you assign your own ID to the region. It is part of the native API for sure. Are you sure you are not confusing the CLBeacon class with CLBeaconRegion?

Peter

from cordova-plugin-ibeacon.

FELS-Zak avatar FELS-Zak commented on May 26, 2024

@petermetz I'm also having an issue . is the Lib/ folder missing

from cordova-plugin-ibeacon.

wol4max avatar wol4max commented on May 26, 2024

I am facing this issue as well. Would appreciate any help. @protactinium can you please tell me how you solved the issue ? You mention "missing library" but not sure which one. I have CoreLocation and CoreBluetooth both added as dependencies ...

from cordova-plugin-ibeacon.

sunsus avatar sunsus commented on May 26, 2024

Any solution about this? I facing the same problem with Xcode 6 and iOS8?

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on May 26, 2024

A new release is coming in shortly. When that's done, I'll ask everybody with this problem (and running on OS X) to run the unit tests by executing the .dart file placed in the test directory of the project.

That automatically sets up a new cordova project that incorporates the plugin as well. This approach consistently produced a working example project in the past months for me and should do the same for you which at the very least should provide means to compare it against your projects and figure out what is it that causes this problem.

The release of version 3.1 is coming today, stay tuned.

from cordova-plugin-ibeacon.

sunsus avatar sunsus commented on May 26, 2024

@petermetz Well the Version 3.1 didn't fix this problem. The problem is maybe related to #37

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on May 26, 2024

@sunsus Did you try the .dart script?

from cordova-plugin-ibeacon.

sunsus avatar sunsus commented on May 26, 2024

@petermetz no i was trying our ionic app. But i'm going to try the dart script

from cordova-plugin-ibeacon.

Eimji avatar Eimji commented on May 26, 2024

Hello,
I also have this issue [Cordova-Plugin-IBeacon] WARNING did not receive delegate ready callback from DOM after 30.000000 seconds!
The problem is that my app worked very well before updating cordova 3.5 to 3.6 and with the previous version of iBecon plugin. Even after updating the iBecon plugin, the issue is still there.

Anyone has a solution please ?

Thanks

from cordova-plugin-ibeacon.

wol4max avatar wol4max commented on May 26, 2024

Don't forget to add the following, before you start
"startMonitoringForRegion(beaconRegion)".
I had the same issue but this did the trick for me.

// required in iOS
8+cordova.plugins.locationManager.requestWhenInUseAuthorization(); // or
cordova.plugins.locationManager.requestAlwaysAuthorization()

On Wed, Sep 24, 2014 at 10:16 PM, Eimji [email protected] wrote:

Hello,
I also have this issue [Cordova-Plugin-IBeacon] WARNING did not receive
delegate ready callback from DOM after 30.000000 seconds!
The problem is that my app worked very well before updating cordova 3.5 to
3.6 and with the previous version of iBecon plugin. Even after updating the
iBecon plugin, the issue is still there.

Anyone has a solution please ?

Thanks


Reply to this email directly or view it on GitHub
#29 (comment)
.

from cordova-plugin-ibeacon.

Eimji avatar Eimji commented on May 26, 2024

I already had this line (cordova.plugins.locationManager.requestWhenInUseAuthorization(); ) in my code.

I notice that the plugin works in very very rare moments !! it makes me crazy :(((

I hate iOS 8... my app worked very well in iOS 7 before the arrival of iOS 8 ! lol

from cordova-plugin-ibeacon.

Eimji avatar Eimji commented on May 26, 2024

Edit : If I close my app, and relaunch it, the plugin works...
Amazing !

from cordova-plugin-ibeacon.

sunsus avatar sunsus commented on May 26, 2024

@EimjiI have exact the same problem.

from cordova-plugin-ibeacon.

Eimji avatar Eimji commented on May 26, 2024

I think the problem occurs when calling didChangeAuthorizationStatus.
Edit : Each time, the problem occurs when didChangeAuthorizationStatus fails to get the state.
We need for the first time for example to get didChangeAuthorizationStatus: 0 => AuthorizationStatusNotDetermined, so that the plugin can work.

I will investigate tonight.

from cordova-plugin-ibeacon.

sunsus avatar sunsus commented on May 26, 2024

@Eimji

The problem is some where in didChangeAuthorizationStatus in Objective-C the task added to the task queue in this method is never executed, because the queue is paused.
I don't know why this queue is paused, but if you start it in the init methode:

- (void)pluginInitialize
{
    [self initEventQueue];
    [self pauseEventPropagationToDom]; // Before the DOM is loaded we'll just keep collecting the events and fire them later.

    [self initLocationManager];
    [self initPeripheralManager];

    self.debugLogEnabled = true;
    self.debugNotificationsEnabled = false;

    [self resumeEventPropagationToDom];
}

It seams to work.

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on May 26, 2024

@Eimji @sunsus
Did you try this with version 3.1.1 as well?

from cordova-plugin-ibeacon.

sunsus avatar sunsus commented on May 26, 2024

@petermetz yes with 3.1.1

from cordova-plugin-ibeacon.

Eimji avatar Eimji commented on May 26, 2024

I am also using the version 3.1.1.

@sunsus, I tried your proposal, but it does not work.

@petermetz, do you can any idea how to fix the issue ? I'm desperate :((

from cordova-plugin-ibeacon.

Eimji avatar Eimji commented on May 26, 2024

I also notice another issue with didChangeAuthorizationStatus
I tried to implement this method in javascript in the delegate : the method is called but the status is null [object Object]

var didChangeAuthorizationStatus = function(status)
{
alert('didChangeAuthorizationStatus' + status);

if (status === 'AuthorizationStatusNotDetermined') {
    alert ('toto');

} else if (status === 'AuthorizationStatusDenied') {

    } else {

   }

}

from cordova-plugin-ibeacon.

sunsus avatar sunsus commented on May 26, 2024

@Eimji can you give me a list of installed plugins? Cordova plugin list

from cordova-plugin-ibeacon.

sunsus avatar sunsus commented on May 26, 2024

@Eimji Can ypu try this version:
https://github.com/sunsus/cordova-plugin-ibeacon

@petermetz
Where do you start the queue normally and for which event are you waiting?

@protactinium
What was the reason for closing this issue? Which plugin was missing?

It seams to be a kind of deadlook, you are resuming the eventQueue by calling onDomDelegateRead, this function is just called if you are setting a delegate implementation to the LocationManager. Now if you are setting this delegate in the 'device_ready' event. The plugin never loads completely because onDomDelegateRead is not called and this function is never called because it waits for the plugin to load.
Could this be the problem?

from cordova-plugin-ibeacon.

mrtree1 avatar mrtree1 commented on May 26, 2024

@sunsus The queue starts when the callback Delegate is registered, so it has some way to feed back to the app.

from cordova-plugin-ibeacon.

Eimji avatar Eimji commented on May 26, 2024

Hello,

@sunsus, my plugin list is:
com.phonegap.plugins.barcodescanner 2.0.0 "BarcodeScanner"
com.unarin.cordova.beacon 3.1.1 "Proximity Beacon Plugin"
org.apache.cordova.inappbrowser 0.5.3-dev "InAppBrowser"
org.apache.cordova.splashscreen 0.3.4-dev "Splashscreen"
org.apache.cordova.statusbar 0.1.9-dev "StatusBar"

And cordova 3.6.3-0.2.13

@sunsus, I set up my delegate outside the device ready.

For info, the iBeacon plugin in its previous version (before the update by petermetz this week) worked well with cordova 3.5.* (I don't remember the exact version). After updating cordova to 3.6., the plugin in its previous version did stop to work. :(

from cordova-plugin-ibeacon.

Eimji avatar Eimji commented on May 26, 2024

OK I resolved the issue by removing [self.queue addOperationWithBlock:^{ in the function didChangeAuthorizationStatus

I don't know why we need this queue, but the plugin works now very very very well for my app.

Good luck for you :)

Thanks for petermetz for the plugin

from cordova-plugin-ibeacon.

Eimji avatar Eimji commented on May 26, 2024

@petermetz, could you rename didChangeAuthorizationStatus: function(status) with pluginResult instead of status, it is very confusing if we don't take time to look into your code.

from cordova-plugin-ibeacon.

xtrembaker avatar xtrembaker commented on May 26, 2024

Hello !

I'm facing the exact same issue as everyone on a brand new project (no plugin except this one).

  • Getting "WARNING did not receive delegate ready callback from DOM after 30.000000 seconds" in the XCode Console log
  • Nothing shows up in the DOM as it should from the logToDom() function.

Also I've tried waht @Eimji says about remove the "addOperationWithBlock" stuff, but it didn't help ...

@petermetz I've run your test runner with dart and it shows effectively lot of errors. Mostly saying "Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL".
I'd like to send you all the logs throw by jasmine, what would be the best canal to send it to you ? Here's a pastebin : http://pastebin.com/Y5rcLHXw

my Configuration

  • OS X Maverick 10.9.5
  • XCode 6.1
  • PhoneGap 3.5.0-0.2.4
  • iBeacon Plugin v3.1.2
  • Running app on an iPad 3rd generation using IOS 8.0.2

from cordova-plugin-ibeacon.

mrtree1 avatar mrtree1 commented on May 26, 2024

@xtrembaker I notice you say you're on 3.1.1. Have you tried 3.1.2, which has a small but significant config fix?

@Eimji If it's a problem with the queuing it would be good to know why the queue is not starting for this framework. The queuing is so the events passed back are guaranteed to be in order on a single thread, so it's there for good reason.

from cordova-plugin-ibeacon.

xtrembaker avatar xtrembaker commented on May 26, 2024

@mrtree1 I checkout this morning the iBeacon plugin from its Git's master branch. So I guess I'm on the 3.1.2 version. Information I gave was coming from the CHANGELOG file which seems obviously not up to date.

from cordova-plugin-ibeacon.

mrtree1 avatar mrtree1 commented on May 26, 2024

@xtrembaker the definitive release list is https://github.com/petermetz/cordova-plugin-ibeacon/releases The changelog file is a relatively recent addition, which I clearly forgot to update for 3.1.2

If someone sends in a github link or a zip of a very basic demo app with the problem I'll take a look at it. Otherwise we're really relying on people using the Ionic framework to solve the problem and send in a pull request.

from cordova-plugin-ibeacon.

borislavb avatar borislavb commented on May 26, 2024

I have the same problem with my Ionic project.

To make sure it was not my mistake, I downloaded the latest version of Quickstart project, tried it on iPhone 6 with iOS 8.0.2, and got the same error.

Cordova is the latest one, Xcode 6.0.1

from cordova-plugin-ibeacon.

digiclick74 avatar digiclick74 commented on May 26, 2024

I have the same problem with a project ad hoc.
I use
the last version of cordova 4.0.0
Xcode 6.1Build version 6A1052d
iphone 4s with IOS 8.1
The ranging call works, there's only problem on monitoring.
The same project build for Android works great.

from cordova-plugin-ibeacon.

psimondk avatar psimondk commented on May 26, 2024

Have anyone gotten the Quickstart to work with the latest versions of Xcode, Cordova and Ionic?

Or put another way. What are the known good configuration for this excellent library?

Seasons greetings ... 💯

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on May 26, 2024

The quick start project received an update today. It now once again works with the latest version of the plugin. Please have a go with that and see if it works.

from cordova-plugin-ibeacon.

xorox avatar xorox commented on May 26, 2024

I'm still getting the same error when I install, build and run the quickstart project:
2016-03-06 12:35:31.159 Cordova Proximity Quickstart[4071:1512995] Resetting plugins due to page load. 2016-03-06 12:35:31.377 Cordova Proximity Quickstart[4071:1512995] Finished load of: file:///var/mobile/Containers/Bundle/Application/7409CA44-8F7B-40C8-BE9E-04A91534E2AE/Cordova%20Proximity%20Quickstart.app/www/index.html 2016-03-06 12:35:31.420 Cordova Proximity Quickstart[4071:1512995] *** Assertion failure in -[CLLocationManager setAllowsBackgroundLocationUpdates:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreLocationFramework/CoreLocation-1861.0.23/Framework/CoreLocation/CLLocationManager.m:605 2016-03-06 12:35:31.420 Cordova Proximity Quickstart[4071:1512995] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInternalInconsistencyException> Invalid parameter not satisfying: !stayUp || CLClientIsBackgroundable(internal->fClient) 2016-03-06 12:35:31.430 Cordova Proximity Quickstart[4071:1512995] didChangeAuthorizationStatus 2016-03-06 12:35:31.430 Cordova Proximity Quickstart[4071:1512995] Invalid callback id received by sendPluginResult

Any ideas here?

from cordova-plugin-ibeacon.

05bca054 avatar 05bca054 commented on May 26, 2024

Accessing variable in ionic V2?

I want to dynamically update value of distance variable whenever didRangeBeaconInRegion called but unable to access this variable in this method as given in code below!

export class UserPage {
    constructor(authservice, navcontroller) {
        this.service = authservice;
        this.nav = navcontroller;
        this.distance = 0;    
   }
   getDistance(){
        delegate.didRangeBeaconsInRegion = function (pluginResult) {
              this.distance=pluginResult.beacons[0].rssi;
        };
   }
}

How can i bind view value into didRangeBeaconsInRegion function or can i tried by passing one extra params but it wont work like this delegate.didRangeBeaconsInRegion = function (pluginResult,this.distance)

Any help is appriciate

from cordova-plugin-ibeacon.

peterswallow avatar peterswallow commented on May 26, 2024

@05bca054 (this doesn't relate to the original issue but here you go anyway...

For Ionic2 (which uses ES6) you need to declare the anonymous function using "=>"

delegate.didRangeBeaconsInRegion = (pluginResult) => {
              this.distance=pluginResult.beacons[0].rssi;
        };

See my StackOverflow question for more detail... http://stackoverflow.com/q/37838623/177664

from cordova-plugin-ibeacon.

mustafal avatar mustafal commented on May 26, 2024

hello @petermetz ,

I am using your plugin in one of my ionic project for scanning the beacons.
here is my code.

` // Request permission to use location on iOS
this.ibeacon.requestAlwaysAuthorization();
// create a new delegate and register it with the native layer
let delegate = this.ibeacon.Delegate();
this.ibeacon.setDelegate(delegate)

// Subscribe to some of the delegate's event handlers

delegate.didEnterRegion().subscribe((pluginResult: IBeaconPluginResult) => {
  console.log("didEnterRegion: ", pluginResult);
});

delegate.didExitRegion().subscribe((pluginResult: IBeaconPluginResult) => {
  console.log("didExitRegion: ", pluginResult);
});

console.log(`Creating BeaconRegion with UUID of: `, this.uuid);
const beaconRegion = this.ibeacon.BeaconRegion(
  "nullBeaconRegion",
  this.uuid,
  1,
  1
);

this.ibeacon
  .startMonitoringForRegion(beaconRegion)
  .then(
    () => console.log("Native layer recieved the request to monitoring"),
    (error: any) =>
      console.error("Native layer failed to begin monitoring: ", error)
  );

this.ibeacon
  .startRangingBeaconsInRegion(beaconRegion)
  .then(() => {
    console.log(`Started ranging beacon region: `, beaconRegion);
  })
  .catch((error: any) => {
    console.error(`Failed to start ranging beacon region: `, beaconRegion);
  });

delegate
  .didRangeBeaconsInRegion()
  .subscribe(
    (pluginResult: IBeaconPluginResult) =>
      console.log(
        "didRangeBeaconsInRegion: ",
        JSON.stringify(pluginResult)
      ),
    (error: any) => console.error(`Failure during ranging: `, error)
  );
delegate
  .didStartMonitoringForRegion()
  .subscribe(
    (pluginResult: IBeaconPluginResult) =>
      console.log("didStartMonitoringForRegion: ", pluginResult),
    (error: any) =>
      console.error(`Failure during starting of monitoring: `, error)
  );`

I had a beacon near my mobile but also there is no beacons are viewed in log
here is my log.
didRangeBeaconsInRegion: {"eventType":"didRangeBeaconsInRegion","region":{"identifier":"nullBeaconRegion","uuid":"fb9203b5-7115-110b-e75b-f9f18fc7149f","major":"1","minor":"1","typeName":"BeaconRegion"},"beacons":[]}

please help me out in this.

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on May 26, 2024

@mustafal It's kinda hard to tell but I'd double check if the permissions in XCode are set up properly. Also would verify from the native layer logs if the beacons are getting picked up at all (if not, then there is nothing the plugin or I can do to help unless you fix that first)

from cordova-plugin-ibeacon.

mustafal avatar mustafal commented on May 26, 2024

@petermetz
Thanks for your reply man
But i am using it on an android devices and in the linux operating system.
So please correct me if I am doing something wrong.
In iOS i don't have an idea what to do.

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on May 26, 2024

@mustafal My suggestion about checking the native logs still applies regardless of mobile OS. Also permissions could still be double checked but on Android you have to do it on the phone's notifications settings (I'm not sure how the latest Android manages it but should be simple enough to find the app specific permissions and check them).

from cordova-plugin-ibeacon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.