evothings / phonegap-estimotebeacons

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

Support for latest SDK #6

Closed git2sunder closed 10 years ago

git2sunder commented 10 years ago

I followed the instructions and getting these errors. Can someone guide me in the right direction?

image

clecodes commented 10 years ago

You are using the latest version of the Estimote SDK. In the 1.2.0 they flattened the beacon properties, removing the ibeacon property... I have a pull request in the works to work with the latest SDK, but it's not yet ready for public consumption.

I suggest trying the 1.1.0 Estimote SDK https://github.com/Estimote/iOS-SDK/tree/1.1.0

git2sunder commented 10 years ago

Thanks for the speedy response! I really do appreciate it. Most of the errors disappeared except these two

image

kdzwinel commented 10 years ago

Hi! Apologies for these errors, Estimote is making breaking changes all the time and I'm no longer working with beacons on regular basis. @nezencreation - I'll really appreciate your pull request :exclamation:

Latest SDK version I worked with is: https://github.com/Estimote/iOS-SDK/commit/afd2dc2134d72b1c175b9c241a64db14456ad02c . You can try doing git checkout afd2dc2134d72b1c175b9c241a64db14456ad02c.

git2sunder commented 10 years ago

Thanks. I still receive this error but proceeding by commenting out that code

image

git2sunder commented 10 years ago

Also, the app runs fine when I install on device but the screen doesnt update even though the estimote native app is able to see the beacons and update. I used your index.html and your index.js

kdzwinel commented 10 years ago

What device are you testing on? I'll check this tomorrow - I don't have access to beacons right now.

git2sunder commented 10 years ago

Thanks. I am using iPhone 4S.

kdzwinel commented 10 years ago

I wasn't able to find the guy who has the beacons in the office today. Therefore, I was unable to test if provided example works as it should. I'll get him tomorrow though. However, I was able to build the project with no errors. Make sure that you really got the 'afd2dc2134d72b1c175b9c241a64db14456ad02c' version of the SDK.

I'm using:

git2sunder commented 10 years ago

Hello, Here is my entire folder . The code compiles and runs but the screen doesnt update even with the beacons

https://www.dropbox.com/s/vmk5u2edmgjicqy/sample.zip

catcha10 commented 10 years ago

Hi All, I have the exactly same issues with @jacaranda. May I know how to solve this issues? Thanks

kdzwinel commented 10 years ago

For unknown reasons phonegap creates invalid config.xml. Try adding this code to config.xml:

<feature name="EstimoteBeacons">
    <param name="ios-package" value="EstimoteBeacons" />
    <param name="onload" value="true" />
</feature>

EDIT: Yep, it's a PhoneGap bug: https://issues.apache.org/jira/browse/CB-4971 . There is nothing I can do to fix that, but since I've already opened the example I'll try to make it a bit better. Let me know if fix mentioned above works for you.

kdzwinel commented 10 years ago

I've just updated the example. Try it out - it's a bit more complex and, hopefully, more useful.

git2sunder commented 10 years ago

Just tried and it builds fine but the page sits there with the "Searching for beacons" message. I think I will scrap this folder and try with Cordova instead of phonegap?

kdzwinel commented 10 years ago

Are you sure that you have bluetooth on? You should have seen an iOS dialog asking for additional permissions (location?) when you first opened the app, have you seen it?

catcha10 commented 10 years ago

Hi All,

Im still have issues to debug it,

screen shot 2013-12-18 at 12 29 54 pm

Semantic Issue - Incompatible block pointer types sending 'void' (unsigned int, ..... Semantic Issue - Property 'frequency' not found on object of type 'ESTBeacon *'

Anyone know how to fix it? Thanks in advance.

catcha10 commented 10 years ago

Hi All,

Appreciate above guides, I have succeed builds the app , but have same issues like @jacaranda the page sits there with the "Device is ready.Searching for beacons" message. Have checked my ipad device bluetooth is on. Didnt see any iOS dialog asking for additional permissions (location?) when 1st time launch my app.

Debug the js codes, window.EstimoteBeacons.startRangingBeaconsInRegion(function... is not firing. Anyone can share how to fix it? Thanks in advance.

kdzwinel commented 10 years ago

You should get this dialog when first running the app. Additionaly, you should see your app in the Privacy->Location Services (something like this). Try playing with these settings.

Some other things to check:

git2sunder commented 10 years ago

Thanks for helping. Here is what I am seeing

  1. With the estimote demo and my own native demo, the beacon functionality is working great.
  2. I dont see the location services request when I launch the app
  3. The phonegap sample app is not in the privacy location services
  4. Here is the xcode console

2013-12-18 11:36:32.330 sample[1806:60b] Multi-tasking -> Device: YES, App: YES 2013-12-18 11:36:32.390 sample[1806:60b] Unlimited access to network resources 2013-12-18 11:36:33.454 sample[1806:60b] Resetting plugins due to page load. 2013-12-18 11:36:33.728 sample[1806:60b] Finished load of: file:///var/mobile/Applications/A86BDD8F-F0CB-49C7-9774-0A6B6C6B4629/sample.app/www/index.html

Can I please request you to upload a sample of a fully built out phonegap project with your code sample? I think we are having issues because of phonegap.

kdzwinel commented 10 years ago

Sure, here it is. Please let me know if you find out anything, this is really strange.

Your xcode console, unfortunately, doesn't say anything interesting. I wonder why you haven't got 'location permission' dialog. It seems like phonegap plugin wasn't included.

catcha10 commented 10 years ago

Thanks @kdzwinel , i tried to run your code is working fine. But I follow exactly the same file structure as your code to my project,

I able to see first launch 'location permission' notification. After that , the app seem hang, from the xcode console im only can see

2013-12-24 17:42:49.535 Frontdesk[1094:60b] Multi-tasking -> Device: YES, App: YES 2013-12-24 17:42:49.673 Frontdesk[1094:60b] [CDVTimer][estimotebeacons] 4.041016ms 2013-12-24 17:42:49.676 Frontdesk[1094:60b] [CDVTimer][TotalPluginStartup] 7.117987ms 2013-12-24 17:42:50.201 Frontdesk[1094:60b] Resetting plugins due to page load. 2013-12-24 17:42:50.410 Frontdesk[1094:60b] Finished load of: file:///var/mobile/Applications/E3DE93A5-467B-4182-85AE-73A207BFA623/Frontdesk.app/www/index.html (lldb)

Do you have any ideas , what's wrong or missing in my project?

Thanks and appreciate.

kdzwinel commented 10 years ago

So, my project files work and you are unable to build the same thing? Try finding the differences between what you've got and what I've got. I have no idea what might be wrong.

kdzwinel commented 10 years ago

Plugin was updated to work with SDK 1.2 - I'm closing this issue.