I'm working on a location related project. I found that iOS has iBeacon which can help the app to get the location data. I want to know if iOS Safari does have the access to it? Or any other similar bluetooth device which can be accessed?
-
1No, there is no access to Core Location Beacon regions (iBeacon) or Core Bluetooth through javascript. You can access GPS location with user permission– Paulw11Jan 28, 2016 at 22:01
-
I mean Javascript in the Safari browser (as this is the context of this question).– Paulw11Jan 28, 2016 at 22:03
-
I search apple developer doc.i don't find reference about developing Safari Extensions for IOS– NinjaDeveloperJan 28, 2016 at 22:08
-
iOS will never support this because Apple won't implement any standard that will make web apps compete with native apps where they can take 30% off all earnings. So the whole progess of the web will stall because of this if no goverment will intervene.– RoelDec 17, 2020 at 10:00
2 Answers
Not yet. There is a proposal in W3C for a "web-bluetooth" specification which has been partly implemented in the chrome , opera and chrome-for-android browsers, although they need to be activated by the users in a somewhat convoluted manner. Like all these things, it'll take time for the committees to spin their wheels and for the browser makers to decide if they want to support it , and then implement it.
MDN docs: https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API
-
4iOS will never support this because Apple won't implement any standard that will make web apps compete with native apps where they can take 30% off all earnings. So the whole progess of the web will stall because of this if no goverment will intervene.– RoelDec 17, 2020 at 9:59
Apple don't have this built in to Safari (yet), however there is a Web Browser app called WebBLE that implements 'Web Bluetooth' mentioned by Shayne.
Currently the app only supports a subset of the standard, but it's more than enough for most tasks. It's also Open Source so you could add it to a WebView in your own app if needed.
Having said all that, currently I don't believe Web Bluetooth supports accessing Advertising data - so while you can connect to Bluetooth LE devices and interact with them, you may not be able to get the actual Advertisements (which is kind of the point of iBeacon).