Skip to content

Commit 8df37c3

Browse files
committed
Merge branch 'release/1.1.1'
2 parents 07fbd20 + 3039f8f commit 8df37c3

File tree

13 files changed

+100
-55
lines changed

13 files changed

+100
-55
lines changed

.gitignore

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,27 @@
1-
.DS_Store
1+
# Created by https://www.gitignore.io/api/xcode
2+
3+
### Xcode ###
4+
# Xcode
5+
#
6+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
7+
8+
## Build generated
9+
build/
10+
DerivedData/
11+
12+
## Various settings
13+
*.pbxuser
14+
!default.pbxuser
15+
*.mode1v3
16+
!default.mode1v3
17+
*.mode2v3
18+
!default.mode2v3
19+
*.perspectivev3
20+
!default.perspectivev3
21+
xcuserdata/
22+
23+
## Other
24+
*.moved-aside
25+
*.xccheckout
26+
*.xcscmblueprint
27+

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Location.getLocation(withAccuracy: .Block, frequency: .OneShot, timeout: 50, onS
8484
}) { (lastValidLocation, error) in
8585
}
8686
// Sometimes in the future
87-
request.stop() // Stop receiving updates
87+
request.cancel() // Stop receiving updates
8888
request.pause() // Temporary pause events
8989
request.start() // Restart a paused request
9090
```
@@ -291,7 +291,7 @@ Keep in mind: advertising not works in background.
291291
let request = Beacons.advertise(beaconName: "name", UUID: proximity, major: major, minor: minor, powerRSSI: 4, serviceUUIDs: [])
292292
```
293293

294-
Use ```stop()``` on ```request``` to stop beacon advertise.
294+
Use ```cancel()``` on ```request``` to stop beacon advertise.
295295

296296
([Documentation ↑](#documentation))
297297

SwiftLocation.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'SwiftLocation'
3-
s.version = '1.1.0'
3+
s.version = '1.1.1'
44
s.license = 'MIT'
55
s.summary = 'Elegant Location Services and Beacon Monitoring in Swift'
66
s.homepage = 'https://github.com/malcommac/SwiftLocation'

SwiftLocation/SwiftLocation.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@
6868
08819F241CD51F9B00EFD938 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6969
08819F2F1CD51FA700EFD938 /* Commons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Commons.swift; path = ../../src/Commons.swift; sourceTree = "<group>"; };
7070
08819F301CD51FA700EFD938 /* HeadingRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HeadingRequest.swift; path = ../../src/HeadingRequest.swift; sourceTree = "<group>"; };
71-
08819F311CD51FA700EFD938 /* LocationManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LocationManager.swift; path = ../../src/LocationManager.swift; sourceTree = "<group>"; };
71+
08819F311CD51FA700EFD938 /* LocationManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; name = LocationManager.swift; path = ../../src/LocationManager.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
7272
08819F321CD51FA700EFD938 /* LocationRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LocationRequest.swift; path = ../../src/LocationRequest.swift; sourceTree = "<group>"; };
7373
08819F341CD51FA700EFD938 /* VisitRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = VisitRequest.swift; path = ../../src/VisitRequest.swift; sourceTree = "<group>"; };
74-
210301201D6CA7BE00A0A38C /* BeaconsManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BeaconsManager.swift; path = ../../src/BeaconsManager.swift; sourceTree = "<group>"; };
74+
210301201D6CA7BE00A0A38C /* BeaconsManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; name = BeaconsManager.swift; path = ../../src/BeaconsManager.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
7575
210301221D6CBEF100A0A38C /* GeoRegionRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = GeoRegionRequest.swift; path = ../../src/GeoRegionRequest.swift; sourceTree = "<group>"; };
7676
210301241D6CD22F00A0A38C /* BeaconRegionRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BeaconRegionRequest.swift; path = ../../src/BeaconRegionRequest.swift; sourceTree = "<group>"; };
77-
210301261D6CDD2B00A0A38C /* BeaconAdvertiseRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BeaconAdvertiseRequest.swift; path = ../../src/BeaconAdvertiseRequest.swift; sourceTree = "<group>"; };
77+
210301261D6CDD2B00A0A38C /* BeaconAdvertiseRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; name = BeaconAdvertiseRequest.swift; path = ../../src/BeaconAdvertiseRequest.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
7878
213F85081D61C7FC00835DCA /* SwiftLocationDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftLocationDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7979
213F850A1D61C7FC00835DCA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
8080
213F850C1D61C7FC00835DCA /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -263,7 +263,7 @@
263263
isa = PBXProject;
264264
attributes = {
265265
LastSwiftUpdateCheck = 0730;
266-
LastUpgradeCheck = 0800;
266+
LastUpgradeCheck = 0810;
267267
ORGANIZATIONNAME = danielemargutti;
268268
TargetAttributes = {
269269
08819F121CD51F9B00EFD938 = {
@@ -437,7 +437,7 @@
437437
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
438438
GCC_WARN_UNUSED_FUNCTION = YES;
439439
GCC_WARN_UNUSED_VARIABLE = YES;
440-
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
440+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
441441
MTL_ENABLE_DEBUG_INFO = YES;
442442
ONLY_ACTIVE_ARCH = YES;
443443
SDKROOT = iphoneos;
@@ -483,7 +483,7 @@
483483
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
484484
GCC_WARN_UNUSED_FUNCTION = YES;
485485
GCC_WARN_UNUSED_VARIABLE = YES;
486-
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
486+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
487487
MTL_ENABLE_DEBUG_INFO = NO;
488488
SDKROOT = iphoneos;
489489
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -499,7 +499,7 @@
499499
isa = XCBuildConfiguration;
500500
buildSettings = {
501501
CLANG_ENABLE_MODULES = YES;
502-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
502+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
503503
DEFINES_MODULE = YES;
504504
DYLIB_COMPATIBILITY_VERSION = 1;
505505
DYLIB_CURRENT_VERSION = 1;
@@ -523,7 +523,7 @@
523523
isa = XCBuildConfiguration;
524524
buildSettings = {
525525
CLANG_ENABLE_MODULES = YES;
526-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
526+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
527527
DEFINES_MODULE = YES;
528528
DYLIB_COMPATIBILITY_VERSION = 1;
529529
DYLIB_CURRENT_VERSION = 1;

SwiftLocation/SwiftLocation.xcodeproj/xcshareddata/xcschemes/SwiftLocation.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "0810"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

SwiftLocation/SwiftLocation.xcodeproj/xcuserdata/danielemm.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
<key>orderHint</key>
1010
<integer>0</integer>
1111
</dict>
12+
<key>SwiftLocationDemo.xcscheme</key>
13+
<dict>
14+
<key>orderHint</key>
15+
<integer>1</integer>
16+
</dict>
1217
</dict>
1318
<key>SuppressBuildableAutocreation</key>
1419
<dict>
@@ -22,6 +27,11 @@
2227
<key>primary</key>
2328
<true/>
2429
</dict>
30+
<key>213F85071D61C7FC00835DCA</key>
31+
<dict>
32+
<key>primary</key>
33+
<true/>
34+
</dict>
2535
</dict>
2636
</dict>
2737
</plist>

SwiftLocation/SwiftLocationDemo/ViewController.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ class ViewController: UIViewController {
1616
override func viewDidLoad() {
1717
super.viewDidLoad()
1818

19-
var r = Location.getLocation(withAccuracy: .city, frequency: .continuous, timeout: nil, onSuccess: { (loc) in
20-
print("loc \(loc)")
21-
}) { (last, err) in
22-
print("err \(err)")
23-
}
24-
r.onAuthorizationDidChange = { newStatus in
25-
print("New status \(newStatus)")
26-
}
19+
// var r = Location.getLocation(withAccuracy: .city, frequency: .continuous, timeout: nil, onSuccess: { (loc) in
20+
// print("loc \(loc)")
21+
// }) { (last, err) in
22+
// print("err \(err)")
23+
// }
24+
// r.onAuthorizationDidChange = { newStatus in
25+
// print("New status \(newStatus)")
26+
// }
2727

2828
// // Do any additional setup after loading the view, typically from a nib.
2929
// let major = CLBeaconMajorValue(64224)
3030
// let minor = CLBeaconMinorValue(43514)
3131
// let proximity = "00194D5B-0A08-4697-B81C-C9BDE117412E"
32-
//
32+
//
3333
// print("Beacon monitoring started \(proximity) - maj=\(major), min=\(minor)")
34-
//
34+
//
3535
// do {
3636
// let beacon = Beacon(proximity: proximity, major: major, minor: minor)
3737
// try Beacons.monitor(beacon: beacon, events: Event.RegionBoundary, onStateDidChange: { state in

SwiftLocation/SwiftLocationTests/SwiftLocationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class SwiftLocationTests: XCTestCase {
2828

2929
func testPerformanceExample() {
3030
// This is an example of a performance test case.
31-
self.measureBlock {
31+
self.measure {
3232
// Put the code you want to measure the time of here.
3333
}
3434
}

src/BeaconAdvertiseRequest.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ open class BeaconAdvertiseRequest: NSObject, Request {
8080
}
8181
}
8282

83-
internal func dataToAdvertise() -> [String:AnyObject?] {
84-
let data: [String:AnyObject?] = [
85-
CBAdvertisementDataLocalNameKey : self.name as ImplicitlyUnwrappedOptional<AnyObject>,
83+
internal func dataToAdvertise() -> [String:Any] {
84+
let data: [String:Any] = [
85+
CBAdvertisementDataLocalNameKey : self.name as ImplicitlyUnwrappedOptional<Any>,
8686
CBAdvertisementDataManufacturerDataKey : self.region.peripheralData(withMeasuredPower: self.RSSIPower),
87-
CBAdvertisementDataServiceUUIDsKey : self.UUID as Optional<AnyObject>]
87+
CBAdvertisementDataServiceUUIDsKey : self.UUID]
8888
return data
8989
}
9090

0 commit comments

Comments
 (0)