Skip to content

Commit 8daa86d

Browse files
committed
Removed BT from documentation
1 parent a0a38e8 commit 8daa86d

File tree

1 file changed

+10
-78
lines changed

1 file changed

+10
-78
lines changed

README.md

Lines changed: 10 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<p align="center" >★★ <b>Star our github repository to help us!</b> ★★</p>
1313

1414
# SwiftLocation
15-
SwiftLocation is a lightweight library you can use to monitor locations, make reverse geocoding (both with Apple and Google's services) monitor beacons and do beacon advertising.
15+
SwiftLocation is a lightweight library you can use to monitor locations, make reverse geocoding (both with Apple and Google's services) and more!
1616
It's really easy to use and it's compatible both with Swift 2.2, 2.3 and 3.0.
1717

1818
★★ Star our GitHub repository to help us! ★★
@@ -24,6 +24,11 @@ Pick the right version:
2424
- Old/Unsupported **Swift 2.3** branch is [here](https://github.com/malcommac/SwiftLocation/tree/feature/swift2.3).
2525
- Old/Unsupported **Swift 2.0** branch is [here](https://github.com/malcommac/SwiftLocation/tree/swift-2.0)
2626

27+
### Bluetooth Support
28+
Bluetooth support was removed temporary since 1.2.0.
29+
We will restore it later or in another subspecs/library.
30+
If you are using BT monitoring please use 1.1.1 version from CocoaPods.
31+
2732
Main features includes:
2833

2934
- **Auto Management of hardware resources**: SwiftLocation turns off hardware if not used by our observers. Don't worry, we take care of your user's battery usage!
@@ -32,8 +37,6 @@ Main features includes:
3237
- **Reverse geocoding** (from address string/coordinates to placemark) using both Apple and Google services (with support for API key)
3338
- **GPS-less location fetching** using network IP address
3439
- **Geographic region** monitoring (enter/exit from regions)
35-
- **Beacon Family and Beacon** monitoring
36-
- **Set a device to act like a Beacon** (only in foreground)
3740

3841
### Pre-requisites
3942

@@ -44,7 +47,7 @@ If you need background monitoring you should specify ```NSLocationAlwaysUsageDes
4447

4548
### SwiftLocation in your next big project? Tell it to me!
4649

47-
I'm collecting all the apps which uses SwiftLocation to manage beacon or location. If you are using SwiftLocation in your project please fill a PR to this file or send an email to hello@danielemargutti.com.
50+
I'm collecting all the apps which uses SwiftLocation to manage location. If you are using SwiftLocation in your project please fill a PR to this file or send an email to hello@danielemargutti.com.
4851

4952
Documentation
5053
-------
@@ -55,8 +58,6 @@ Documentation
5558
* **[Reverse Address/Coordinates to CLPlacemark](#reverseAddressSaample)**
5659
* **[Monitor Interesting Visits](#interestingVisitsSample)**
5760
* **[Monitor Geographic Regions](#monitorGepRegSample)**
58-
* **[Monitor Beacons & Beacon Families](#monitoriBeacon)**
59-
* **[Act like a Beacon](#actLikeiBeacon)**
6061
* **[Observe CLLocationManager Auth Events](#observeCLLocationManagerEvents)**
6162

6263
<a name="monitoruserlocation" />
@@ -223,78 +224,6 @@ Location.getInterestingPlaces { newVisit in
223224
}
224225
```
225226

226-
([Documentation ↑](#documentation))
227-
<a name="monitorGepRegSample" />
228-
## Monitor Geographic Regions
229-
You can easily to be notified when the user crosses a region based boundary.
230-
You use region monitoring to detect boundary crossings of the specified region and you use those boundary crossings to perform related tasks. For example, upon approaching a dry cleaners, an app could notify the user to pick up any clothes that had been dropped off and are now ready.
231-
232-
SwiftLocation offers to you a simple method called ```monitor()``` to get notified about these kind of events:
233-
234-
```swift
235-
// Define a geographic circle region
236-
let centerPoint = CLLocationCoordinate2DMake(0, 0)
237-
let radius = CLLocationDistance(100)
238-
do {
239-
// Attempt to monitor the region
240-
let request = try Beacons.monitor(geographicRegion: centerPoint, radius: radius, onStateDidChange: { newState in
241-
// newState is .Entered if user entered into the region defined by the center point and the radius or .Exited if it move away from the region.
242-
}) { error in
243-
// something bad has happened
244-
}
245-
} catch let err {
246-
// Failed to initialize region (bad region, monitor is not supported by the hardware etc.)
247-
print("Cannot monitor region due to an error: \(err)")
248-
}
249-
```
250-
251-
Usually you can ```pause()```/```start()``` or ```cancel()``` the request itself; just keep a reference to it.
252-
253-
([Documentation ↑](#documentation))
254-
<a name="monitoriBeacon" />
255-
## Monitor Beacons
256-
257-
You can easily to be notified when the user crosses a region defined by a beacon or get notified when users did found one or more beacons nearby.
258-
259-
Just use ```monitor()``` function:
260-
261-
```swift
262-
let b_proximity = "00194D5B-0A08-4697-B81C-C9BDE117412E"
263-
// You can omit major and minor to get notified about the entire beacon family defined by b_proximity
264-
let b_major = CLBeaconMajorValue(64224)
265-
let b_minor = CLBeaconMinorValue(43514)
266-
267-
do {
268-
// Just create a Beacon structure which represent our beacon
269-
let beacon = Beacon(proximity: proximity, major: major, minor: minor)
270-
// Attempt to monitor beacon
271-
try Beacons.monitor(beacon: beacon, events: Event.RegionBoundary, onStateDidChange: { state in
272-
// events called when user crosses the boundary the region defined by passed beacon
273-
}, onRangingBeacons: { visibleBeacons in
274-
// events is fired countinously to get the list of visible beacons (with observed beacon) nearby
275-
}, onError: { error in
276-
// something went wrong. request is cancelled.
277-
})
278-
} catch let err {
279-
// failed to monitor beacon
280-
}
281-
```
282-
([Documentation ↑](#documentation))
283-
<a name="actLikeiBeacon" />
284-
## Act like a Beacon
285-
286-
You can set your device to act like a beacon (this feature works only in foreground due to some limitations of Apple's own methods).
287-
288-
Keep in mind: advertising not works in background.
289-
290-
```swift
291-
let request = Beacons.advertise(beaconName: "name", UUID: proximity, major: major, minor: minor, powerRSSI: 4, serviceUUIDs: [])
292-
```
293-
294-
Use ```cancel()``` on ```request``` to stop beacon advertise.
295-
296-
([Documentation ↑](#documentation))
297-
298227
## Observe CLLocationManager Auth Events
299228
<a name="observeCLLocationManagerEvents" />
300229
You can observe CLLocationManager authorization changes events by subscribing the ```.onAuthorizationDidChange()``` method.
@@ -316,6 +245,9 @@ request.onAuthorizationDidChange = { newStatus in
316245
Changes
317246
-------
318247

248+
### Version 1.2.0 (2017/02/20):
249+
- Removed temporary Bluetooth support (use 1.1.1 as temporary workaround).
250+
319251
### Version 1.0.5 (2016/09/09):
320252
- Request's cancel() function now has error as optional argument
321253
- **This is the last Swift 2.2 version**

0 commit comments

Comments
 (0)