evothings / phonegap-estimotebeacons

This repository is no longer maintained - new maintainer is welcome!
MIT License
338 stars 178 forks source link

Build errors: ARC Semantic Issue #1

Closed jorditarrida closed 10 years ago

jorditarrida commented 10 years ago

Hi, We are trying to build a Cordova app using your plugin but at build time we get the following errors:

/projects/helloworld1/helloworld1/Plugins/EstimoteBeacons.m:248:35: error: no visible @interface for 'ESTBeacon' declares the selector 'writeBeaconFrequency:withCompletition:'
            [self.connectedBeacon writeBeaconFrequency:[frequency shortValue] withCompletition:^(unsigned int value, NSError *error) {
             ~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/projects/helloworld1/helloworld1/Plugins/EstimoteBeacons.m:299:35: error: no visible @interface for 'ESTBeacon' declares the selector 'writeBeaconPower:withCompletition:'
            [self.connectedBeacon writeBeaconPower:powerLevel withCompletition:^(unsigned int value, NSError *error) {
             ~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/projects/helloworld1/helloworld1/Plugins/EstimoteBeacons.m:319:31: error: no visible @interface for 'ESTBeacon' declares the selector 'updateBeaconFirmwareWithProgress:andCompletition:'
        [self.connectedBeacon updateBeaconFirmwareWithProgress:^(NSString *value, NSError *error) {
         ~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Is there anything we are doing wrong? Or is it an issue? Also, could you provide details on how is the plugin used? Thanks for your help, Jordi

kdzwinel commented 10 years ago

Hi! I'm new to all this but that's what I do to build my app ATM:

Hope this helps!

kdzwinel commented 10 years ago

As for the usage - I haven't written any official docs yet as this is still in progress. But the basic usage is:

   // start looking for beacons
   window.EstimoteBeacons.startRangingBeaconsInRegion(function () {
        //every now and then get the list of beacons in range
        setInterval(function () {
            window.EstimoteBeacons.getBeacons(function (data) {
                //do something cool with the list of beacons
            });
        }, 1000);
    });
kdzwinel commented 10 years ago

OK, so I double checked this and you are right, there was a problem with my code. Estimote SDK was recently updated and some names were changed - that's why you got an error (I haven't seen that because I was still using old version of SDK). Anyway I just pushed a fix: https://github.com/kdzwinel/phonegap-estimotebeacons/commit/89c5631daa381705b02e8a550350d550981c6714 . Let me know if this helps so I can close this issue.

jorditarrida commented 10 years ago

Wow, thanks for your quick answers. I am still working on it but will definitely let you know whether it works or not. Thanks for your help :) Jordi

kdzwinel commented 10 years ago

No problem, I didn't know that anyone will start playing with this so fast. I have updated the README with some random, and hopefully useful, knowledge about the plugin.

jorditarrida commented 10 years ago

Awesome, it seems to be working now. Thanks again for all your help, and also for updating the docs. Cheers :) Jordi

kdzwinel commented 10 years ago

Glad to hear that!