├── Resources ├── sample.gif └── UserTrackingButton.sketch ├── UserTrackingButton ├── Media.xcassets │ ├── Contents.json │ ├── TrackingLocation.imageset │ │ ├── TrackingLocationOffMask@1x.png │ │ ├── TrackingLocationOffMask@2x.png │ │ ├── TrackingLocationOffMask@3x.png │ │ └── Contents.json │ ├── TrackingLocationOff.imageset │ │ ├── TrackingLocationMask@1x.png │ │ ├── TrackingLocationMask@2x.png │ │ ├── TrackingLocationMask@3x.png │ │ └── Contents.json │ └── TrackingLocationWithHeading.imageset │ │ ├── TrackingLocationWithHeadingMask@1x.png │ │ ├── TrackingLocationWithHeadingMask@2x.png │ │ ├── TrackingLocationWithHeadingMask@3x.png │ │ └── Contents.json ├── UserTrackingButton.h ├── Info.plist └── UserTrackingButton.swift ├── UserTrackingButtonTests ├── UserTrackingButton-Bridging-Header.h ├── UIView+UIView_NoAnimation.h ├── MKMapViewStub.h ├── UIView+UIView_NoAnimation.m ├── Info.plist ├── MKMapViewStub.m └── UserTrackingButtonTest.swift ├── .travis.yml ├── UserTrackingButton.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── xcshareddata │ └── xcschemes │ │ └── UserTrackingButton.xcscheme └── project.pbxproj ├── UserTrackingButtonExample ├── UserTrackingButtonExample.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── project.pbxproj ├── UserTrackingButtonExample │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── ViewController.swift │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ └── AppDelegate.swift ├── UserTrackingButtonExampleTests │ ├── Info.plist │ └── UserTrackingButtonExampleTests.swift └── UserTrackingButtonExampleUITests │ ├── Info.plist │ └── UserTrackingButtonExampleUITests.swift ├── LICENSE ├── .gitignore ├── README.md └── UserTrackingButton.podspec /Resources/sample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkko/UserTrackingButton/HEAD/Resources/sample.gif -------------------------------------------------------------------------------- /Resources/UserTrackingButton.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkko/UserTrackingButton/HEAD/Resources/UserTrackingButton.sketch -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /UserTrackingButtonTests/UserTrackingButton-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // The bridging header for tests 3 | // 4 | 5 | #import "MKMapViewStub.h" 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: swift 2 | osx_image: xcode9 3 | xcode_project: UserTrackingButton.xcodeproj 4 | xcode_scheme: UserTrackingButton 5 | xcode_sdk: iphonesimulator11.0 6 | -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocation.imageset/TrackingLocationOffMask@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkko/UserTrackingButton/HEAD/UserTrackingButton/Media.xcassets/TrackingLocation.imageset/TrackingLocationOffMask@1x.png -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocation.imageset/TrackingLocationOffMask@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkko/UserTrackingButton/HEAD/UserTrackingButton/Media.xcassets/TrackingLocation.imageset/TrackingLocationOffMask@2x.png -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocation.imageset/TrackingLocationOffMask@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkko/UserTrackingButton/HEAD/UserTrackingButton/Media.xcassets/TrackingLocation.imageset/TrackingLocationOffMask@3x.png -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocationOff.imageset/TrackingLocationMask@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkko/UserTrackingButton/HEAD/UserTrackingButton/Media.xcassets/TrackingLocationOff.imageset/TrackingLocationMask@1x.png -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocationOff.imageset/TrackingLocationMask@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkko/UserTrackingButton/HEAD/UserTrackingButton/Media.xcassets/TrackingLocationOff.imageset/TrackingLocationMask@2x.png -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocationOff.imageset/TrackingLocationMask@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkko/UserTrackingButton/HEAD/UserTrackingButton/Media.xcassets/TrackingLocationOff.imageset/TrackingLocationMask@3x.png -------------------------------------------------------------------------------- /UserTrackingButton.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocationWithHeading.imageset/TrackingLocationWithHeadingMask@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkko/UserTrackingButton/HEAD/UserTrackingButton/Media.xcassets/TrackingLocationWithHeading.imageset/TrackingLocationWithHeadingMask@1x.png -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocationWithHeading.imageset/TrackingLocationWithHeadingMask@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkko/UserTrackingButton/HEAD/UserTrackingButton/Media.xcassets/TrackingLocationWithHeading.imageset/TrackingLocationWithHeadingMask@2x.png -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocationWithHeading.imageset/TrackingLocationWithHeadingMask@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkko/UserTrackingButton/HEAD/UserTrackingButton/Media.xcassets/TrackingLocationWithHeading.imageset/TrackingLocationWithHeadingMask@3x.png -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UserTrackingButtonTests/UIView+UIView_NoAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+UIView_NoAnimation.h 3 | // UserTrackingButton 4 | // 5 | // Created by Mikko Välimäki on 16-07-03. 6 | // Copyright © 2016 Mikko Välimäki. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (NoAnimation) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocationOff.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "TrackingLocationMask@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "TrackingLocationMask@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "TrackingLocationMask@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /UserTrackingButtonTests/MKMapViewStub.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKMapViewStub.h 3 | // UserTrackingButton 4 | // 5 | // Created by Mikko Välimäki on 16-07-04. 6 | // Copyright © 2016 Mikko Välimäki. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MKMapViewStub : MKMapView 12 | 13 | - (void)setupUserTrackingMode:(MKUserTrackingMode)userTrackingMode location:(nullable MKUserLocation *)location; 14 | 15 | @end 16 | 17 | @interface MKUserLocationStub : MKUserLocation 18 | 19 | - (nonnull instancetype)initWithLocation:(nullable CLLocation *)location; 20 | 21 | @end -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocation.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "TrackingLocationOffMask@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "TrackingLocationOffMask@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "TrackingLocationOffMask@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /UserTrackingButton/Media.xcassets/TrackingLocationWithHeading.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "TrackingLocationWithHeadingMask@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "TrackingLocationWithHeadingMask@3x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "TrackingLocationWithHeadingMask@2x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /UserTrackingButton/UserTrackingButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserTrackingButton.h 3 | // UserTrackingButton 4 | // 5 | // Created by Mikko Välimäki on 15-12-04. 6 | // Copyright © 2015 Mikko Välimäki. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for UserTrackingButton. 12 | FOUNDATION_EXPORT double UserTrackingButtonVersionNumber; 13 | 14 | //! Project version string for UserTrackingButton. 15 | FOUNDATION_EXPORT const unsigned char UserTrackingButtonVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | -------------------------------------------------------------------------------- /UserTrackingButtonTests/UIView+UIView_NoAnimation.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+UIView_NoAnimation.m 3 | // UserTrackingButton 4 | // 5 | // Created by Mikko Välimäki on 16-07-03. 6 | // Copyright © 2016 Mikko Välimäki. All rights reserved. 7 | // 8 | 9 | #import "UIView+UIView_NoAnimation.h" 10 | 11 | @implementation UIView (NoAnimation) 12 | 13 | + (void)animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations completion:(void (^ __nullable)(BOOL finished))completion 14 | { 15 | if (animations) 16 | { 17 | animations(); 18 | } 19 | if (completion) 20 | { 21 | completion(YES); 22 | } 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /UserTrackingButtonTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExampleUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /UserTrackingButton/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.3.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | N/A 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /UserTrackingButtonTests/MKMapViewStub.m: -------------------------------------------------------------------------------- 1 | // 2 | // MKMapViewStub.m 3 | // UserTrackingButton 4 | // 5 | // Created by Mikko Välimäki on 16-07-04. 6 | // Copyright © 2016 Mikko Välimäki. All rights reserved. 7 | // 8 | 9 | #import "MKMapViewStub.h" 10 | 11 | @implementation MKMapViewStub 12 | { 13 | MKUserTrackingMode _userTrackingMode; 14 | MKUserLocation *_userLocation; 15 | } 16 | 17 | - (MKUserTrackingMode)userTrackingMode 18 | { 19 | return _userTrackingMode; 20 | } 21 | 22 | - (MKUserLocation *)userLocation 23 | { 24 | return _userLocation; 25 | } 26 | 27 | - (void)setupUserTrackingMode:(MKUserTrackingMode)userTrackingMode location:(MKUserLocation *)location 28 | { 29 | _userTrackingMode = userTrackingMode; 30 | _userLocation = location; 31 | } 32 | 33 | @end 34 | 35 | @implementation MKUserLocationStub 36 | 37 | - (instancetype)initWithLocation:(nullable CLLocation *)location 38 | { 39 | if (self = [super init]) 40 | { 41 | if (location) 42 | { 43 | [self setValue:location forKey:@"location"]; 44 | } 45 | } 46 | return self; 47 | } 48 | 49 | @end -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Mikko Välimäki 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExampleTests/UserTrackingButtonExampleTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserTrackingButtonExampleTests.swift 3 | // UserTrackingButtonExampleTests 4 | // 5 | // Created by Mikko Välimäki on 15-12-07. 6 | // Copyright © 2015 Mikko Välimäki. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import UserTrackingButtonExample 11 | 12 | class UserTrackingButtonExampleTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | N/A 23 | LSRequiresIPhoneOS 24 | 25 | NSLocationWhenInUseUsageDescription 26 | Pretty please. 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExampleUITests/UserTrackingButtonExampleUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserTrackingButtonExampleUITests.swift 3 | // UserTrackingButtonExampleUITests 4 | // 5 | // Created by Mikko Välimäki on 15-12-07. 6 | // Copyright © 2015 Mikko Välimäki. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class UserTrackingButtonExampleUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | 30 | # Swift Package Manager 31 | # 32 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 33 | # Packages/ 34 | .build/ 35 | 36 | # CocoaPods 37 | # 38 | # We recommend against adding the Pods directory to your .gitignore. However 39 | # you should judge for yourself, the pros and cons are mentioned at: 40 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 41 | # 42 | # Pods/ 43 | 44 | # Carthage 45 | # 46 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 47 | # Carthage/Checkouts 48 | 49 | Carthage/Build 50 | 51 | # fastlane 52 | # 53 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 54 | # screenshots whenever they are needed. 55 | # For more information about the recommended setup visit: 56 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 57 | 58 | fastlane/report.xml 59 | fastlane/screenshots 60 | -------------------------------------------------------------------------------- /UserTrackingButtonTests/UserTrackingButtonTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserTrackingButtonTest.swift 3 | // UserTrackingButton 4 | // 5 | // Created by Mikko Välimäki on 16-07-03. 6 | // Copyright © 2016 Mikko Välimäki. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import MapKit 11 | @testable import UserTrackingButton 12 | 13 | class UserTrackingButtonTest: XCTestCase { 14 | 15 | private var button: UserTrackingButton = UserTrackingButton() 16 | private var mapView: MKMapViewStub = MKMapViewStub() 17 | private var userLocation = MKUserLocationStub(location: CLLocation(latitude: 0, longitude: 0)) 18 | 19 | override func setUp() { 20 | super.setUp() 21 | button.mapView = mapView 22 | } 23 | 24 | override func tearDown() { 25 | super.tearDown() 26 | } 27 | 28 | func testStateTracking() { 29 | mapView.setupUserTrackingMode(.follow, location: userLocation) 30 | 31 | button.updateStateAnimated(true) 32 | XCTAssertEqual(.trackingLocation, button.viewState) 33 | } 34 | 35 | func testStateRetrieving() { 36 | mapView.setupUserTrackingMode(.follow, location: nil) 37 | 38 | button.updateStateAnimated(true) 39 | XCTAssertEqual(.retrievingLocation, button.viewState) 40 | } 41 | 42 | func testStateTrackingWithHeading() { 43 | mapView.setupUserTrackingMode(.followWithHeading, location: userLocation) 44 | 45 | button.updateStateAnimated(true) 46 | XCTAssertEqual(.trackingLocationWithHeading, button.viewState) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // UserTrackingButtonExample 4 | // 5 | // Created by Mikko Välimäki on 15-12-07. 6 | // Copyright © 2015 Mikko Välimäki. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import MapKit 11 | import CoreLocation 12 | import UserTrackingButton 13 | 14 | class ViewController: UIViewController { 15 | 16 | @IBOutlet var userTrackingButton: UserTrackingButton! 17 | 18 | @IBOutlet weak var mapView: MKMapView! 19 | 20 | let locationManager = CLLocationManager() 21 | 22 | @IBOutlet weak var toolbar: UIToolbar! 23 | 24 | override func viewDidLoad() { 25 | super.viewDidLoad() 26 | // Do any additional setup after loading the view, typically from a nib. 27 | 28 | locationManager.requestWhenInUseAuthorization() 29 | 30 | toolbar.setItems([ 31 | UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil), 32 | MKUserTrackingBarButtonItem(mapView: self.mapView) 33 | ], animated: false) 34 | } 35 | 36 | override func didReceiveMemoryWarning() { 37 | super.didReceiveMemoryWarning() 38 | // Dispose of any resources that can be recreated. 39 | } 40 | 41 | 42 | } 43 | 44 | extension ViewController: MKMapViewDelegate { 45 | 46 | func mapView(_ mapView: MKMapView, didUpdate userLocation: MKUserLocation) { 47 | userTrackingButton.updateStateAnimated(true) 48 | } 49 | 50 | func mapView(_ mapView: MKMapView, didChange mode: MKUserTrackingMode, animated: Bool) { 51 | userTrackingButton.updateStateAnimated(true) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // UserTrackingButtonExample 4 | // 5 | // Created by Mikko Välimäki on 15-12-07. 6 | // Copyright © 2015 Mikko Välimäki. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | private func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **NOTE: iOS 11 added MKUserTrackingButton that does exactly what this project is intended to be and should be preferred over this.** 2 | 3 | # UserTrackingButton 4 | 5 | A replacement for `MKUserTrackingBarButtonItem` when you don't have toolbars or navigation bars. 6 | 7 | ![Sample](Resources/sample.gif) 8 | 9 | UserTrackingButton is a button that works in conjunction with `MKMapView`. Unlike `MKUserTrackingBarButtonItem` it can be used even when you don't have toolbars or navigation bars. 10 | 11 | ## Installation 12 | 13 | #### Carthage 14 | 15 | Add `github "mkko/UserTrackingButton" ~> 0.3.1` to you `Cartfile`. Follow the further instrcutions on [Carthage getting started][1] page. 16 | 17 | *NB: There is a bug with `@IBDesignable` when using external frameworks that prevents the view from rendering wihtin Interface Builder. Further reading can be found [here][2].* 18 | 19 | #### CocoaPods 20 | 21 | Add `pod 'UserTrackingButton', '~> 0.3.1'` to you `Podfile` and run `pod install`. 22 | 23 | ## Setup 24 | 25 | To use UserTrackingButton from Interface Builder simply subclass a `UIView` component and set its class to UserTrackingButton. Then connect the `mapView` outlet and remember to update the button in `MKMapViewDelegate` methods: 26 | 27 | ```swift 28 | extension ViewController: MKMapViewDelegate { 29 | 30 | func mapView(mapView: MKMapView, didUpdateUserLocation userLocation: MKUserLocation) { 31 | userTrackingButton.updateStateAnimated(true) 32 | } 33 | 34 | func mapView(mapView: MKMapView, didChangeUserTrackingMode mode: MKUserTrackingMode, animated: Bool) { 35 | userTrackingButton.updateStateAnimated(true) 36 | } 37 | } 38 | ``` 39 | 40 | The manual updating is a minor inconvenience as the `MKMapView` instance can only have one delegate. However, if you're using RxSwift, there's a [wrapper][3] to make this easier: 41 | 42 | ```swift 43 | Observable.combineLatest(mapView.rx_didUpdateUserLocation, mapView.rx_didChangeUserTrackingMode) { return ($0, $1) } 44 | .subscribe { _ in self.userTrackingButton.updateState(true) } 45 | /* Also this, if you're using: */ .addDisposableTo(disposeBag) 46 | ``` 47 | 48 | When creating the button programmatically the same steps are required: 49 | ```swift 50 | let btn = UserTrackingButton(frame: trackingButtonFrame) 51 | btn.mapView = self.mapView 52 | self.view.addSubview(btn) 53 | ``` 54 | 55 | [1]: https://github.com/Carthage/Carthage#if-youre-building-for-ios 56 | [2]: https://openradar.appspot.com/23114017 57 | [3]: https://github.com/RxSwiftCommunity/RxMKMapView 58 | -------------------------------------------------------------------------------- /UserTrackingButton.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint UserTrackingButton.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | s.name = "UserTrackingButton" 12 | s.version = "0.3.1" 13 | s.summary = "A replacement for MKUserTrackingBarButtonItem" 14 | 15 | s.description = <<-DESC 16 | # UserTrackingButton 17 | 18 | A replacement for `MKUserTrackingBarButtonItem` when you don't have toolbars or navigation bars. 19 | 20 | `UserTrackingButton` is a button that works in conjunction with `MKMapView`. Unlike `MKUserTrackingBarButtonItem` it can be used even when you don't have toolbars or navigation bars. 21 | 22 | ## Installation 23 | 24 | #### Carthage 25 | 26 | Add `github "mkko/UserTrackingButton" ~> 0.3.1` to you `Cartfile`. Follow the further instrcutions on [Carthage getting started][1] page. 27 | 28 | *NB: There is a bug with `@IBDesignable` when using external frameworks that prevents the view from rendering wihtin Interface Builder. Further reading can be found [here][2].* 29 | 30 | #### Cocoapods 31 | 32 | Add `pod 'UserTrackingButton', '~> 0.3.1'` to you `Podfile` and run `pod install`. 33 | 34 | ## Setup 35 | 36 | To use UserTrackingButton from Interface Builder simply subclass a `UIView` component and set its class to `UserTrackingButton`. Connect the `mapView` outlet and you're done. 37 | 38 | The same steps are required when adding the button in code: 39 | 40 | ``` 41 | let btn = UserTrackingButton(frame: trackingButtonFrame) 42 | btn.mapView = self.mapView 43 | self.view.addSubview(btn) 44 | ``` 45 | And there, you're done. The button handles the binding to user tracking state of the `MKMapView` instance. 46 | 47 | 48 | [1]: https://github.com/Carthage/Carthage#if-youre-building-for-ios 49 | [2]: https://openradar.appspot.com/23114017 50 | DESC 51 | 52 | s.homepage = "https://github.com/mkko/UserTrackingButton.git" 53 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 54 | 55 | s.license = { :type => "MIT", :file => "LICENSE" } 56 | 57 | s.authors = { "Mikko Välimäki" => "mkko1373@gmail.com" } 58 | s.social_media_url = "http://twitter.com/mkko" 59 | 60 | s.platform = :ios, "8.0" 61 | s.source = { :git => "https://github.com/mkko/UserTrackingButton.git", :tag => s.version } 62 | s.source_files = "UserTrackingButton/*.{swift,h,m}" 63 | s.resources = "UserTrackingButton/Media.xcassets" 64 | 65 | s.requires_arc = true 66 | 67 | end 68 | -------------------------------------------------------------------------------- /UserTrackingButton.xcodeproj/xcshareddata/xcschemes/UserTrackingButton.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 66 | 67 | 73 | 74 | 75 | 76 | 77 | 78 | 84 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /UserTrackingButton/UserTrackingButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserTrackingButton.swift 3 | // UserTrackingButton 4 | // 5 | // Created by Mikko Välimäki on 15-12-04. 6 | // Copyright © 2015 Mikko Välimäki. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import MapKit 11 | 12 | let animationDuration = 0.2 13 | 14 | @IBDesignable open class UserTrackingButton : UIControl, MKMapViewDelegate { 15 | 16 | fileprivate var locationOffButton: UIButton 17 | fileprivate var locationTrackingButton: UIButton 18 | fileprivate var locationTrackingImage: UIImageView 19 | fileprivate var locationTrackingWithHeadingImage: UIImageView 20 | fileprivate var trackingActivityIndicator: UIActivityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .gray) 21 | fileprivate let serialQueue = DispatchQueue(label: "com.mikkovalimaki.UserTrackingButton", attributes: []); 22 | 23 | internal fileprivate(set) var viewState: ViewState = .initial 24 | 25 | fileprivate let trackingLocationImageName = "TrackingLocation" 26 | fileprivate let trackingLocationOffImageName = "TrackingLocationOff" 27 | fileprivate let trackingLocationWithHeadingImageName = "TrackingLocationWithHeading" 28 | fileprivate let AnimationDuration = 0.2 29 | 30 | internal enum ViewState { 31 | case initial 32 | case retrievingLocation 33 | case trackingLocationOff 34 | case trackingLocation 35 | case trackingLocationWithHeading 36 | } 37 | 38 | @IBOutlet open var mapView: MKMapView? 39 | 40 | // MARK: Init 41 | 42 | required public override init(frame: CGRect) { 43 | self.locationTrackingImage = UserTrackingButton.imageViewWithImageNamed(trackingLocationImageName) 44 | self.locationTrackingWithHeadingImage = UserTrackingButton.imageViewWithImageNamed(trackingLocationWithHeadingImageName) 45 | self.locationOffButton = UserTrackingButton.buttonWithImageNamed(trackingLocationOffImageName, renderingMode: .alwaysTemplate) 46 | self.locationTrackingButton = UIButton() 47 | super.init(frame: frame) 48 | self.setup() 49 | } 50 | 51 | required public init?(coder aDecoder: NSCoder) { 52 | self.locationTrackingImage = UserTrackingButton.imageViewWithImageNamed(trackingLocationImageName) 53 | self.locationTrackingWithHeadingImage = UserTrackingButton.imageViewWithImageNamed(trackingLocationWithHeadingImageName) 54 | self.locationOffButton = UserTrackingButton.buttonWithImageNamed(trackingLocationOffImageName, renderingMode: .alwaysTemplate) 55 | self.locationTrackingButton = UIButton() 56 | super.init(coder: aDecoder) 57 | self.setup() 58 | } 59 | 60 | fileprivate func setup() { 61 | for one in [self, locationTrackingButton, locationOffButton] as [Any] { 62 | (one as AnyObject).addTarget(self, action: #selector(UserTrackingButton.pressed(_:)), for: .touchUpInside) 63 | } 64 | 65 | locationTrackingButton.backgroundColor = self.tintColor 66 | stretchView(locationTrackingButton, withinView: self) 67 | sendSubview(toBack: locationTrackingButton) 68 | 69 | stretchView(locationTrackingWithHeadingImage, withinView: locationTrackingButton) 70 | stretchView(locationTrackingImage, withinView: locationTrackingButton) 71 | locationTrackingImage.isHidden = true 72 | locationTrackingWithHeadingImage.isHidden = true 73 | 74 | stretchView(locationOffButton, withinView: self) 75 | locationOffButton.isHidden = true 76 | 77 | trackingActivityIndicator.stopAnimating() 78 | trackingActivityIndicator.hidesWhenStopped = false 79 | trackingActivityIndicator.isHidden = true 80 | trackingActivityIndicator.isUserInteractionEnabled = false 81 | trackingActivityIndicator.isExclusiveTouch = false 82 | trackingActivityIndicator.translatesAutoresizingMaskIntoConstraints = false 83 | addSubview(trackingActivityIndicator) 84 | addConstraints([ 85 | NSLayoutConstraint(item: trackingActivityIndicator, 86 | attribute: .centerX, 87 | relatedBy: .equal, 88 | toItem: self, 89 | attribute: .centerX, 90 | multiplier: 1, 91 | constant: 0), 92 | NSLayoutConstraint(item: trackingActivityIndicator, 93 | attribute: .centerY, 94 | relatedBy: .equal, 95 | toItem: self, 96 | attribute: .centerY, 97 | multiplier: 1, 98 | constant: 0), 99 | ]) 100 | 101 | layer.cornerRadius = 4 102 | clipsToBounds = true 103 | 104 | transitionToState(.trackingLocationOff, animated: false) 105 | } 106 | 107 | // MARK: Public methods 108 | 109 | open override var intrinsicContentSize : CGSize { 110 | return self.locationTrackingImage.intrinsicContentSize 111 | } 112 | 113 | open override func tintColorDidChange() { 114 | self.trackingActivityIndicator.tintColor = self.tintColor 115 | self.locationTrackingButton.backgroundColor = self.tintColor 116 | } 117 | 118 | open func updateStateAnimated(_ animated: Bool) { 119 | if let mapView = self.mapView { 120 | updateState(forMapView: mapView, animated: animated) 121 | } 122 | } 123 | 124 | // MARK: UI interaction 125 | 126 | @objc internal func pressed(_ sender: UIButton!) { 127 | guard let mapView = mapView else { return } 128 | 129 | let userTrackingMode: MKUserTrackingMode 130 | switch mapView.userTrackingMode { 131 | case MKUserTrackingMode.follow where isMapViewRetrievingLocation(mapView): 132 | // If still retrieving location, button should abort it. 133 | userTrackingMode = .none 134 | case MKUserTrackingMode.follow: 135 | userTrackingMode = .followWithHeading 136 | case MKUserTrackingMode.followWithHeading: 137 | userTrackingMode = .none 138 | default: 139 | userTrackingMode = .follow 140 | } 141 | 142 | mapView.setUserTrackingMode(userTrackingMode, animated: true) 143 | } 144 | 145 | // MARK: Helper methods 146 | 147 | fileprivate func transitionToState(_ state: ViewState, animated: Bool) { 148 | 149 | guard self.viewState != state else { return } 150 | 151 | let imageShapeWillChange = !( 152 | [.trackingLocationOff, .trackingLocation].contains(self.viewState) && 153 | [.trackingLocationOff, .trackingLocation].contains(state)) 154 | 155 | switch state { 156 | case .retrievingLocation: 157 | self.setHidden(locationTrackingButton, locationOffButton, hidden: true, animated: animated, shouldScale: imageShapeWillChange) { 158 | self.trackingActivityIndicator.startAnimating() 159 | self.setHidden(self.trackingActivityIndicator, hidden: false, animated: animated, shouldScale: imageShapeWillChange) 160 | } 161 | case .trackingLocation: 162 | fallthrough 163 | case .trackingLocationWithHeading: 164 | self.setHidden(self.trackingActivityIndicator, self.locationOffButton, hidden: true, animated: animated, shouldScale: imageShapeWillChange) 165 | self.setHidden(locationTrackingButton, hidden: false, animated: animated) { 166 | self.trackingActivityIndicator.stopAnimating() 167 | } 168 | if state == .trackingLocation { 169 | self.setHidden(self.locationTrackingWithHeadingImage, hidden: true, animated: animated, shouldScale: imageShapeWillChange) { 170 | self.setHidden(self.locationTrackingImage, hidden: false, animated: animated, shouldScale: imageShapeWillChange) 171 | } 172 | } else { 173 | self.setHidden(self.locationTrackingImage, hidden: true, animated: animated, shouldScale: imageShapeWillChange) { 174 | self.setHidden(self.locationTrackingWithHeadingImage, hidden: false, animated: animated, shouldScale: imageShapeWillChange) 175 | } 176 | } 177 | case .trackingLocationOff: 178 | self.setHidden(self.trackingActivityIndicator, hidden: true, animated: animated, shouldScale: imageShapeWillChange) { 179 | self.trackingActivityIndicator.stopAnimating() 180 | } 181 | self.setHidden(self.locationTrackingButton, hidden: true, animated: animated) 182 | self.setHidden(self.locationTrackingImage, self.locationTrackingWithHeadingImage, hidden: true, animated: animated, shouldScale: imageShapeWillChange) { 183 | self.setHidden(self.locationOffButton, hidden: false, animated: animated, shouldScale: imageShapeWillChange) 184 | } 185 | default: 186 | break 187 | } 188 | 189 | self.viewState = state 190 | } 191 | 192 | fileprivate func updateState(forMapView mapView: MKMapView, animated: Bool) { 193 | 194 | serialQueue.sync { 195 | let nextState: ViewState 196 | switch mapView.userTrackingMode { 197 | case _ where self.isMapViewRetrievingLocation(mapView): 198 | nextState = .retrievingLocation 199 | case .follow: 200 | nextState = .trackingLocation 201 | case .followWithHeading: 202 | nextState = .trackingLocationWithHeading 203 | default: 204 | nextState = .trackingLocationOff 205 | } 206 | self.transitionToState(nextState, animated: animated) 207 | } 208 | } 209 | 210 | fileprivate func isMapViewRetrievingLocation(_ mapView: MKMapView) -> Bool { 211 | let isAccurate = (mapView.userLocation.location?.horizontalAccuracy) 212 | .map { $0 < kCLLocationAccuracyHundredMeters } 213 | ?? false 214 | return mapView.userTrackingMode != .none 215 | && (mapView.userLocation.location == nil || !isAccurate) 216 | } 217 | 218 | fileprivate func stretchView(_ view: UIView, withinView parentView: UIView) { 219 | view.translatesAutoresizingMaskIntoConstraints = false 220 | parentView.addSubview(view) 221 | parentView.addConstraints([ 222 | NSLayoutConstraint( 223 | item: view, 224 | attribute: .leading, 225 | relatedBy: .equal, 226 | toItem: parentView, 227 | attribute: .leading, 228 | multiplier: 1, 229 | constant: 0), 230 | NSLayoutConstraint( 231 | item: view, 232 | attribute: .trailing, 233 | relatedBy: .equal, 234 | toItem: parentView, 235 | attribute: .trailing, 236 | multiplier: 1, 237 | constant: 0), 238 | NSLayoutConstraint( 239 | item: view, 240 | attribute: .top, 241 | relatedBy: .equal, 242 | toItem: parentView, 243 | attribute: .top, 244 | multiplier: 1, 245 | constant: 0), 246 | NSLayoutConstraint( 247 | item: view, 248 | attribute: .bottom, 249 | relatedBy: .equal, 250 | toItem: parentView, 251 | attribute: .bottom, 252 | multiplier: 1, 253 | constant: 0), 254 | ]) 255 | 256 | } 257 | 258 | fileprivate class func buttonWithImageNamed(_ imageName: String, renderingMode: UIImageRenderingMode) -> UIButton { 259 | let button = UIButton() 260 | button.setImage(UserTrackingButton.imageNamed(imageName, renderingMode: renderingMode), for: UIControlState()) 261 | return button 262 | } 263 | 264 | fileprivate class func imageViewWithImageNamed(_ imageName: String) -> UIImageView { 265 | return UIImageView(image: self.imageNamed(imageName)) 266 | } 267 | 268 | fileprivate class func imageNamed(_ named: String, renderingMode: UIImageRenderingMode? = nil) -> UIImage? { 269 | let img = UIImage(named: named, in: Bundle(for: NSClassFromString("UserTrackingButton.UserTrackingButton")!), compatibleWith: nil) 270 | if let renderingMode = renderingMode { 271 | return img?.withRenderingMode(renderingMode) 272 | } else { 273 | return img 274 | } 275 | } 276 | 277 | fileprivate func setHidden(_ items: UIView..., hidden: Bool, animated: Bool, shouldScale: Bool = false, completion: (() -> Void)? = nil) { 278 | 279 | let itemsToChange = items.filter { $0.isHidden != hidden } 280 | 281 | for item in itemsToChange { 282 | item.layer.removeAllAnimations() 283 | // If the item is hidden make it visible. 284 | if shouldScale { 285 | item.transform = item.isHidden ? CGAffineTransform(scaleX: 0.01, y: 0.01) : CGAffineTransform.identity 286 | item.alpha = 1.0 287 | } else { 288 | item.alpha = item.isHidden ? 0.0 : 1.0 289 | item.transform = CGAffineTransform.identity 290 | } 291 | item.isHidden = false 292 | } 293 | 294 | let anim: () -> Void = { 295 | for item in itemsToChange { 296 | if shouldScale { 297 | item.transform = hidden ? CGAffineTransform(scaleX: 0.01, y: 0.01) : CGAffineTransform.identity 298 | } else { 299 | item.alpha = hidden ? 0.0 : 1.0 300 | } 301 | } 302 | } 303 | 304 | let compl: ((Bool) -> Void) = { completed in 305 | if completed { 306 | for item in itemsToChange { 307 | item.isHidden = hidden 308 | item.transform = CGAffineTransform.identity 309 | } 310 | } 311 | completion?() 312 | } 313 | 314 | if animated { 315 | UIView.animate(withDuration: AnimationDuration, delay: 0, options: .beginFromCurrentState, animations: anim, completion: compl) 316 | //UIView.animateWithDuration(0.2, animations: anim, completion: compl) 317 | } else { 318 | anim() 319 | compl(true) 320 | } 321 | } 322 | 323 | // MARK: Interface Builder 324 | 325 | open override func prepareForInterfaceBuilder() { 326 | self.transitionToState(.trackingLocationOff, animated: false) 327 | } 328 | } 329 | -------------------------------------------------------------------------------- /UserTrackingButton.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2B3AFC231C10F35900682B14 /* UserTrackingButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B3AFC221C10F35900682B14 /* UserTrackingButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 2B3AFC2A1C10F35900682B14 /* UserTrackingButton.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B3AFC1F1C10F35900682B14 /* UserTrackingButton.framework */; }; 12 | 2B3AFC3A1C10F43900682B14 /* UserTrackingButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B3AFC391C10F43900682B14 /* UserTrackingButton.swift */; }; 13 | 2B3F2A341D29A2D900F9FD37 /* UserTrackingButtonTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B3F2A331D29A2D900F9FD37 /* UserTrackingButtonTest.swift */; }; 14 | 2B3F2A361D29A79B00F9FD37 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B3F2A351D29A79B00F9FD37 /* UIKit.framework */; }; 15 | 2B3F2A391D29A9CC00F9FD37 /* UIView+UIView_NoAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B3F2A381D29A9CC00F9FD37 /* UIView+UIView_NoAnimation.m */; }; 16 | 2B3F2A3E1D29CF2D00F9FD37 /* MKMapViewStub.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B3F2A3D1D29CF2D00F9FD37 /* MKMapViewStub.m */; }; 17 | 2B6ED6CE1C122B6B00687203 /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2B6ED6CD1C122B6B00687203 /* Media.xcassets */; }; 18 | 2B6ED6D21C12553400687203 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B6ED6D11C12553400687203 /* MapKit.framework */; }; 19 | 2BE654061C594D2C0043E080 /* UserTrackingButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B3AFC391C10F43900682B14 /* UserTrackingButton.swift */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 2B3AFC2B1C10F35900682B14 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 2B3AFC161C10F35900682B14 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 2B3AFC1E1C10F35900682B14; 28 | remoteInfo = UserTrackingButton; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 2B3AFC1F1C10F35900682B14 /* UserTrackingButton.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UserTrackingButton.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 2B3AFC221C10F35900682B14 /* UserTrackingButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserTrackingButton.h; sourceTree = ""; }; 35 | 2B3AFC241C10F35900682B14 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | 2B3AFC291C10F35900682B14 /* UserTrackingButtonTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UserTrackingButtonTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 2B3AFC301C10F35900682B14 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | 2B3AFC391C10F43900682B14 /* UserTrackingButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserTrackingButton.swift; sourceTree = ""; }; 39 | 2B3F2A331D29A2D900F9FD37 /* UserTrackingButtonTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserTrackingButtonTest.swift; sourceTree = ""; }; 40 | 2B3F2A351D29A79B00F9FD37 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 41 | 2B3F2A371D29A9CC00F9FD37 /* UIView+UIView_NoAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+UIView_NoAnimation.h"; sourceTree = ""; }; 42 | 2B3F2A381D29A9CC00F9FD37 /* UIView+UIView_NoAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+UIView_NoAnimation.m"; sourceTree = ""; }; 43 | 2B3F2A3C1D29CF2D00F9FD37 /* MKMapViewStub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MKMapViewStub.h; sourceTree = ""; }; 44 | 2B3F2A3D1D29CF2D00F9FD37 /* MKMapViewStub.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MKMapViewStub.m; sourceTree = ""; }; 45 | 2B6ED6CD1C122B6B00687203 /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Media.xcassets; sourceTree = ""; }; 46 | 2B6ED6D11C12553400687203 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 47 | 2BE654041C594CFD0043E080 /* UserTrackingButton-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UserTrackingButton-Bridging-Header.h"; sourceTree = ""; }; 48 | /* End PBXFileReference section */ 49 | 50 | /* Begin PBXFrameworksBuildPhase section */ 51 | 2B3AFC1B1C10F35900682B14 /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | 2B6ED6D21C12553400687203 /* MapKit.framework in Frameworks */, 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | 2B3AFC261C10F35900682B14 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 2B3F2A361D29A79B00F9FD37 /* UIKit.framework in Frameworks */, 64 | 2B3AFC2A1C10F35900682B14 /* UserTrackingButton.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 2B1AA8101D1F1A5800DEF421 /* Frameworks */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 2B3F2A351D29A79B00F9FD37 /* UIKit.framework */, 75 | 2B6ED6D11C12553400687203 /* MapKit.framework */, 76 | ); 77 | name = Frameworks; 78 | sourceTree = ""; 79 | }; 80 | 2B3AFC151C10F35900682B14 = { 81 | isa = PBXGroup; 82 | children = ( 83 | 2B3AFC211C10F35900682B14 /* UserTrackingButton */, 84 | 2B3AFC2D1C10F35900682B14 /* UserTrackingButtonTests */, 85 | 2B3AFC201C10F35900682B14 /* Products */, 86 | 2B1AA8101D1F1A5800DEF421 /* Frameworks */, 87 | ); 88 | sourceTree = ""; 89 | }; 90 | 2B3AFC201C10F35900682B14 /* Products */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 2B3AFC1F1C10F35900682B14 /* UserTrackingButton.framework */, 94 | 2B3AFC291C10F35900682B14 /* UserTrackingButtonTests.xctest */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | 2B3AFC211C10F35900682B14 /* UserTrackingButton */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 2B3AFC391C10F43900682B14 /* UserTrackingButton.swift */, 103 | 2B6ED6CD1C122B6B00687203 /* Media.xcassets */, 104 | 2BFBED531C13A6C50075E626 /* Supporting Files */, 105 | ); 106 | path = UserTrackingButton; 107 | sourceTree = ""; 108 | }; 109 | 2B3AFC2D1C10F35900682B14 /* UserTrackingButtonTests */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 2BE654041C594CFD0043E080 /* UserTrackingButton-Bridging-Header.h */, 113 | 2B3AFC301C10F35900682B14 /* Info.plist */, 114 | 2B3F2A371D29A9CC00F9FD37 /* UIView+UIView_NoAnimation.h */, 115 | 2B3F2A381D29A9CC00F9FD37 /* UIView+UIView_NoAnimation.m */, 116 | 2B3F2A331D29A2D900F9FD37 /* UserTrackingButtonTest.swift */, 117 | 2B3F2A3C1D29CF2D00F9FD37 /* MKMapViewStub.h */, 118 | 2B3F2A3D1D29CF2D00F9FD37 /* MKMapViewStub.m */, 119 | ); 120 | path = UserTrackingButtonTests; 121 | sourceTree = ""; 122 | }; 123 | 2BFBED531C13A6C50075E626 /* Supporting Files */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 2B3AFC221C10F35900682B14 /* UserTrackingButton.h */, 127 | 2B3AFC241C10F35900682B14 /* Info.plist */, 128 | ); 129 | name = "Supporting Files"; 130 | sourceTree = ""; 131 | }; 132 | /* End PBXGroup section */ 133 | 134 | /* Begin PBXHeadersBuildPhase section */ 135 | 2B3AFC1C1C10F35900682B14 /* Headers */ = { 136 | isa = PBXHeadersBuildPhase; 137 | buildActionMask = 2147483647; 138 | files = ( 139 | 2B3AFC231C10F35900682B14 /* UserTrackingButton.h in Headers */, 140 | ); 141 | runOnlyForDeploymentPostprocessing = 0; 142 | }; 143 | /* End PBXHeadersBuildPhase section */ 144 | 145 | /* Begin PBXNativeTarget section */ 146 | 2B3AFC1E1C10F35900682B14 /* UserTrackingButton */ = { 147 | isa = PBXNativeTarget; 148 | buildConfigurationList = 2B3AFC331C10F35900682B14 /* Build configuration list for PBXNativeTarget "UserTrackingButton" */; 149 | buildPhases = ( 150 | 2B3AFC1A1C10F35900682B14 /* Sources */, 151 | 2B3AFC1B1C10F35900682B14 /* Frameworks */, 152 | 2B3AFC1C1C10F35900682B14 /* Headers */, 153 | 2B3AFC1D1C10F35900682B14 /* Resources */, 154 | 2B3ECC501C21BC7800DC4E8C /* Set Build Number */, 155 | ); 156 | buildRules = ( 157 | ); 158 | dependencies = ( 159 | ); 160 | name = UserTrackingButton; 161 | productName = UserTrackingButton; 162 | productReference = 2B3AFC1F1C10F35900682B14 /* UserTrackingButton.framework */; 163 | productType = "com.apple.product-type.framework"; 164 | }; 165 | 2B3AFC281C10F35900682B14 /* UserTrackingButtonTests */ = { 166 | isa = PBXNativeTarget; 167 | buildConfigurationList = 2B3AFC361C10F35900682B14 /* Build configuration list for PBXNativeTarget "UserTrackingButtonTests" */; 168 | buildPhases = ( 169 | 2B3AFC251C10F35900682B14 /* Sources */, 170 | 2B3AFC261C10F35900682B14 /* Frameworks */, 171 | 2B3AFC271C10F35900682B14 /* Resources */, 172 | ); 173 | buildRules = ( 174 | ); 175 | dependencies = ( 176 | 2B3AFC2C1C10F35900682B14 /* PBXTargetDependency */, 177 | ); 178 | name = UserTrackingButtonTests; 179 | productName = UserTrackingButtonTests; 180 | productReference = 2B3AFC291C10F35900682B14 /* UserTrackingButtonTests.xctest */; 181 | productType = "com.apple.product-type.bundle.unit-test"; 182 | }; 183 | /* End PBXNativeTarget section */ 184 | 185 | /* Begin PBXProject section */ 186 | 2B3AFC161C10F35900682B14 /* Project object */ = { 187 | isa = PBXProject; 188 | attributes = { 189 | LastSwiftUpdateCheck = 0710; 190 | LastUpgradeCheck = 0900; 191 | ORGANIZATIONNAME = "Mikko Välimäki"; 192 | TargetAttributes = { 193 | 2B3AFC1E1C10F35900682B14 = { 194 | CreatedOnToolsVersion = 7.1.1; 195 | LastSwiftMigration = 0900; 196 | ProvisioningStyle = Manual; 197 | }; 198 | 2B3AFC281C10F35900682B14 = { 199 | CreatedOnToolsVersion = 7.1.1; 200 | LastSwiftMigration = 0900; 201 | ProvisioningStyle = Manual; 202 | }; 203 | }; 204 | }; 205 | buildConfigurationList = 2B3AFC191C10F35900682B14 /* Build configuration list for PBXProject "UserTrackingButton" */; 206 | compatibilityVersion = "Xcode 3.2"; 207 | developmentRegion = English; 208 | hasScannedForEncodings = 0; 209 | knownRegions = ( 210 | en, 211 | ); 212 | mainGroup = 2B3AFC151C10F35900682B14; 213 | productRefGroup = 2B3AFC201C10F35900682B14 /* Products */; 214 | projectDirPath = ""; 215 | projectRoot = ""; 216 | targets = ( 217 | 2B3AFC1E1C10F35900682B14 /* UserTrackingButton */, 218 | 2B3AFC281C10F35900682B14 /* UserTrackingButtonTests */, 219 | ); 220 | }; 221 | /* End PBXProject section */ 222 | 223 | /* Begin PBXResourcesBuildPhase section */ 224 | 2B3AFC1D1C10F35900682B14 /* Resources */ = { 225 | isa = PBXResourcesBuildPhase; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | 2B6ED6CE1C122B6B00687203 /* Media.xcassets in Resources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | 2B3AFC271C10F35900682B14 /* Resources */ = { 233 | isa = PBXResourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | /* End PBXResourcesBuildPhase section */ 240 | 241 | /* Begin PBXShellScriptBuildPhase section */ 242 | 2B3ECC501C21BC7800DC4E8C /* Set Build Number */ = { 243 | isa = PBXShellScriptBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | ); 247 | inputPaths = ( 248 | ); 249 | name = "Set Build Number"; 250 | outputPaths = ( 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | shellPath = /bin/sh; 254 | shellScript = "#\n# Set the build number to the current git commit count.\n# If we're using the Dev scheme, then we'll suffix the build\n# number with the current branch name, to make collisions\n# far less likely across feature branches.\n# Based on: http://w3facility.info/question/how-do-i-force-xcode-to-rebuild-the-info-plist-file-in-my-project-every-time-i-build-the-project/\n# From: http://blog.jaredsinclair.com/post/97193356620/the-best-of-all-possible-xcode-automated-build\n\ngit=`sh /etc/profile; which git`\necho \"Using $CONFIGURATION configuration\"\nbranchName=`\"$git\" rev-parse --abbrev-ref HEAD`\necho \"Building from branch $branchName\"\n\nappBuild=`\"$git\" rev-list head |wc -l`\nappBuildOffset=$(($CFBundleVersionOffset+0))\nisNum='^-?[0-9]+$'\nif [ $appBuildOffset -ne 0 ]; then\necho \"warning: Using build offset $appBuildOffset\"\nfi\nappBuild=$(($appBuild+$appBuildOffset))\necho \"Build $appBuild\"\n\nif [ $CONFIGURATION = \"Debug\" ]; then\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $appBuild-$branchName\" \"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\nelse\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $appBuild\" \"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\nfi\necho \"Updated ${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\n"; 255 | }; 256 | /* End PBXShellScriptBuildPhase section */ 257 | 258 | /* Begin PBXSourcesBuildPhase section */ 259 | 2B3AFC1A1C10F35900682B14 /* Sources */ = { 260 | isa = PBXSourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | 2B3AFC3A1C10F43900682B14 /* UserTrackingButton.swift in Sources */, 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | 2B3AFC251C10F35900682B14 /* Sources */ = { 268 | isa = PBXSourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | 2BE654061C594D2C0043E080 /* UserTrackingButton.swift in Sources */, 272 | 2B3F2A3E1D29CF2D00F9FD37 /* MKMapViewStub.m in Sources */, 273 | 2B3F2A341D29A2D900F9FD37 /* UserTrackingButtonTest.swift in Sources */, 274 | 2B3F2A391D29A9CC00F9FD37 /* UIView+UIView_NoAnimation.m in Sources */, 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | }; 278 | /* End PBXSourcesBuildPhase section */ 279 | 280 | /* Begin PBXTargetDependency section */ 281 | 2B3AFC2C1C10F35900682B14 /* PBXTargetDependency */ = { 282 | isa = PBXTargetDependency; 283 | target = 2B3AFC1E1C10F35900682B14 /* UserTrackingButton */; 284 | targetProxy = 2B3AFC2B1C10F35900682B14 /* PBXContainerItemProxy */; 285 | }; 286 | /* End PBXTargetDependency section */ 287 | 288 | /* Begin XCBuildConfiguration section */ 289 | 2B3AFC311C10F35900682B14 /* Debug */ = { 290 | isa = XCBuildConfiguration; 291 | buildSettings = { 292 | ALWAYS_SEARCH_USER_PATHS = NO; 293 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 294 | CLANG_CXX_LIBRARY = "libc++"; 295 | CLANG_ENABLE_MODULES = YES; 296 | CLANG_ENABLE_OBJC_ARC = YES; 297 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 298 | CLANG_WARN_BOOL_CONVERSION = YES; 299 | CLANG_WARN_COMMA = YES; 300 | CLANG_WARN_CONSTANT_CONVERSION = YES; 301 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 302 | CLANG_WARN_EMPTY_BODY = YES; 303 | CLANG_WARN_ENUM_CONVERSION = YES; 304 | CLANG_WARN_INFINITE_RECURSION = YES; 305 | CLANG_WARN_INT_CONVERSION = YES; 306 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 307 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 308 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 309 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 310 | CLANG_WARN_STRICT_PROTOTYPES = YES; 311 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 312 | CLANG_WARN_UNREACHABLE_CODE = YES; 313 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 314 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 315 | COPY_PHASE_STRIP = NO; 316 | CURRENT_PROJECT_VERSION = 1; 317 | DEBUG_INFORMATION_FORMAT = dwarf; 318 | ENABLE_STRICT_OBJC_MSGSEND = YES; 319 | ENABLE_TESTABILITY = YES; 320 | GCC_C_LANGUAGE_STANDARD = gnu99; 321 | GCC_DYNAMIC_NO_PIC = NO; 322 | GCC_NO_COMMON_BLOCKS = YES; 323 | GCC_OPTIMIZATION_LEVEL = 0; 324 | GCC_PREPROCESSOR_DEFINITIONS = ( 325 | "DEBUG=1", 326 | "$(inherited)", 327 | ); 328 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 329 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 330 | GCC_WARN_UNDECLARED_SELECTOR = YES; 331 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 332 | GCC_WARN_UNUSED_FUNCTION = YES; 333 | GCC_WARN_UNUSED_VARIABLE = YES; 334 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 335 | MTL_ENABLE_DEBUG_INFO = YES; 336 | ONLY_ACTIVE_ARCH = YES; 337 | SDKROOT = iphoneos; 338 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 339 | TARGETED_DEVICE_FAMILY = "1,2"; 340 | VERSIONING_SYSTEM = "apple-generic"; 341 | VERSION_INFO_PREFIX = ""; 342 | }; 343 | name = Debug; 344 | }; 345 | 2B3AFC321C10F35900682B14 /* Release */ = { 346 | isa = XCBuildConfiguration; 347 | buildSettings = { 348 | ALWAYS_SEARCH_USER_PATHS = NO; 349 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 350 | CLANG_CXX_LIBRARY = "libc++"; 351 | CLANG_ENABLE_MODULES = YES; 352 | CLANG_ENABLE_OBJC_ARC = YES; 353 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 354 | CLANG_WARN_BOOL_CONVERSION = YES; 355 | CLANG_WARN_COMMA = YES; 356 | CLANG_WARN_CONSTANT_CONVERSION = YES; 357 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 358 | CLANG_WARN_EMPTY_BODY = YES; 359 | CLANG_WARN_ENUM_CONVERSION = YES; 360 | CLANG_WARN_INFINITE_RECURSION = YES; 361 | CLANG_WARN_INT_CONVERSION = YES; 362 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 363 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 365 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 366 | CLANG_WARN_STRICT_PROTOTYPES = YES; 367 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 368 | CLANG_WARN_UNREACHABLE_CODE = YES; 369 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 370 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 371 | COPY_PHASE_STRIP = NO; 372 | CURRENT_PROJECT_VERSION = 1; 373 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 374 | ENABLE_NS_ASSERTIONS = NO; 375 | ENABLE_STRICT_OBJC_MSGSEND = YES; 376 | GCC_C_LANGUAGE_STANDARD = gnu99; 377 | GCC_NO_COMMON_BLOCKS = YES; 378 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 379 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 380 | GCC_WARN_UNDECLARED_SELECTOR = YES; 381 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 382 | GCC_WARN_UNUSED_FUNCTION = YES; 383 | GCC_WARN_UNUSED_VARIABLE = YES; 384 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 385 | MTL_ENABLE_DEBUG_INFO = NO; 386 | SDKROOT = iphoneos; 387 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 388 | TARGETED_DEVICE_FAMILY = "1,2"; 389 | VALIDATE_PRODUCT = YES; 390 | VERSIONING_SYSTEM = "apple-generic"; 391 | VERSION_INFO_PREFIX = ""; 392 | }; 393 | name = Release; 394 | }; 395 | 2B3AFC341C10F35900682B14 /* Debug */ = { 396 | isa = XCBuildConfiguration; 397 | buildSettings = { 398 | DEFINES_MODULE = YES; 399 | DEVELOPMENT_TEAM = ""; 400 | DYLIB_COMPATIBILITY_VERSION = 1; 401 | DYLIB_CURRENT_VERSION = 1; 402 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 403 | INFOPLIST_FILE = UserTrackingButton/Info.plist; 404 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 405 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 406 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 407 | PRODUCT_BUNDLE_IDENTIFIER = com.mikkovalimaki.UserTrackingButton; 408 | PRODUCT_NAME = "$(TARGET_NAME)"; 409 | SKIP_INSTALL = YES; 410 | SWIFT_VERSION = 4.0; 411 | }; 412 | name = Debug; 413 | }; 414 | 2B3AFC351C10F35900682B14 /* Release */ = { 415 | isa = XCBuildConfiguration; 416 | buildSettings = { 417 | DEFINES_MODULE = YES; 418 | DEVELOPMENT_TEAM = ""; 419 | DYLIB_COMPATIBILITY_VERSION = 1; 420 | DYLIB_CURRENT_VERSION = 1; 421 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 422 | INFOPLIST_FILE = UserTrackingButton/Info.plist; 423 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 424 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 425 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 426 | PRODUCT_BUNDLE_IDENTIFIER = com.mikkovalimaki.UserTrackingButton; 427 | PRODUCT_NAME = "$(TARGET_NAME)"; 428 | SKIP_INSTALL = YES; 429 | SWIFT_VERSION = 4.0; 430 | }; 431 | name = Release; 432 | }; 433 | 2B3AFC371C10F35900682B14 /* Debug */ = { 434 | isa = XCBuildConfiguration; 435 | buildSettings = { 436 | DEVELOPMENT_TEAM = ""; 437 | INFOPLIST_FILE = UserTrackingButtonTests/Info.plist; 438 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 439 | PRODUCT_BUNDLE_IDENTIFIER = com.mikkovalimaki.UserTrackingButtonTests; 440 | PRODUCT_NAME = "$(TARGET_NAME)"; 441 | SWIFT_OBJC_BRIDGING_HEADER = "UserTrackingButtonTests/UserTrackingButton-Bridging-Header.h"; 442 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 443 | SWIFT_VERSION = 4.0; 444 | }; 445 | name = Debug; 446 | }; 447 | 2B3AFC381C10F35900682B14 /* Release */ = { 448 | isa = XCBuildConfiguration; 449 | buildSettings = { 450 | DEVELOPMENT_TEAM = ""; 451 | INFOPLIST_FILE = UserTrackingButtonTests/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 453 | PRODUCT_BUNDLE_IDENTIFIER = com.mikkovalimaki.UserTrackingButtonTests; 454 | PRODUCT_NAME = "$(TARGET_NAME)"; 455 | SWIFT_OBJC_BRIDGING_HEADER = "UserTrackingButtonTests/UserTrackingButton-Bridging-Header.h"; 456 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 457 | SWIFT_VERSION = 4.0; 458 | }; 459 | name = Release; 460 | }; 461 | /* End XCBuildConfiguration section */ 462 | 463 | /* Begin XCConfigurationList section */ 464 | 2B3AFC191C10F35900682B14 /* Build configuration list for PBXProject "UserTrackingButton" */ = { 465 | isa = XCConfigurationList; 466 | buildConfigurations = ( 467 | 2B3AFC311C10F35900682B14 /* Debug */, 468 | 2B3AFC321C10F35900682B14 /* Release */, 469 | ); 470 | defaultConfigurationIsVisible = 0; 471 | defaultConfigurationName = Release; 472 | }; 473 | 2B3AFC331C10F35900682B14 /* Build configuration list for PBXNativeTarget "UserTrackingButton" */ = { 474 | isa = XCConfigurationList; 475 | buildConfigurations = ( 476 | 2B3AFC341C10F35900682B14 /* Debug */, 477 | 2B3AFC351C10F35900682B14 /* Release */, 478 | ); 479 | defaultConfigurationIsVisible = 0; 480 | defaultConfigurationName = Release; 481 | }; 482 | 2B3AFC361C10F35900682B14 /* Build configuration list for PBXNativeTarget "UserTrackingButtonTests" */ = { 483 | isa = XCConfigurationList; 484 | buildConfigurations = ( 485 | 2B3AFC371C10F35900682B14 /* Debug */, 486 | 2B3AFC381C10F35900682B14 /* Release */, 487 | ); 488 | defaultConfigurationIsVisible = 0; 489 | defaultConfigurationName = Release; 490 | }; 491 | /* End XCConfigurationList section */ 492 | }; 493 | rootObject = 2B3AFC161C10F35900682B14 /* Project object */; 494 | } 495 | -------------------------------------------------------------------------------- /UserTrackingButtonExample/UserTrackingButtonExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2BCBD47E1F764BFF00321D5A /* UserTrackingButton.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BCBD47F1F764BFF00321D5A /* UserTrackingButton.framework */; }; 11 | 2BFBEDDD1C14F1650075E626 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BFBEDDC1C14F1650075E626 /* AppDelegate.swift */; }; 12 | 2BFBEDDF1C14F1650075E626 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BFBEDDE1C14F1650075E626 /* ViewController.swift */; }; 13 | 2BFBEDE21C14F1650075E626 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2BFBEDE01C14F1650075E626 /* Main.storyboard */; }; 14 | 2BFBEDE41C14F1650075E626 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2BFBEDE31C14F1650075E626 /* Assets.xcassets */; }; 15 | 2BFBEDE71C14F1650075E626 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2BFBEDE51C14F1650075E626 /* LaunchScreen.storyboard */; }; 16 | 2BFBEDF21C14F1650075E626 /* UserTrackingButtonExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BFBEDF11C14F1650075E626 /* UserTrackingButtonExampleTests.swift */; }; 17 | 2BFBEDFD1C14F1650075E626 /* UserTrackingButtonExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BFBEDFC1C14F1650075E626 /* UserTrackingButtonExampleUITests.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 2BA83B841F826D6A00992036 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 2BA83B7F1F826D6A00992036 /* UserTrackingButton.xcodeproj */; 24 | proxyType = 2; 25 | remoteGlobalIDString = 2B3AFC1F1C10F35900682B14; 26 | remoteInfo = UserTrackingButton; 27 | }; 28 | 2BA83B861F826D6A00992036 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 2BA83B7F1F826D6A00992036 /* UserTrackingButton.xcodeproj */; 31 | proxyType = 2; 32 | remoteGlobalIDString = 2B3AFC291C10F35900682B14; 33 | remoteInfo = UserTrackingButtonTests; 34 | }; 35 | 2BA83B881F826D7500992036 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = 2BA83B7F1F826D6A00992036 /* UserTrackingButton.xcodeproj */; 38 | proxyType = 1; 39 | remoteGlobalIDString = 2B3AFC1E1C10F35900682B14; 40 | remoteInfo = UserTrackingButton; 41 | }; 42 | 2BFBEDEE1C14F1650075E626 /* PBXContainerItemProxy */ = { 43 | isa = PBXContainerItemProxy; 44 | containerPortal = 2BFBEDD11C14F1650075E626 /* Project object */; 45 | proxyType = 1; 46 | remoteGlobalIDString = 2BFBEDD81C14F1650075E626; 47 | remoteInfo = UserTrackingButtonExample; 48 | }; 49 | 2BFBEDF91C14F1650075E626 /* PBXContainerItemProxy */ = { 50 | isa = PBXContainerItemProxy; 51 | containerPortal = 2BFBEDD11C14F1650075E626 /* Project object */; 52 | proxyType = 1; 53 | remoteGlobalIDString = 2BFBEDD81C14F1650075E626; 54 | remoteInfo = UserTrackingButtonExample; 55 | }; 56 | /* End PBXContainerItemProxy section */ 57 | 58 | /* Begin PBXCopyFilesBuildPhase section */ 59 | 2BCA0C3C1C1E199F002CB87E /* Embed Frameworks */ = { 60 | isa = PBXCopyFilesBuildPhase; 61 | buildActionMask = 2147483647; 62 | dstPath = ""; 63 | dstSubfolderSpec = 10; 64 | files = ( 65 | ); 66 | name = "Embed Frameworks"; 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXCopyFilesBuildPhase section */ 70 | 71 | /* Begin PBXFileReference section */ 72 | 2B1AA8951D1F2AE300DEF421 /* UserTrackingButton.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserTrackingButton.framework; path = "/Users/mval/Development/Personal/UserTrackingButton/UserTrackingButtonExample/DerivedData/UserTrackingButtonExample/Build/Products/Debug-iphoneos/UserTrackingButton.framework"; sourceTree = ""; }; 73 | 2BA83B7F1F826D6A00992036 /* UserTrackingButton.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = UserTrackingButton.xcodeproj; path = ../UserTrackingButton.xcodeproj; sourceTree = ""; }; 74 | 2BCBD47F1F764BFF00321D5A /* UserTrackingButton.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = UserTrackingButton.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | 2BFBEDD91C14F1650075E626 /* UserTrackingButtonExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UserTrackingButtonExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 76 | 2BFBEDDC1C14F1650075E626 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 77 | 2BFBEDDE1C14F1650075E626 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 78 | 2BFBEDE11C14F1650075E626 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 79 | 2BFBEDE31C14F1650075E626 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 80 | 2BFBEDE61C14F1650075E626 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 81 | 2BFBEDE81C14F1650075E626 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 82 | 2BFBEDED1C14F1650075E626 /* UserTrackingButtonExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UserTrackingButtonExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | 2BFBEDF11C14F1650075E626 /* UserTrackingButtonExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserTrackingButtonExampleTests.swift; sourceTree = ""; }; 84 | 2BFBEDF31C14F1650075E626 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 85 | 2BFBEDF81C14F1650075E626 /* UserTrackingButtonExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UserTrackingButtonExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 86 | 2BFBEDFC1C14F1650075E626 /* UserTrackingButtonExampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserTrackingButtonExampleUITests.swift; sourceTree = ""; }; 87 | 2BFBEDFE1C14F1650075E626 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 88 | /* End PBXFileReference section */ 89 | 90 | /* Begin PBXFrameworksBuildPhase section */ 91 | 2BFBEDD61C14F1650075E626 /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | 2BCBD47E1F764BFF00321D5A /* UserTrackingButton.framework in Frameworks */, 96 | ); 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | 2BFBEDEA1C14F1650075E626 /* Frameworks */ = { 100 | isa = PBXFrameworksBuildPhase; 101 | buildActionMask = 2147483647; 102 | files = ( 103 | ); 104 | runOnlyForDeploymentPostprocessing = 0; 105 | }; 106 | 2BFBEDF51C14F1650075E626 /* Frameworks */ = { 107 | isa = PBXFrameworksBuildPhase; 108 | buildActionMask = 2147483647; 109 | files = ( 110 | ); 111 | runOnlyForDeploymentPostprocessing = 0; 112 | }; 113 | /* End PBXFrameworksBuildPhase section */ 114 | 115 | /* Begin PBXGroup section */ 116 | 2B1AA8991D1F2B2E00DEF421 /* Frameworks */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 2BCBD47F1F764BFF00321D5A /* UserTrackingButton.framework */, 120 | ); 121 | name = Frameworks; 122 | sourceTree = ""; 123 | }; 124 | 2B7F59031F75AAEB00692096 /* Recovered References */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 2B1AA8951D1F2AE300DEF421 /* UserTrackingButton.framework */, 128 | ); 129 | name = "Recovered References"; 130 | sourceTree = ""; 131 | }; 132 | 2BA83B801F826D6A00992036 /* Products */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 2BA83B851F826D6A00992036 /* UserTrackingButton.framework */, 136 | 2BA83B871F826D6A00992036 /* UserTrackingButtonTests.xctest */, 137 | ); 138 | name = Products; 139 | sourceTree = ""; 140 | }; 141 | 2BFBEDD01C14F1650075E626 = { 142 | isa = PBXGroup; 143 | children = ( 144 | 2BA83B7F1F826D6A00992036 /* UserTrackingButton.xcodeproj */, 145 | 2BFBEDDB1C14F1650075E626 /* UserTrackingButtonExample */, 146 | 2BFBEDF01C14F1650075E626 /* UserTrackingButtonExampleTests */, 147 | 2BFBEDFB1C14F1650075E626 /* UserTrackingButtonExampleUITests */, 148 | 2BFBEDDA1C14F1650075E626 /* Products */, 149 | 2B1AA8991D1F2B2E00DEF421 /* Frameworks */, 150 | 2B7F59031F75AAEB00692096 /* Recovered References */, 151 | ); 152 | sourceTree = ""; 153 | }; 154 | 2BFBEDDA1C14F1650075E626 /* Products */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 2BFBEDD91C14F1650075E626 /* UserTrackingButtonExample.app */, 158 | 2BFBEDED1C14F1650075E626 /* UserTrackingButtonExampleTests.xctest */, 159 | 2BFBEDF81C14F1650075E626 /* UserTrackingButtonExampleUITests.xctest */, 160 | ); 161 | name = Products; 162 | sourceTree = ""; 163 | }; 164 | 2BFBEDDB1C14F1650075E626 /* UserTrackingButtonExample */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | 2BFBEDDC1C14F1650075E626 /* AppDelegate.swift */, 168 | 2BFBEDDE1C14F1650075E626 /* ViewController.swift */, 169 | 2BFBEDE01C14F1650075E626 /* Main.storyboard */, 170 | 2BFBEDE31C14F1650075E626 /* Assets.xcassets */, 171 | 2BFBEDE51C14F1650075E626 /* LaunchScreen.storyboard */, 172 | 2BFBEDE81C14F1650075E626 /* Info.plist */, 173 | ); 174 | path = UserTrackingButtonExample; 175 | sourceTree = ""; 176 | }; 177 | 2BFBEDF01C14F1650075E626 /* UserTrackingButtonExampleTests */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | 2BFBEDF11C14F1650075E626 /* UserTrackingButtonExampleTests.swift */, 181 | 2BFBEDF31C14F1650075E626 /* Info.plist */, 182 | ); 183 | path = UserTrackingButtonExampleTests; 184 | sourceTree = ""; 185 | }; 186 | 2BFBEDFB1C14F1650075E626 /* UserTrackingButtonExampleUITests */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | 2BFBEDFC1C14F1650075E626 /* UserTrackingButtonExampleUITests.swift */, 190 | 2BFBEDFE1C14F1650075E626 /* Info.plist */, 191 | ); 192 | path = UserTrackingButtonExampleUITests; 193 | sourceTree = ""; 194 | }; 195 | /* End PBXGroup section */ 196 | 197 | /* Begin PBXNativeTarget section */ 198 | 2BFBEDD81C14F1650075E626 /* UserTrackingButtonExample */ = { 199 | isa = PBXNativeTarget; 200 | buildConfigurationList = 2BFBEE011C14F1650075E626 /* Build configuration list for PBXNativeTarget "UserTrackingButtonExample" */; 201 | buildPhases = ( 202 | 2BFBEDD51C14F1650075E626 /* Sources */, 203 | 2BFBEDD61C14F1650075E626 /* Frameworks */, 204 | 2BFBEDD71C14F1650075E626 /* Resources */, 205 | 2BCA0C3C1C1E199F002CB87E /* Embed Frameworks */, 206 | 2B3ECC4E1C21BC4F00DC4E8C /* Set Build Number */, 207 | ); 208 | buildRules = ( 209 | ); 210 | dependencies = ( 211 | 2BA83B891F826D7500992036 /* PBXTargetDependency */, 212 | ); 213 | name = UserTrackingButtonExample; 214 | productName = UserTrackingButtonExample; 215 | productReference = 2BFBEDD91C14F1650075E626 /* UserTrackingButtonExample.app */; 216 | productType = "com.apple.product-type.application"; 217 | }; 218 | 2BFBEDEC1C14F1650075E626 /* UserTrackingButtonExampleTests */ = { 219 | isa = PBXNativeTarget; 220 | buildConfigurationList = 2BFBEE041C14F1650075E626 /* Build configuration list for PBXNativeTarget "UserTrackingButtonExampleTests" */; 221 | buildPhases = ( 222 | 2BFBEDE91C14F1650075E626 /* Sources */, 223 | 2BFBEDEA1C14F1650075E626 /* Frameworks */, 224 | 2BFBEDEB1C14F1650075E626 /* Resources */, 225 | ); 226 | buildRules = ( 227 | ); 228 | dependencies = ( 229 | 2BFBEDEF1C14F1650075E626 /* PBXTargetDependency */, 230 | ); 231 | name = UserTrackingButtonExampleTests; 232 | productName = UserTrackingButtonExampleTests; 233 | productReference = 2BFBEDED1C14F1650075E626 /* UserTrackingButtonExampleTests.xctest */; 234 | productType = "com.apple.product-type.bundle.unit-test"; 235 | }; 236 | 2BFBEDF71C14F1650075E626 /* UserTrackingButtonExampleUITests */ = { 237 | isa = PBXNativeTarget; 238 | buildConfigurationList = 2BFBEE071C14F1650075E626 /* Build configuration list for PBXNativeTarget "UserTrackingButtonExampleUITests" */; 239 | buildPhases = ( 240 | 2BFBEDF41C14F1650075E626 /* Sources */, 241 | 2BFBEDF51C14F1650075E626 /* Frameworks */, 242 | 2BFBEDF61C14F1650075E626 /* Resources */, 243 | ); 244 | buildRules = ( 245 | ); 246 | dependencies = ( 247 | 2BFBEDFA1C14F1650075E626 /* PBXTargetDependency */, 248 | ); 249 | name = UserTrackingButtonExampleUITests; 250 | productName = UserTrackingButtonExampleUITests; 251 | productReference = 2BFBEDF81C14F1650075E626 /* UserTrackingButtonExampleUITests.xctest */; 252 | productType = "com.apple.product-type.bundle.ui-testing"; 253 | }; 254 | /* End PBXNativeTarget section */ 255 | 256 | /* Begin PBXProject section */ 257 | 2BFBEDD11C14F1650075E626 /* Project object */ = { 258 | isa = PBXProject; 259 | attributes = { 260 | LastSwiftUpdateCheck = 0710; 261 | LastUpgradeCheck = 0900; 262 | ORGANIZATIONNAME = "Mikko Välimäki"; 263 | TargetAttributes = { 264 | 2BFBEDD81C14F1650075E626 = { 265 | CreatedOnToolsVersion = 7.1.1; 266 | }; 267 | 2BFBEDEC1C14F1650075E626 = { 268 | CreatedOnToolsVersion = 7.1.1; 269 | TestTargetID = 2BFBEDD81C14F1650075E626; 270 | }; 271 | 2BFBEDF71C14F1650075E626 = { 272 | CreatedOnToolsVersion = 7.1.1; 273 | TestTargetID = 2BFBEDD81C14F1650075E626; 274 | }; 275 | }; 276 | }; 277 | buildConfigurationList = 2BFBEDD41C14F1650075E626 /* Build configuration list for PBXProject "UserTrackingButtonExample" */; 278 | compatibilityVersion = "Xcode 3.2"; 279 | developmentRegion = English; 280 | hasScannedForEncodings = 0; 281 | knownRegions = ( 282 | en, 283 | Base, 284 | ); 285 | mainGroup = 2BFBEDD01C14F1650075E626; 286 | productRefGroup = 2BFBEDDA1C14F1650075E626 /* Products */; 287 | projectDirPath = ""; 288 | projectReferences = ( 289 | { 290 | ProductGroup = 2BA83B801F826D6A00992036 /* Products */; 291 | ProjectRef = 2BA83B7F1F826D6A00992036 /* UserTrackingButton.xcodeproj */; 292 | }, 293 | ); 294 | projectRoot = ""; 295 | targets = ( 296 | 2BFBEDD81C14F1650075E626 /* UserTrackingButtonExample */, 297 | 2BFBEDEC1C14F1650075E626 /* UserTrackingButtonExampleTests */, 298 | 2BFBEDF71C14F1650075E626 /* UserTrackingButtonExampleUITests */, 299 | ); 300 | }; 301 | /* End PBXProject section */ 302 | 303 | /* Begin PBXReferenceProxy section */ 304 | 2BA83B851F826D6A00992036 /* UserTrackingButton.framework */ = { 305 | isa = PBXReferenceProxy; 306 | fileType = wrapper.framework; 307 | path = UserTrackingButton.framework; 308 | remoteRef = 2BA83B841F826D6A00992036 /* PBXContainerItemProxy */; 309 | sourceTree = BUILT_PRODUCTS_DIR; 310 | }; 311 | 2BA83B871F826D6A00992036 /* UserTrackingButtonTests.xctest */ = { 312 | isa = PBXReferenceProxy; 313 | fileType = wrapper.cfbundle; 314 | path = UserTrackingButtonTests.xctest; 315 | remoteRef = 2BA83B861F826D6A00992036 /* PBXContainerItemProxy */; 316 | sourceTree = BUILT_PRODUCTS_DIR; 317 | }; 318 | /* End PBXReferenceProxy section */ 319 | 320 | /* Begin PBXResourcesBuildPhase section */ 321 | 2BFBEDD71C14F1650075E626 /* Resources */ = { 322 | isa = PBXResourcesBuildPhase; 323 | buildActionMask = 2147483647; 324 | files = ( 325 | 2BFBEDE71C14F1650075E626 /* LaunchScreen.storyboard in Resources */, 326 | 2BFBEDE41C14F1650075E626 /* Assets.xcassets in Resources */, 327 | 2BFBEDE21C14F1650075E626 /* Main.storyboard in Resources */, 328 | ); 329 | runOnlyForDeploymentPostprocessing = 0; 330 | }; 331 | 2BFBEDEB1C14F1650075E626 /* Resources */ = { 332 | isa = PBXResourcesBuildPhase; 333 | buildActionMask = 2147483647; 334 | files = ( 335 | ); 336 | runOnlyForDeploymentPostprocessing = 0; 337 | }; 338 | 2BFBEDF61C14F1650075E626 /* Resources */ = { 339 | isa = PBXResourcesBuildPhase; 340 | buildActionMask = 2147483647; 341 | files = ( 342 | ); 343 | runOnlyForDeploymentPostprocessing = 0; 344 | }; 345 | /* End PBXResourcesBuildPhase section */ 346 | 347 | /* Begin PBXShellScriptBuildPhase section */ 348 | 2B3ECC4E1C21BC4F00DC4E8C /* Set Build Number */ = { 349 | isa = PBXShellScriptBuildPhase; 350 | buildActionMask = 2147483647; 351 | files = ( 352 | ); 353 | inputPaths = ( 354 | ); 355 | name = "Set Build Number"; 356 | outputPaths = ( 357 | ); 358 | runOnlyForDeploymentPostprocessing = 0; 359 | shellPath = /bin/sh; 360 | shellScript = "#\n# Set the build number to the current git commit count.\n# If we're using the Dev scheme, then we'll suffix the build\n# number with the current branch name, to make collisions\n# far less likely across feature branches.\n# Based on: http://w3facility.info/question/how-do-i-force-xcode-to-rebuild-the-info-plist-file-in-my-project-every-time-i-build-the-project/\n# From: http://blog.jaredsinclair.com/post/97193356620/the-best-of-all-possible-xcode-automated-build\n\ngit=`sh /etc/profile; which git`\necho \"Using $CONFIGURATION configuration\"\nbranchName=`\"$git\" rev-parse --abbrev-ref HEAD`\necho \"Building from branch $branchName\"\n\nappBuild=`\"$git\" rev-list head |wc -l`\nappBuildOffset=$(($CFBundleVersionOffset+0))\nisNum='^-?[0-9]+$'\nif [ $appBuildOffset -ne 0 ]; then\necho \"warning: Using build offset $appBuildOffset\"\nfi\nappBuild=$(($appBuild+$appBuildOffset))\necho \"Build $appBuild\"\n\nif [ $CONFIGURATION = \"Debug\" ]; then\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $appBuild-$branchName\" \"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\nelse\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $appBuild\" \"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\nfi\necho \"Updated ${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\n"; 361 | }; 362 | /* End PBXShellScriptBuildPhase section */ 363 | 364 | /* Begin PBXSourcesBuildPhase section */ 365 | 2BFBEDD51C14F1650075E626 /* Sources */ = { 366 | isa = PBXSourcesBuildPhase; 367 | buildActionMask = 2147483647; 368 | files = ( 369 | 2BFBEDDF1C14F1650075E626 /* ViewController.swift in Sources */, 370 | 2BFBEDDD1C14F1650075E626 /* AppDelegate.swift in Sources */, 371 | ); 372 | runOnlyForDeploymentPostprocessing = 0; 373 | }; 374 | 2BFBEDE91C14F1650075E626 /* Sources */ = { 375 | isa = PBXSourcesBuildPhase; 376 | buildActionMask = 2147483647; 377 | files = ( 378 | 2BFBEDF21C14F1650075E626 /* UserTrackingButtonExampleTests.swift in Sources */, 379 | ); 380 | runOnlyForDeploymentPostprocessing = 0; 381 | }; 382 | 2BFBEDF41C14F1650075E626 /* Sources */ = { 383 | isa = PBXSourcesBuildPhase; 384 | buildActionMask = 2147483647; 385 | files = ( 386 | 2BFBEDFD1C14F1650075E626 /* UserTrackingButtonExampleUITests.swift in Sources */, 387 | ); 388 | runOnlyForDeploymentPostprocessing = 0; 389 | }; 390 | /* End PBXSourcesBuildPhase section */ 391 | 392 | /* Begin PBXTargetDependency section */ 393 | 2BA83B891F826D7500992036 /* PBXTargetDependency */ = { 394 | isa = PBXTargetDependency; 395 | name = UserTrackingButton; 396 | targetProxy = 2BA83B881F826D7500992036 /* PBXContainerItemProxy */; 397 | }; 398 | 2BFBEDEF1C14F1650075E626 /* PBXTargetDependency */ = { 399 | isa = PBXTargetDependency; 400 | target = 2BFBEDD81C14F1650075E626 /* UserTrackingButtonExample */; 401 | targetProxy = 2BFBEDEE1C14F1650075E626 /* PBXContainerItemProxy */; 402 | }; 403 | 2BFBEDFA1C14F1650075E626 /* PBXTargetDependency */ = { 404 | isa = PBXTargetDependency; 405 | target = 2BFBEDD81C14F1650075E626 /* UserTrackingButtonExample */; 406 | targetProxy = 2BFBEDF91C14F1650075E626 /* PBXContainerItemProxy */; 407 | }; 408 | /* End PBXTargetDependency section */ 409 | 410 | /* Begin PBXVariantGroup section */ 411 | 2BFBEDE01C14F1650075E626 /* Main.storyboard */ = { 412 | isa = PBXVariantGroup; 413 | children = ( 414 | 2BFBEDE11C14F1650075E626 /* Base */, 415 | ); 416 | name = Main.storyboard; 417 | sourceTree = ""; 418 | }; 419 | 2BFBEDE51C14F1650075E626 /* LaunchScreen.storyboard */ = { 420 | isa = PBXVariantGroup; 421 | children = ( 422 | 2BFBEDE61C14F1650075E626 /* Base */, 423 | ); 424 | name = LaunchScreen.storyboard; 425 | sourceTree = ""; 426 | }; 427 | /* End PBXVariantGroup section */ 428 | 429 | /* Begin XCBuildConfiguration section */ 430 | 2BFBEDFF1C14F1650075E626 /* Debug */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | ALWAYS_SEARCH_USER_PATHS = NO; 434 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 435 | CLANG_CXX_LIBRARY = "libc++"; 436 | CLANG_ENABLE_MODULES = YES; 437 | CLANG_ENABLE_OBJC_ARC = YES; 438 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 439 | CLANG_WARN_BOOL_CONVERSION = YES; 440 | CLANG_WARN_COMMA = YES; 441 | CLANG_WARN_CONSTANT_CONVERSION = YES; 442 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 443 | CLANG_WARN_EMPTY_BODY = YES; 444 | CLANG_WARN_ENUM_CONVERSION = YES; 445 | CLANG_WARN_INFINITE_RECURSION = YES; 446 | CLANG_WARN_INT_CONVERSION = YES; 447 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 448 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 449 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 450 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 451 | CLANG_WARN_STRICT_PROTOTYPES = YES; 452 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 453 | CLANG_WARN_UNREACHABLE_CODE = YES; 454 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 455 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 456 | COPY_PHASE_STRIP = NO; 457 | DEBUG_INFORMATION_FORMAT = dwarf; 458 | ENABLE_STRICT_OBJC_MSGSEND = YES; 459 | ENABLE_TESTABILITY = YES; 460 | GCC_C_LANGUAGE_STANDARD = gnu99; 461 | GCC_DYNAMIC_NO_PIC = NO; 462 | GCC_NO_COMMON_BLOCKS = YES; 463 | GCC_OPTIMIZATION_LEVEL = 0; 464 | GCC_PREPROCESSOR_DEFINITIONS = ( 465 | "DEBUG=1", 466 | "$(inherited)", 467 | ); 468 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 469 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 470 | GCC_WARN_UNDECLARED_SELECTOR = YES; 471 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 472 | GCC_WARN_UNUSED_FUNCTION = YES; 473 | GCC_WARN_UNUSED_VARIABLE = YES; 474 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 475 | MTL_ENABLE_DEBUG_INFO = YES; 476 | ONLY_ACTIVE_ARCH = YES; 477 | SDKROOT = iphoneos; 478 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 479 | }; 480 | name = Debug; 481 | }; 482 | 2BFBEE001C14F1650075E626 /* Release */ = { 483 | isa = XCBuildConfiguration; 484 | buildSettings = { 485 | ALWAYS_SEARCH_USER_PATHS = NO; 486 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 487 | CLANG_CXX_LIBRARY = "libc++"; 488 | CLANG_ENABLE_MODULES = YES; 489 | CLANG_ENABLE_OBJC_ARC = YES; 490 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 491 | CLANG_WARN_BOOL_CONVERSION = YES; 492 | CLANG_WARN_COMMA = YES; 493 | CLANG_WARN_CONSTANT_CONVERSION = YES; 494 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 495 | CLANG_WARN_EMPTY_BODY = YES; 496 | CLANG_WARN_ENUM_CONVERSION = YES; 497 | CLANG_WARN_INFINITE_RECURSION = YES; 498 | CLANG_WARN_INT_CONVERSION = YES; 499 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 500 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 501 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 502 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 503 | CLANG_WARN_STRICT_PROTOTYPES = YES; 504 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 505 | CLANG_WARN_UNREACHABLE_CODE = YES; 506 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 507 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 508 | COPY_PHASE_STRIP = NO; 509 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 510 | ENABLE_NS_ASSERTIONS = NO; 511 | ENABLE_STRICT_OBJC_MSGSEND = YES; 512 | GCC_C_LANGUAGE_STANDARD = gnu99; 513 | GCC_NO_COMMON_BLOCKS = YES; 514 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 515 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 516 | GCC_WARN_UNDECLARED_SELECTOR = YES; 517 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 518 | GCC_WARN_UNUSED_FUNCTION = YES; 519 | GCC_WARN_UNUSED_VARIABLE = YES; 520 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 521 | MTL_ENABLE_DEBUG_INFO = NO; 522 | SDKROOT = iphoneos; 523 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 524 | VALIDATE_PRODUCT = YES; 525 | }; 526 | name = Release; 527 | }; 528 | 2BFBEE021C14F1650075E626 /* Debug */ = { 529 | isa = XCBuildConfiguration; 530 | buildSettings = { 531 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 532 | INFOPLIST_FILE = UserTrackingButtonExample/Info.plist; 533 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 534 | PRODUCT_BUNDLE_IDENTIFIER = com.mikkovalimaki.UserTrackingButtonExample; 535 | PRODUCT_NAME = "$(TARGET_NAME)"; 536 | SWIFT_VERSION = 4.0; 537 | }; 538 | name = Debug; 539 | }; 540 | 2BFBEE031C14F1650075E626 /* Release */ = { 541 | isa = XCBuildConfiguration; 542 | buildSettings = { 543 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 544 | INFOPLIST_FILE = UserTrackingButtonExample/Info.plist; 545 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 546 | PRODUCT_BUNDLE_IDENTIFIER = com.mikkovalimaki.UserTrackingButtonExample; 547 | PRODUCT_NAME = "$(TARGET_NAME)"; 548 | SWIFT_VERSION = 4.0; 549 | }; 550 | name = Release; 551 | }; 552 | 2BFBEE051C14F1650075E626 /* Debug */ = { 553 | isa = XCBuildConfiguration; 554 | buildSettings = { 555 | BUNDLE_LOADER = "$(TEST_HOST)"; 556 | INFOPLIST_FILE = UserTrackingButtonExampleTests/Info.plist; 557 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 558 | PRODUCT_BUNDLE_IDENTIFIER = com.mikkovalimaki.UserTrackingButtonExampleTests; 559 | PRODUCT_NAME = "$(TARGET_NAME)"; 560 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UserTrackingButtonExample.app/UserTrackingButtonExample"; 561 | }; 562 | name = Debug; 563 | }; 564 | 2BFBEE061C14F1650075E626 /* Release */ = { 565 | isa = XCBuildConfiguration; 566 | buildSettings = { 567 | BUNDLE_LOADER = "$(TEST_HOST)"; 568 | INFOPLIST_FILE = UserTrackingButtonExampleTests/Info.plist; 569 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 570 | PRODUCT_BUNDLE_IDENTIFIER = com.mikkovalimaki.UserTrackingButtonExampleTests; 571 | PRODUCT_NAME = "$(TARGET_NAME)"; 572 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UserTrackingButtonExample.app/UserTrackingButtonExample"; 573 | }; 574 | name = Release; 575 | }; 576 | 2BFBEE081C14F1650075E626 /* Debug */ = { 577 | isa = XCBuildConfiguration; 578 | buildSettings = { 579 | INFOPLIST_FILE = UserTrackingButtonExampleUITests/Info.plist; 580 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 581 | PRODUCT_BUNDLE_IDENTIFIER = com.mikkovalimaki.UserTrackingButtonExampleUITests; 582 | PRODUCT_NAME = "$(TARGET_NAME)"; 583 | TEST_TARGET_NAME = UserTrackingButtonExample; 584 | USES_XCTRUNNER = YES; 585 | }; 586 | name = Debug; 587 | }; 588 | 2BFBEE091C14F1650075E626 /* Release */ = { 589 | isa = XCBuildConfiguration; 590 | buildSettings = { 591 | INFOPLIST_FILE = UserTrackingButtonExampleUITests/Info.plist; 592 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 593 | PRODUCT_BUNDLE_IDENTIFIER = com.mikkovalimaki.UserTrackingButtonExampleUITests; 594 | PRODUCT_NAME = "$(TARGET_NAME)"; 595 | TEST_TARGET_NAME = UserTrackingButtonExample; 596 | USES_XCTRUNNER = YES; 597 | }; 598 | name = Release; 599 | }; 600 | /* End XCBuildConfiguration section */ 601 | 602 | /* Begin XCConfigurationList section */ 603 | 2BFBEDD41C14F1650075E626 /* Build configuration list for PBXProject "UserTrackingButtonExample" */ = { 604 | isa = XCConfigurationList; 605 | buildConfigurations = ( 606 | 2BFBEDFF1C14F1650075E626 /* Debug */, 607 | 2BFBEE001C14F1650075E626 /* Release */, 608 | ); 609 | defaultConfigurationIsVisible = 0; 610 | defaultConfigurationName = Release; 611 | }; 612 | 2BFBEE011C14F1650075E626 /* Build configuration list for PBXNativeTarget "UserTrackingButtonExample" */ = { 613 | isa = XCConfigurationList; 614 | buildConfigurations = ( 615 | 2BFBEE021C14F1650075E626 /* Debug */, 616 | 2BFBEE031C14F1650075E626 /* Release */, 617 | ); 618 | defaultConfigurationIsVisible = 0; 619 | defaultConfigurationName = Release; 620 | }; 621 | 2BFBEE041C14F1650075E626 /* Build configuration list for PBXNativeTarget "UserTrackingButtonExampleTests" */ = { 622 | isa = XCConfigurationList; 623 | buildConfigurations = ( 624 | 2BFBEE051C14F1650075E626 /* Debug */, 625 | 2BFBEE061C14F1650075E626 /* Release */, 626 | ); 627 | defaultConfigurationIsVisible = 0; 628 | defaultConfigurationName = Release; 629 | }; 630 | 2BFBEE071C14F1650075E626 /* Build configuration list for PBXNativeTarget "UserTrackingButtonExampleUITests" */ = { 631 | isa = XCConfigurationList; 632 | buildConfigurations = ( 633 | 2BFBEE081C14F1650075E626 /* Debug */, 634 | 2BFBEE091C14F1650075E626 /* Release */, 635 | ); 636 | defaultConfigurationIsVisible = 0; 637 | defaultConfigurationName = Release; 638 | }; 639 | /* End XCConfigurationList section */ 640 | }; 641 | rootObject = 2BFBEDD11C14F1650075E626 /* Project object */; 642 | } 643 | --------------------------------------------------------------------------------