iOS
Using Eddystone beacon in iOS swift. How is the experience?

Using Eddystone beacon in iOS swift. How is the experience?

This my experience regarding using Eddystone beacon.

I purchased eddystone beacon from ebay and tried to integrate with my iOS application. I used this beacon to identify certain location. For example, I wanted to know if the user actually did visited certain location with the help of the mobile application. And to do so, I required some hardware to connect and the app would know about it. And the solution to this was using a beacon.

I integrated beacon and made an app which actually can detect a unique beacon and was able to perform what I was looking for. Everything was done and the app was ready to use the feature I was looking for. But at testing phase this is what happened.

My friend lunched the app and the app was not able to detect the beacon. And because of this, whole app feature was not accessible by my tester. I was like, what??? What just happened, why they were not able to detect beacon? I went through my code and tested in my mobile again, and it was working well. Then I though this might be because of beacon detecting related code issue.

I gone through the beacon searching code and tried found out the issue. The issue was this time, the UUID return by the code is different of mine device then others. I was again what??? How could UUID of beacon be different to every different app?

I started searching on this topic and later I found out that this UUID is actually not a UUID generated within beacon rather it is random UUID generated by Apple core bluetooth library which will most probably be the same even if you delete you app and install again. I was not able to get different UUID for my iPhone. Every time, I delete and install the app and print the UUID, I would get the same UUID from beacon. So, I was sure ok this must the unique UUID generated from Beacon. But I was wrong.

Actually, Apple in terms to protects product detail, they hide Beacon Mac address or unique id of the device. This is good in terms of security. And guys, it is totally impossible to get unique device ID / Mac Address of beacon or any other bluetooth device in iOS. However, it is completely possible to get Mac address in Android OS. You can check on that. But if you are looking for creating app for both iOS and Android which obviously everyone does, it is not a good idea to go and use Mac ID in Android.

So what might be the solution?

Well, my suggestion would be, if you are trying to something like similar to mine, don’t buy eddystone beacon. Basically you will get 2 type of beacon, eddystone beacon and Ibeacon. Eddystone beacon is only to broadcast URL. And Ibeacon broadcast UUID, major and minor number. This way you will be able to identify a unique device as per requirement.

So, go and buy IBeacon but not eddystone beacon. If you want to make visit some website once beacon is detected then it is great to go and use eddystone beacon. This might be helpful if you are trying to use in product or offers for shops or any other related industry. I hope you got it.

However, you can use eddystone beacon as a unique device scanning approach as well. This might require API integration where we will send UUID generated by apple and will send request to the server for approving that UUID. Once server approves this UUID, we can let user to perform feature.

Hope this is helpful to you.

Thank you

Happy coding.

Leave a Reply