Git Product home page Git Product logo

Comments (7)

petermetz avatar petermetz commented on June 12, 2024

Not at all. It should work smoothly if you pass in null for major and minor.

Are you sure you are on the latest version of the code?
Can you please elaborate on the error that is being thrown? Is it a Javascript error on an Objective-C one?

Peter

from cordova-plugin-ibeacon.

schickling avatar schickling commented on June 12, 2024

Well, to be honest, I didn't try to pass null as an argument. I just didn't pass the minor or major parameter at all.

from cordova-plugin-ibeacon.

schickling avatar schickling commented on June 12, 2024

I just tried to pass null with the following code:

var beacon = new window.IBeacon.CLBeaconRegion(uuid, null, null, identifier);

I now get the following error:

screenshot 2014-05-02 23 00 44

PS: When I omit the minor / major parameter a JS error gets thrown.

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on June 12, 2024

It was a bug indeed in the code. Huge thanks for the detailed explanation of the problem!
The issue should be fixed by 0e98d01 . Please let me know if it resolved the issue for you as well.

Regarding the PS:
If you are omitting it like this:
var beacon = new window.IBeacon.CLBeaconRegion(uuid);
Then it fails because the identifier is still a mandatory parameter, so the error being thrown is intended.
If that's not how you omitting the major/minor parameters, let's talk more about that case as well.

Peter

from cordova-plugin-ibeacon.

schickling avatar schickling commented on June 12, 2024

Well I think it would be worth a breaking API change and alter the order of the arguments to be really able to omit the minor/major params. Would be more convenient I guess.

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on June 12, 2024

Thanks for the suggestion. I reconsidered it and you are right.

The breaking change will be part of version 2.

from cordova-plugin-ibeacon.

schickling avatar schickling commented on June 12, 2024

Awesome! 👍

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.