diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 9c22433..6309ccd 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -111,7 +111,6 @@ DCEE854E62441E78FED15CC994497F61 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06E793A8549531332D1762623F08F9BF /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; E44CB801D05BAFC0BBF7956D9B966965 /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = 4606F71071333AEDF06D8E31389AECC9 /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; E5CCEF0B83F8272D10671C01AAE4FFA0 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA367A34E0B8C1B01749CCC12FD43C5 /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - E6F0176B0EF302B3EC8053F184EC6FD3 /* BackgroundTrackable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDDF585E0951226C31C2ECD03A98E555 /* BackgroundTrackable.swift */; }; E7CEE662A106BEB9A933FA34806D4518 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94B9FC85D7FEB2B0433347BA137CC7E1 /* QuickSelectedTestSuiteBuilder.swift */; }; E8652F66975CC3CC3D76693473A827CB /* URL+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3D11645B35A10BBA558B9BC99C1D340 /* URL+FileName.swift */; }; EBA52C16F42E42A1824D87C284F4A60C /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525B5EB32452EE8123EA3E65FDC81622 /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; @@ -157,12 +156,12 @@ 06E793A8549531332D1762623F08F9BF /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; 0938437A632858DECE67709CA620C995 /* Pods-SwiftBackgroundLocation_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftBackgroundLocation_Example.debug.xcconfig"; sourceTree = ""; }; 0B420A0E967EACA015B9CF21B2C491A8 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; - 0BC4F2CA1ACAB7C5DC246E5970464CA7 /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mach_excServer.c; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c; sourceTree = ""; }; + 0BC4F2CA1ACAB7C5DC246E5970464CA7 /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.c; name = mach_excServer.c; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c; sourceTree = ""; }; 0EED66AA8307680B1DFCC7DA151F9421 /* Pods-SwiftBackgroundLocation_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftBackgroundLocation_Example.release.xcconfig"; sourceTree = ""; }; 104135CFA58204DC8EBF1167E28F5206 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; 10FFD83D547B8B236BCBB6812BC65762 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; 117CC7EFB3EA03524DF8DEEC388E76C0 /* Pods-SwiftBackgroundLocation_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwiftBackgroundLocation_Tests-dummy.m"; sourceTree = ""; }; - 14537A5EC332D4F5F8A2D483B328CC37 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Nimble.modulemap; sourceTree = ""; }; + 14537A5EC332D4F5F8A2D483B328CC37 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Nimble.modulemap; sourceTree = ""; }; 15E2114ED8AE0D3C939FFE5084E2DAEC /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; 18CEB9B86795A0FDAA385DB81A49672B /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; 1AD0D67F0098C6695A93CAE9B27528F4 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; @@ -177,14 +176,14 @@ 2C14CA30770ECA99AC2E8582C5D3C4DB /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; 2D9DD9D6490CDC782AB0EBFF62EC7AEE /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; 2DEE1F436B68692319DE23FF7A16197E /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; - 3059EA73D0C624CC315FA2D88F56DDC3 /* Pods-SwiftBackgroundLocation_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-SwiftBackgroundLocation_Example.modulemap"; sourceTree = ""; }; + 3059EA73D0C624CC315FA2D88F56DDC3 /* Pods-SwiftBackgroundLocation_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-SwiftBackgroundLocation_Example.modulemap"; sourceTree = ""; }; 30707A1F3230E95AF8C214F2C51E3477 /* NSString+QCKSelectorName.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+QCKSelectorName.m"; path = "Sources/QuickObjectiveC/NSString+QCKSelectorName.m"; sourceTree = ""; }; 30778608352B15B9CFC7475AD8F932AB /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; 31F522E7A1E6B249CF89B55968863A58 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; 32343C8281B13DD7FE4F6D40BDF37C6A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32DF21EF8268E32D359CD23F2CF3EFE3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 33C4401213EBEC6BC1797D974E52767D /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; - 365AE900C5B32C9E99F1A4BA0665F0F4 /* Pods_SwiftBackgroundLocation_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwiftBackgroundLocation_Example.framework; path = "Pods-SwiftBackgroundLocation_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 365AE900C5B32C9E99F1A4BA0665F0F4 /* Pods_SwiftBackgroundLocation_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftBackgroundLocation_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 36F9E76E718B474FBEB8C1824AA1413A /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; 3C4303BFB4E9650BED838E7A865BA2D3 /* Pods-SwiftBackgroundLocation_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftBackgroundLocation_Example-acknowledgements.plist"; sourceTree = ""; }; 43369818D1B8E5A35EE1A2BB27649584 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -195,7 +194,7 @@ 4B7E39158C032742F5DB8A1F5F944A38 /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; 4C6329DD1EE75A68AA931A2192C28C69 /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; 4CB7405FEEEB4EF46BDC7FA5363F2FB8 /* Pods-SwiftBackgroundLocation_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftBackgroundLocation_Example-acknowledgements.markdown"; sourceTree = ""; }; - 4CDEE69E15A016DC4FF82C54137789BB /* Pods_SwiftBackgroundLocation_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwiftBackgroundLocation_Tests.framework; path = "Pods-SwiftBackgroundLocation_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CDEE69E15A016DC4FF82C54137789BB /* Pods_SwiftBackgroundLocation_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftBackgroundLocation_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4CEE6D090220683EB93ACD11A04038DD /* CwlCatchBadInstruction.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchBadInstruction.m; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m; sourceTree = ""; }; 4EE1F2D1C9D5935F6B6B5CC49C89E323 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; 4F0F33EFE650B5CE4774260C8F19455E /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; @@ -225,19 +224,19 @@ 89FA0F64A295DA19E4AEFD2AC4084076 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8BD3BF5EB0A249E68523B43B6402EA1C /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; 8C64DCE9D714CA88C06BDCC413FD3661 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; - 8C6970D3690E1A2CDE59773ECB38B810 /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Nimble.framework; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 91575283EB6BBAAC3E36688EDBF61ABF /* SwiftBackgroundLocation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SwiftBackgroundLocation.framework; path = SwiftBackgroundLocation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8C6970D3690E1A2CDE59773ECB38B810 /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 91575283EB6BBAAC3E36688EDBF61ABF /* SwiftBackgroundLocation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftBackgroundLocation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 91C1B940CAE99BBBBC563963CD22996B /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; 93900D131A2945A2BDADAC44D0F42BF2 /* Pods-SwiftBackgroundLocation_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftBackgroundLocation_Tests-umbrella.h"; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 93DE49C94C2B06B074C05D18D9034E22 /* BackgroundLocationManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackgroundLocationManager.swift; sourceTree = ""; }; 94B9FC85D7FEB2B0433347BA137CC7E1 /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; - 94E8694009E546156CCC9F94D05703CF /* SwiftBackgroundLocation.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = SwiftBackgroundLocation.modulemap; sourceTree = ""; }; + 94E8694009E546156CCC9F94D05703CF /* SwiftBackgroundLocation.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SwiftBackgroundLocation.modulemap; sourceTree = ""; }; 954B5272EA2120AA3260D71B6BEF8007 /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; 98BEFCA54D25BED3A87F8A8BC72FDE02 /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; 9A1A6140D854E14747C728C38BED1D84 /* SwiftBackgroundLocation-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftBackgroundLocation-prefix.pch"; sourceTree = ""; }; 9A4149CBE238527B194D1F9ABA8B1425 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; - 9AD041EED5C6A1B6A82C71C9E5AA3FE1 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Quick.modulemap; sourceTree = ""; }; + 9AD041EED5C6A1B6A82C71C9E5AA3FE1 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Quick.modulemap; sourceTree = ""; }; 9BB1FA4E1DD555F459E31D6ECB9DB70C /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h; sourceTree = ""; }; 9C33CF42AD6E1A448E98D4CAFB155DAA /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; 9C7B2E4FE5801A893DA4774DEC2C3985 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; @@ -260,10 +259,9 @@ BA22155F3C9AB9685BF4ED3A389D109A /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; BC3735170CDCA6A1C7E7D0E1876ED22B /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Sources/Nimble/Matchers/AsyncMatcherWrapper.swift; sourceTree = ""; }; BCBDD456B535FEADB8D72DB83652D74D /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; - BDDF585E0951226C31C2ECD03A98E555 /* BackgroundTrackable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackgroundTrackable.swift; sourceTree = ""; }; BE05FF5E6FC72D2287373D241DFBB6F2 /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; C12298FB0CC92BD3BD16C958F3718416 /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; - C3C0FB13919DE38281B727E66E7E7080 /* Pods-SwiftBackgroundLocation_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-SwiftBackgroundLocation_Tests.modulemap"; sourceTree = ""; }; + C3C0FB13919DE38281B727E66E7E7080 /* Pods-SwiftBackgroundLocation_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-SwiftBackgroundLocation_Tests.modulemap"; sourceTree = ""; }; C69EC1174FCE1660F05AF470B443E0E7 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Utils/Async.swift; sourceTree = ""; }; C7E5C9CD6DE12A0615BB5F68D0BE93AB /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; C81E409DD20CA59AA8A9A08E2B0B1B5F /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; @@ -278,7 +276,7 @@ D4C49419A94CF80DB86A9D5B881346F2 /* SwiftBackgroundLocation.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftBackgroundLocation.xcconfig; sourceTree = ""; }; D6A47E312B3885EF64B81BD590AD21B4 /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; D6C53CB242E67876DD3964EC5C775479 /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; - D87CB5D742D2E6C9F8F5DF05D3FA7A0A /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Quick.framework; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D87CB5D742D2E6C9F8F5DF05D3FA7A0A /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D88E38D7FB4C21244BAD93225CBA95D7 /* Pods-SwiftBackgroundLocation_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftBackgroundLocation_Tests-acknowledgements.markdown"; sourceTree = ""; }; D9571DDE390A0012143BA7AAAE1D39DC /* NSString+QCKSelectorName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+QCKSelectorName.h"; path = "Sources/QuickObjectiveC/NSString+QCKSelectorName.h"; sourceTree = ""; }; DA2A27C4B8DBD796FF529A57FD25B53F /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; @@ -382,7 +380,6 @@ DDB66FCF4920E93C91641504EBEC78D1 /* XCTestSuite+QuickTestSuiteBuilder.m */, 9F8FF48BA1B459080AB7C8E578367A73 /* Support Files */, ); - name = Quick; path = Quick; sourceTree = ""; }; @@ -462,14 +459,12 @@ children = ( 2153CB4BA68F6BBF4A5F04C5DA19CA6F /* BackgroundLocationCache.swift */, 93DE49C94C2B06B074C05D18D9034E22 /* BackgroundLocationManager.swift */, - BDDF585E0951226C31C2ECD03A98E555 /* BackgroundTrackable.swift */, A5F0D1CFEBB3AFC13B5F500C6040E0B0 /* CLLocationCoordinate2D+Distance.swift */, 665D21650E00FE0180FC50E163C01317 /* Constants.swift */, D33DBE9303A686B2190C116CEEB49BC2 /* Result.swift */, EBFC87D4C05501288774502A8C8839BA /* SettingsAlertController.swift */, 758120F184062778C5C60711BA931C63 /* TrackingHeadingLocationManager.swift */, ); - name = Classes; path = Classes; sourceTree = ""; }; @@ -487,7 +482,6 @@ children = ( 54919D0D262123CC7D47AB167640D26D /* Classes */, ); - name = SwiftBackgroundLocation; path = SwiftBackgroundLocation; sourceTree = ""; }; @@ -572,7 +566,6 @@ 60A4CF4AA34D746BEB8F62EA84D9F202 /* XCTestObservationCenter+Register.m */, F154A167CC9AC286CB008DF3527B8F65 /* Support Files */, ); - name = Nimble; path = Nimble; sourceTree = ""; }; @@ -897,7 +890,6 @@ files = ( 271E4AB8F4C96BC34C198B1C909BCF2D /* BackgroundLocationCache.swift in Sources */, 8ADF87B96A641AFB68F214BADDFA5F3F /* BackgroundLocationManager.swift in Sources */, - E6F0176B0EF302B3EC8053F184EC6FD3 /* BackgroundTrackable.swift in Sources */, 5585590C231B66B75C0A6514AF1F7BA0 /* CLLocationCoordinate2D+Distance.swift in Sources */, AD93DEE0BCBFFDD7AC504C3C7E37C6CE /* Constants.swift in Sources */, B3935F96C30E7A9142056E220E5D213A /* Result.swift in Sources */, diff --git a/Example/SwiftBackgroundLocation.xcodeproj/project.pbxproj b/Example/SwiftBackgroundLocation.xcodeproj/project.pbxproj index 2b3c256..ba5a343 100644 --- a/Example/SwiftBackgroundLocation.xcodeproj/project.pbxproj +++ b/Example/SwiftBackgroundLocation.xcodeproj/project.pbxproj @@ -16,7 +16,6 @@ 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; - 607FACEC1AFB9204008FA782 /* BackgroundLocationCacheTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* BackgroundLocationCacheTests.swift */; }; FB4241E8641DFEFF9D4BBEA4 /* Pods_SwiftBackgroundLocation_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E105694B9DD33DB1F8E73A4A /* Pods_SwiftBackgroundLocation_Tests.framework */; }; /* End PBXBuildFile section */ @@ -45,7 +44,6 @@ 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 607FACE51AFB9204008FA782 /* SwiftBackgroundLocation_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftBackgroundLocation_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 607FACEB1AFB9204008FA782 /* BackgroundLocationCacheTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundLocationCacheTests.swift; sourceTree = ""; }; 7BFB3915B96221E0EB71191F /* Pods-SwiftBackgroundLocation_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftBackgroundLocation_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftBackgroundLocation_Tests/Pods-SwiftBackgroundLocation_Tests.release.xcconfig"; sourceTree = ""; }; DF2E1AD142B68EC847F92D20 /* Pods_SwiftBackgroundLocation_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftBackgroundLocation_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E105694B9DD33DB1F8E73A4A /* Pods_SwiftBackgroundLocation_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftBackgroundLocation_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -124,7 +122,6 @@ 607FACE81AFB9204008FA782 /* Tests */ = { isa = PBXGroup; children = ( - 607FACEB1AFB9204008FA782 /* BackgroundLocationCacheTests.swift */, 607FACE91AFB9204008FA782 /* Supporting Files */, ); path = Tests; @@ -384,7 +381,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 607FACEC1AFB9204008FA782 /* BackgroundLocationCacheTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Example/Tests/BackgroundLocationCacheTests.swift b/Example/Tests/BackgroundLocationCacheTests.swift deleted file mode 100644 index 3150994..0000000 --- a/Example/Tests/BackgroundLocationCacheTests.swift +++ /dev/null @@ -1,32 +0,0 @@ -import Quick -import Nimble -import SwiftBackgroundLocation -import CoreLocation - -class BackgroundLocationCacheTests: QuickSpec { - override func spec() { - describe("background regions cache test") { - - var subject: BackgroundLocationCache! - var expected: [CLCircularRegion]! - - beforeEach { - subject = BackgroundLocationCache(defaults: UserDefaults(suiteName: "com.swiftBackgroundLocation.test")!) - - let region1 = CLCircularRegion(center: CLLocationCoordinate2DMake(1.2, 2.10), radius: 10, identifier: "region1") - let region2 = CLCircularRegion(center: CLLocationCoordinate2DMake(10.1, 20.2), radius: 30, identifier: "region2") - - expected = [region1, region2] - - subject.saveRegionsCoordinates(regions: [region1, region2]) - } - - it("is caching correctly") { - expect(subject.coordinates(for: expected[0]).latitude) == expected[0].center.latitude - expect(subject.coordinates(for: expected[0]).longitude) == expected[0].center.longitude - expect(subject.coordinates(for: expected[1]).latitude) == expected[1].center.latitude - expect(subject.coordinates(for: expected[1]).longitude) == expected[1].center.longitude - } - } - } -} diff --git a/SwiftBackgroundLocation.podspec b/SwiftBackgroundLocation.podspec index 6a5fe9b..43fe39e 100644 --- a/SwiftBackgroundLocation.podspec +++ b/SwiftBackgroundLocation.podspec @@ -12,5 +12,5 @@ Easy Location Background Monitoring based on regions and significant location ch s.social_media_url = 'https://twitter.com/roman_barzyczak' s.ios.deployment_target = '9.0' s.source_files = 'SwiftBackgroundLocation/Classes/**/*' - s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3.0' } + s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3.1' } end diff --git a/SwiftBackgroundLocation/Classes/BackgroundLocationCache.swift b/SwiftBackgroundLocation/Classes/BackgroundLocationCache.swift index 379d05e..1aa2181 100644 --- a/SwiftBackgroundLocation/Classes/BackgroundLocationCache.swift +++ b/SwiftBackgroundLocation/Classes/BackgroundLocationCache.swift @@ -2,20 +2,20 @@ import Foundation import CoreLocation -public protocol BackgroundLocationCacheable { +protocol BackgroundLocationCacheable { func saveRegionsCoordinates(regions:[CLCircularRegion]) func coordinates(for region: CLRegion) -> CLLocationCoordinate2D } -public struct BackgroundLocationCache: BackgroundLocationCacheable { +struct BackgroundLocationCache: BackgroundLocationCacheable { private let defaults: UserDefaults - public init(defaults: UserDefaults) { + init(defaults: UserDefaults) { self.defaults = defaults } - public func saveRegionsCoordinates(regions:[CLCircularRegion]) { + func saveRegionsCoordinates(regions:[CLCircularRegion]) { regions.forEach { region in defaults.set(region.center.latitude, forKey: String(format: CacheFormat.latFormat, region.identifier)) defaults.set(region.center.longitude, forKey: String(format: CacheFormat.longFormat, region.identifier)) @@ -24,7 +24,7 @@ public struct BackgroundLocationCache: BackgroundLocationCacheable { } } - public func coordinates(for region: CLRegion) -> CLLocationCoordinate2D { + func coordinates(for region: CLRegion) -> CLLocationCoordinate2D { let lat = defaults.float(forKey: String(format: CacheFormat.latFormat, region.identifier)) let long = defaults.float(forKey: String(format: CacheFormat.longFormat, region.identifier)) return CLLocationCoordinate2D(latitude: CLLocationDegrees(lat), longitude: CLLocationDegrees(long)) diff --git a/SwiftBackgroundLocation/Classes/BackgroundLocationManager.swift b/SwiftBackgroundLocation/Classes/BackgroundLocationManager.swift index 6c7df30..99db96b 100644 --- a/SwiftBackgroundLocation/Classes/BackgroundLocationManager.swift +++ b/SwiftBackgroundLocation/Classes/BackgroundLocationManager.swift @@ -1,9 +1,17 @@ import CoreLocation import UIKit + +/// Listener for background tracking public typealias BackgroundTrackingListener = (Result) -> () + + +/// Listener for region public typealias RegionListener = (Result<[CLLocation]>) -> () + + +/// Struct for region Config public struct RegionConfig { public var distanceToAroundRegions: Double { return regionRadius*Double(maximumNumberOfRegions)/Double.pi @@ -49,17 +57,25 @@ final public class BackgroundLocationManager: NSObject { self.init(regionCache: BackgroundLocationCache(defaults: userDefaults), regionConfig: regionConfig) } - public init(regionCache: BackgroundLocationCacheable, regionConfig: RegionConfig) { + init(regionCache: BackgroundLocationCacheable, regionConfig: RegionConfig) { self.regionCache = regionCache self.regionConfig = regionConfig } + + /// Start tracking foregorund + /// + /// - Parameter backgroundTrackingListener: listener which contains location public func start(backgroundTrackingListener: @escaping BackgroundTrackingListener) { listener = backgroundTrackingListener locationManager.delegate = self tryToRefreshPosition() } + + /// Start tracking background + /// + /// - Parameter backgroundTrackingListener: listener which contains location public func startBackground(backgroundTrackingListener: @escaping BackgroundTrackingListener) { listener = backgroundTrackingListener @@ -72,6 +88,8 @@ final public class BackgroundLocationManager: NSObject { tryToRefreshPosition() } + + /// Stop tracking public func stop() { listener = nil locationManager.delegate = nil @@ -153,6 +171,13 @@ extension BackgroundLocationManager { extension BackgroundLocationManager: CLLocationManagerDelegate { + + /// Invoked when the user enters a monitored region. This callback will be invoked for every allocated + /// CLLocationManager instance with a non-nil delegate that implements this method. + /// + /// - Parameters: + /// - manager: location manager + /// - region: region public func locationManager(_ manager: CLLocationManager, didEnterRegion region: CLRegion) { let coordinates = regionCache.coordinates(for: region) let location = CLLocation(latitude: coordinates.latitude, longitude: coordinates.longitude) diff --git a/SwiftBackgroundLocation/Classes/BackgroundTrackable.swift b/SwiftBackgroundLocation/Classes/BackgroundTrackable.swift deleted file mode 100644 index 1ebb240..0000000 --- a/SwiftBackgroundLocation/Classes/BackgroundTrackable.swift +++ /dev/null @@ -1,6 +0,0 @@ -import CoreLocation - -public protocol BackgroundTrackable { - func start(backgroundTrackingListener: @escaping BackgroundTrackingListener) - func stop() -} diff --git a/SwiftBackgroundLocation/Classes/CLLocationCoordinate2D+Distance.swift b/SwiftBackgroundLocation/Classes/CLLocationCoordinate2D+Distance.swift index 7f8df23..78728e2 100644 --- a/SwiftBackgroundLocation/Classes/CLLocationCoordinate2D+Distance.swift +++ b/SwiftBackgroundLocation/Classes/CLLocationCoordinate2D+Distance.swift @@ -8,13 +8,13 @@ extension CLLocationCoordinate2D { func location(for bearing:Double, and distanceMeters:Double) -> CLLocationCoordinate2D { let distRadians = distanceMeters / (6372797.6) // earth radius in meters - let lat1 = latitude * M_PI / 180 - let lon1 = longitude * M_PI / 180 + let lat1 = latitude * Double.pi / 180 + let lon1 = longitude * Double.pi / 180 let lat2 = asin(sin(lat1) * cos(distRadians) + cos(lat1) * sin(distRadians) * cos(bearing)) let lon2 = lon1 + atan2(sin(bearing) * sin(distRadians) * cos(lat1), cos(distRadians) - sin(lat1) * sin(lat2)) - return CLLocationCoordinate2D(latitude: lat2 * 180 / M_PI, longitude: lon2 * 180 / M_PI) + return CLLocationCoordinate2D(latitude: lat2 * 180 / Double.pi, longitude: lon2 * 180 / Double.pi) } } diff --git a/SwiftBackgroundLocation/Classes/TrackingHeadingLocationManager.swift b/SwiftBackgroundLocation/Classes/TrackingHeadingLocationManager.swift index 97c585a..6fa58f5 100644 --- a/SwiftBackgroundLocation/Classes/TrackingHeadingLocationManager.swift +++ b/SwiftBackgroundLocation/Classes/TrackingHeadingLocationManager.swift @@ -64,6 +64,13 @@ final public class TrackingHeadingLocationManager: NSObject { fileprivate var lastHeading: CLHeading? + /// Init for trakcing location manager with heading + /// + /// - Parameters: + /// - desiredAccuracy: desiredAccuracy + /// - distanceFilter: distanceFilter + /// - allowsBackgroundLocationUpdates: should track location in background + /// - activityType: type of recording activity public init(desiredAccuracy: CLLocationAccuracy = kCLLocationAccuracyBestForNavigation, distanceFilter: CLLocationDistance = kCLDistanceFilterNone, allowsBackgroundLocationUpdates: Bool = true, activityType:CLActivityType = .fitness) { self.desiredAccuracy = desiredAccuracy self.allowsBackgroundLocationUpdates = allowsBackgroundLocationUpdates @@ -87,6 +94,13 @@ final public class TrackingHeadingLocationManager: NSObject { locationManager.requestLocation() } + + + /// Method with listner + /// + /// - Parameters: + /// - isHeadingEnabled: possiblity to get location with heading + /// - headingListener: listener which return location with heading if enabled public func startUpdatingLocation(isHeadingEnabled:Bool = false, headingListener: @escaping HeadingLocationListener) { self.headingListener = headingListener locationManager.delegate = self @@ -94,12 +108,23 @@ final public class TrackingHeadingLocationManager: NSObject { self.isHeadingEnabled = isHeadingEnabled } + + /// Delegate method, called when newHeading appear + /// + /// - Parameters: + /// - manager: manager + /// - newHeading: newHeading public func locationManager(_ manager: CLLocationManager, didUpdateHeading newHeading: CLHeading) { lastHeading = newHeading self.headingListener?(Result.Success(LocationHeading(location: lastLocation, heading: lastHeading))) } + /// Method for asking about location status + /// + /// - Parameters: + /// - status: which status you need, always or whenInUse + /// - completion: completion which return current location manager public func manager(for status:LocationAuthorizationStatus, completion: @escaping LocationManagerListener) { self.locationManagerListener = completion self.requestedStatus = status @@ -118,6 +143,12 @@ final public class TrackingHeadingLocationManager: NSObject { } } + + /// Delegate method for getting authorization status + /// + /// - Parameters: + /// - manager: manager + /// - status: status public func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { if requestedStatus?.authorizationStatus() == status { locationManagerListener?(Result.Success(self)) @@ -135,6 +166,8 @@ final public class TrackingHeadingLocationManager: NSObject { } } + + /// Stop tracking public func stop() { locationManager.stopUpdatingLocation() locationManager.stopUpdatingHeading() @@ -142,6 +175,11 @@ final public class TrackingHeadingLocationManager: NSObject { + + /// Enum for getting location permission + /// + /// - whenInUse: application use location only when in foreground + /// - always: application can use location always public enum LocationAuthorizationStatus { case whenInUse, always