├── .swift-version ├── Resources └── demo.gif ├── ExampleApp ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── ExampleApp-Bridging-Header.h ├── LeakingObjCViewController.h ├── NavigationController.swift ├── NotLeakingViewController.swift ├── LeakingViewController.swift ├── LeakingObjCViewController.m ├── Info.plist ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard └── AppDelegate.swift ├── .travis.yml ├── DeallocationChecker.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcshareddata │ └── xcschemes │ │ ├── ExampleApp.xcscheme │ │ ├── DeallocationChecker-iOS.xcscheme │ │ └── DeallocationChecker-tvOS.xcscheme └── project.pbxproj ├── Package.swift ├── DeallocationCheckerUITests ├── Info.plist └── DeallocationCheckerUITests.swift ├── DeallocationChecker.podspec ├── Configs └── DeallocationChecker.plist ├── LICENSE ├── README.md ├── .gitignore └── Sources └── DeallocationChecker.swift /.swift-version: -------------------------------------------------------------------------------- 1 | 4.2 2 | -------------------------------------------------------------------------------- /Resources/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fastred/DeallocationChecker/HEAD/Resources/demo.gif -------------------------------------------------------------------------------- /ExampleApp/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ExampleApp/ExampleApp-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode10 2 | language: objective-c 3 | xcode_project: DeallocationChecker.xcodeproj 4 | xcode_scheme: DeallocationChecker-iOS 5 | xcode_destination: platform=iOS Simulator,OS=12.0,name=iPhone X 6 | -------------------------------------------------------------------------------- /DeallocationChecker.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DeallocationChecker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ExampleApp/LeakingObjCViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LeakingObjCViewController.h 3 | // ExampleApp 4 | // 5 | // Created by Arkadiusz Holko on 22/09/2018. 6 | // Copyright © 2018 DeallocationChecker. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface LeakingObjCViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.0 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "DeallocationChecker", 6 | platforms: [ 7 | .iOS(.v9), 8 | .tvOS(.v9) 9 | ], 10 | products: [ 11 | .library(name: "DeallocationChecker", targets: ["DeallocationChecker"]) 12 | ], 13 | targets: [ 14 | .target(name: "DeallocationChecker", dependencies: [], path: "Sources") 15 | ] 16 | ) 17 | -------------------------------------------------------------------------------- /ExampleApp/NavigationController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NavigationController.swift 3 | // ExampleApp 4 | // 5 | // Created by Arkadiusz Holko on 22/09/2018. 6 | // Copyright © 2018 DeallocationChecker. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import DeallocationChecker 11 | 12 | class NavigationController: UINavigationController { 13 | 14 | override func viewDidDisappear(_ animated: Bool) { 15 | super.viewDidDisappear(animated) 16 | 17 | DeallocationChecker.shared.checkDeallocation(of: self) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ExampleApp/NotLeakingViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NotLeakingViewController.swift 3 | // Example 4 | // 5 | // Created by Arkadiusz Holko on 22/09/2018. 6 | // Copyright © 2018 Arkadiusz Holko. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import DeallocationChecker 11 | 12 | class NotLeakingViewController: UIViewController { 13 | 14 | override func viewDidDisappear(_ animated: Bool) { 15 | super.viewDidDisappear(animated) 16 | 17 | DeallocationChecker.shared.checkDeallocation(of: self) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ExampleApp/LeakingViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LeakingViewController.swift 3 | // Example 4 | // 5 | // Created by Arkadiusz Holko on 14/09/2018. 6 | // Copyright © 2018 Arkadiusz Holko. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import DeallocationChecker 11 | 12 | private var retained: LeakingViewController? 13 | 14 | class LeakingViewController: UIViewController { 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | retained = self 20 | } 21 | 22 | override func viewDidDisappear(_ animated: Bool) { 23 | super.viewDidDisappear(animated) 24 | 25 | DeallocationChecker.shared.checkDeallocation(of: self) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ExampleApp/LeakingObjCViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LeakingObjCViewController.m 3 | // Example 4 | // 5 | // Created by Arkadiusz Holko on 22/09/2018. 6 | // Copyright © 2018 Arkadiusz Holko. All rights reserved. 7 | // 8 | 9 | #import "LeakingObjCViewController.h" 10 | @import DeallocationChecker; 11 | 12 | static LeakingObjCViewController *retained; 13 | 14 | @interface LeakingObjCViewController () 15 | 16 | @end 17 | 18 | @implementation LeakingObjCViewController 19 | 20 | - (void)viewDidLoad 21 | { 22 | [super viewDidLoad]; 23 | 24 | retained = self; 25 | } 26 | 27 | - (void)viewDidDisappear:(BOOL)animated 28 | { 29 | [super viewDidDisappear:animated]; 30 | 31 | [DeallocationChecker.shared checkDeallocationWithDefaultDelayOf:self]; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /DeallocationCheckerUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /DeallocationChecker.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "DeallocationChecker" 3 | s.version = "3.0.2" 4 | s.summary = "Learn about leaking view controllers without opening Instruments." 5 | s.description = <<-DESC 6 | DeallocationChecker asserts that a view controller gets deallocated after 7 | its view is removed from the view hierarchy. 8 | DESC 9 | s.homepage = "https://github.com/fastred/DeallocationChecker" 10 | s.license = { :type => "MIT", :file => "LICENSE" } 11 | s.author = { "Arkadiusz Holko" => "fastred@fastred.org" } 12 | s.social_media_url = "https://twitter.com/arekholko" 13 | s.ios.deployment_target = "9.0" 14 | s.source = { :git => "https://github.com/fastred/DeallocationChecker.git", :tag => s.version.to_s } 15 | s.source_files = "Sources/**/*" 16 | s.frameworks = "Foundation", "UIKit" 17 | s.swift_versions = "4.2" 18 | end 19 | -------------------------------------------------------------------------------- /Configs/DeallocationChecker.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 | 3.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSHumanReadableCopyright 24 | Copyright © 2017 Arkadiusz Holko. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Arkadiusz Holko 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 | -------------------------------------------------------------------------------- /ExampleApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | 3.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DeallocationChecker 2 | 3 | Learn about leaking view controllers without opening Instruments. 4 | 5 | [![Build Status](https://travis-ci.com/fastred/DeallocationChecker.svg?branch=master)](https://travis-ci.com/fastred/DeallocationChecker) 6 | 7 | ## Usage 8 | 9 | First, enable the library by calling (for example from your application delegate): 10 | 11 | ```swift 12 | #if DEBUG 13 | DeallocationChecker.shared.setup(with: .alert) // There are other options than .alert too! 14 | #endif 15 | ``` 16 | 17 | Then, in your view controllers **from within `viewDidDisappear(_:) override`**, call: 18 | 19 | ```swift 20 | override func viewDidDisappear(_ animated: Bool) { 21 | super.viewDidDisappear(animated) 22 | 23 | DeallocationChecker.shared.checkDeallocation(of: self) 24 | } 25 | ``` 26 | 27 | If a view controller isn’t deallocated after disappearing for good, you'll see a helpful alert: 28 | 29 | Leaked view controller demo 30 | 31 | At this point we can simply open the [Memory Graph Debugger](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/debugging_with_xcode/chapters/special_debugging_workflows.html#//apple_ref/doc/uid/TP40015022-CH9-DontLinkElementID_1) to investigate the reason of a cycle. 32 | 33 | ## Installation 34 | 35 | ### CocoaPods 36 | 37 | Add the line `pod "DeallocationChecker"` to your `Podfile` 38 | 39 | ### Carthage 40 | Add the line `github "fastred/DeallocationChecker"` to your `Cartfile` 41 | 42 | ## Author 43 | 44 | Project created by [Arek Holko](http://holko.pl) ([@arekholko](https://twitter.com/arekholko) on Twitter). 45 | -------------------------------------------------------------------------------- /.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 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | # 48 | # Pods/ 49 | 50 | # Carthage 51 | # 52 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 53 | # Carthage/Checkouts 54 | 55 | Carthage/Build 56 | 57 | # fastlane 58 | # 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots 67 | fastlane/test_output 68 | -------------------------------------------------------------------------------- /ExampleApp/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 | -------------------------------------------------------------------------------- /DeallocationCheckerUITests/DeallocationCheckerUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeallocationCheckerUITests.swift 3 | // DeallocationCheckerUITests 4 | // 5 | // Created by Arkadiusz Holko on 22/09/2018. 6 | // Copyright © 2018 Arkadiusz Holko. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class DeallocationCheckerUITests: XCTestCase { 12 | 13 | var app: XCUIApplication! 14 | 15 | override func setUp() { 16 | continueAfterFailure = false 17 | 18 | app = XCUIApplication() 19 | app.launchEnvironment = [ 20 | "uitests": "true", 21 | ] 22 | app.launch() 23 | } 24 | 25 | func testLeakingSwiftInNavigationController() { 26 | app.buttons["Show Leaking"].tap() 27 | app.buttons["Back"].tap() 28 | let text = app.staticTexts["Leak Status"] 29 | _ = text.waitForExistence(timeout: 4.0) 30 | XCTAssert(app.staticTexts["leaked"].exists) 31 | } 32 | 33 | func testLeakingObjCInNavigationController() { 34 | app.buttons["Show Leaking Obj-C"].tap() 35 | app.buttons["Back"].tap() 36 | let text = app.staticTexts["Leak Status"] 37 | _ = text.waitForExistence(timeout: 4.0) 38 | XCTAssert(app.staticTexts["leaked"].exists) 39 | } 40 | 41 | func testNotLeakingInNavigationController() { 42 | app.buttons["Show Not Leaking"].tap() 43 | app.buttons["Back"].tap() 44 | let text = app.staticTexts["Leak Status"] 45 | _ = text.waitForExistence(timeout: 4.0) 46 | XCTAssert(app.staticTexts["notLeaked"].exists) 47 | } 48 | 49 | func testNotLeakingWhenSwitchingTab() { 50 | app.buttons["Show Leaking"].tap() 51 | app.buttons["Second"].tap() 52 | let text = app.staticTexts["Leak Status"] 53 | let expectatation = self.expectation(for: NSPredicate(format: "exists == true"), evaluatedWith: text, handler: nil) 54 | expectatation.isInverted = true 55 | 56 | waitForExpectations(timeout: 5.0, handler: nil) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /ExampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /ExampleApp/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example 4 | // 5 | // Created by Arkadiusz Holko on 14/09/2018. 6 | // Copyright © 2018 Arkadiusz Holko. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import DeallocationChecker 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | 18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 19 | // Override point for customization after application launch. 20 | 21 | let isRunningUnderUITests = ProcessInfo.processInfo.environment["uitests"] != nil 22 | 23 | #if DEBUG 24 | if isRunningUnderUITests { 25 | DeallocationChecker.shared.setup(with: .callback(makeUITestsCallback())) 26 | } else { 27 | DeallocationChecker.shared.setup(with: .alert) 28 | } 29 | #endif 30 | 31 | return true 32 | } 33 | 34 | func applicationWillResignActive(_ application: UIApplication) { 35 | // 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. 36 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 37 | } 38 | 39 | func applicationDidEnterBackground(_ application: UIApplication) { 40 | // 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. 41 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 42 | } 43 | 44 | func applicationWillEnterForeground(_ application: UIApplication) { 45 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 46 | } 47 | 48 | func applicationDidBecomeActive(_ application: UIApplication) { 49 | // 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. 50 | } 51 | 52 | func applicationWillTerminate(_ application: UIApplication) { 53 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 54 | } 55 | 56 | private func makeUITestsCallback() -> DeallocationChecker.Callback { 57 | return { leakState, _ in 58 | let window = UIWindow(frame: UIScreen.main.bounds) 59 | window.rootViewController = UIViewController() 60 | window.makeKeyAndVisible() 61 | 62 | let message: String 63 | switch leakState { 64 | case .leaked: 65 | message = "leaked" 66 | case .notLeaked: 67 | message = "notLeaked" 68 | } 69 | 70 | let alertController = UIAlertController(title: "Leak Status", message: message, preferredStyle: .alert) 71 | alertController.addAction(.init(title: "OK", style: .cancel, handler: nil)) 72 | 73 | window.rootViewController?.present(alertController, animated: false, completion: nil) 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /DeallocationChecker.xcodeproj/xcshareddata/xcschemes/ExampleApp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /DeallocationChecker.xcodeproj/xcshareddata/xcschemes/DeallocationChecker-iOS.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 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 90 | 91 | 92 | 93 | 95 | 96 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /DeallocationChecker.xcodeproj/xcshareddata/xcschemes/DeallocationChecker-tvOS.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 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 90 | 91 | 92 | 93 | 95 | 96 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /Sources/DeallocationChecker.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @objc 4 | public class DeallocationChecker: NSObject { 5 | 6 | public enum LeakState { 7 | case leaked 8 | case notLeaked 9 | } 10 | 11 | public typealias Callback = (LeakState, UIViewController.Type) -> () 12 | 13 | public enum Handler { 14 | /// Shows alert when a leak is detected. 15 | case alert 16 | /// Calls preconditionFailure when a leak is detected. 17 | case precondition 18 | /// Customization point if you need other type of logging of leak detection, for example to the console or Fabric. 19 | case callback(Callback) 20 | } 21 | 22 | @objc 23 | public static let shared = DeallocationChecker() 24 | 25 | private(set) var handler: Handler? 26 | 27 | /// Sets up the handler then used in all `checkDeallocation*` methods. 28 | /// It is recommended to use DeallocationChecker only in the DEBUG configuration by wrapping this call inside 29 | /// ``` 30 | /// #if DEBUG 31 | /// DeallocationChecker.shared.setup(with: .alert) 32 | /// #endif 33 | /// ``` 34 | /// call. 35 | /// 36 | /// This method isn't exposed to Obj-C because we use an enumeration that isn't compatible with Obj-C. 37 | public func setup(with handler: Handler) { 38 | self.handler = handler 39 | } 40 | 41 | /// This method asserts whether a view controller gets deallocated after it disappeared 42 | /// due to one of these reasons: 43 | /// - it was removed from its parent, or 44 | /// - it (or one of its parents) was dismissed. 45 | /// 46 | /// The method calls the `handler` if it's non-nil. 47 | /// 48 | /// **You should call this method only from UIViewController.viewDidDisappear(_:).** 49 | /// - Parameter delay: Delay after which the check if a 50 | /// view controller got deallocated is performed 51 | @objc(checkDeallocationOf:afterDelay:) 52 | public func checkDeallocation(of viewController: UIViewController, afterDelay delay: TimeInterval = 1.0) { 53 | guard let handler = DeallocationChecker.shared.handler else { 54 | return 55 | } 56 | 57 | let rootParentViewController = viewController.dch_rootParentViewController 58 | 59 | // `UITabBarController` keeps a strong reference to view controllers that disappeared from screen. So, we don't have to check if they've been deallocated. 60 | guard !rootParentViewController.isKind(of: UITabBarController.self) else { 61 | return 62 | } 63 | 64 | // We don't check `isBeingDismissed` simply on this view controller because it's common 65 | // to wrap a view controller in another view controller (e.g. a stock UINavigationController) 66 | // and present the wrapping view controller instead. 67 | if viewController.isMovingFromParent || rootParentViewController.isBeingDismissed { 68 | let viewControllerType = type(of: viewController) 69 | let disappearanceSource: String = viewController.isMovingFromParent ? "removed from its parent" : "dismissed" 70 | 71 | DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: { [weak viewController] in 72 | let leakState: LeakState = viewController != nil ? .leaked : .notLeaked 73 | 74 | switch handler { 75 | case .alert: 76 | if leakState == .leaked { 77 | self.showAlert(for: viewControllerType) 78 | } 79 | case .precondition: 80 | if leakState == .leaked { 81 | preconditionFailure("\(viewControllerType) not deallocated after being \(disappearanceSource)") 82 | } 83 | case let .callback(callback): 84 | callback(leakState, viewControllerType) 85 | } 86 | }) 87 | } 88 | } 89 | 90 | @objc(checkDeallocationWithDefaultDelayOf:) 91 | public func checkDeallocationWithDefaultDelay(of viewController: UIViewController) { 92 | self.checkDeallocation(of: viewController) 93 | } 94 | 95 | // MARK: - Private 96 | 97 | private var window: UIWindow? = nil 98 | 99 | private func showAlert(for viewController: UIViewController.Type) { 100 | window = UIWindow(frame: UIScreen.main.bounds) 101 | window?.rootViewController = UIViewController() 102 | window?.makeKeyAndVisible() 103 | 104 | let message = "\(viewController) is still in memory even though its view was removed from hierarchy. Please open Memory Graph Debugger to find strong references to it." 105 | let alertController = UIAlertController(title: "Leak Detected", message: message, preferredStyle: .alert) 106 | let action = UIAlertAction(title: "OK", style: .cancel, handler: { _ in self.window = nil }) 107 | alertController.addAction(action) 108 | 109 | window?.rootViewController?.present(alertController, animated: true, completion: nil) 110 | } 111 | } 112 | 113 | extension UIViewController { 114 | 115 | @available(*, deprecated, message: "Please switch to using methods on DeallocationChecker. Also remember to call setup(with:) when your app starts.") 116 | @objc(dch_checkDeallocationAfterDelay:) 117 | public func dch_checkDeallocation(afterDelay delay: TimeInterval = 2.0) { 118 | print("Please switch to using methods on DeallocationChecker. Also remember to call setup(with:) when your app starts.") 119 | DeallocationChecker.shared.checkDeallocation(of: self, afterDelay: delay) 120 | } 121 | 122 | @available(*, deprecated, message: "Please switch to using methods on DeallocationChecker. Also remember to call setup(with:) when your app starts.") 123 | @objc(dch_checkDeallocation) 124 | public func objc_dch_checkDeallocation() { 125 | print("Please switch to using methods on DeallocationChecker. Also remember to call setup(with:) when your app starts.") 126 | DeallocationChecker.shared.checkDeallocationWithDefaultDelay(of: self) 127 | } 128 | 129 | fileprivate var dch_rootParentViewController: UIViewController { 130 | var root = self 131 | 132 | while let parent = root.parent { 133 | root = parent 134 | } 135 | 136 | return root 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /ExampleApp/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 | 30 | 37 | 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 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /DeallocationChecker.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 47; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8933C7851EB5B820000D00A4 /* DeallocationChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8933C7841EB5B820000D00A4 /* DeallocationChecker.swift */; }; 11 | 8933C7881EB5B820000D00A4 /* DeallocationChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8933C7841EB5B820000D00A4 /* DeallocationChecker.swift */; }; 12 | A6AA7E7C21568EF0009D514F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AA7E7B21568EF0009D514F /* AppDelegate.swift */; }; 13 | A6AA7E8121568EF0009D514F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A6AA7E7F21568EF0009D514F /* Main.storyboard */; }; 14 | A6AA7E8321568EF1009D514F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A6AA7E8221568EF1009D514F /* Assets.xcassets */; }; 15 | A6AA7E8621568EF1009D514F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A6AA7E8421568EF1009D514F /* LaunchScreen.storyboard */; }; 16 | A6AA7E9B21568F48009D514F /* NotLeakingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AA7E9921568F48009D514F /* NotLeakingViewController.swift */; }; 17 | A6AA7E9C21568F48009D514F /* LeakingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AA7E9A21568F48009D514F /* LeakingViewController.swift */; }; 18 | A6AA7EA521568FC9009D514F /* LeakingObjCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6AA7EA421568FC9009D514F /* LeakingObjCViewController.m */; }; 19 | A6AA7EAD215690A0009D514F /* DeallocationCheckerUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AA7EAC215690A0009D514F /* DeallocationCheckerUITests.swift */; }; 20 | A6AA7EB5215690FB009D514F /* DeallocationChecker.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 52D6D97C1BEFF229002C0205 /* DeallocationChecker.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 21 | A6AA7EB8215696F5009D514F /* NavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6AA7EB7215696F5009D514F /* NavigationController.swift */; }; 22 | A6AC776E21563F2900500C35 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A6AC776D21563F2900500C35 /* README.md */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | A6AA7E9F21568F69009D514F /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = 52D6D9731BEFF229002C0205 /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = 52D6D97B1BEFF229002C0205; 31 | remoteInfo = "DeallocationChecker-iOS"; 32 | }; 33 | A6AA7EAF215690A0009D514F /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = 52D6D9731BEFF229002C0205 /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = A6AA7E7821568EF0009D514F; 38 | remoteInfo = ExampleApp; 39 | }; 40 | /* End PBXContainerItemProxy section */ 41 | 42 | /* Begin PBXCopyFilesBuildPhase section */ 43 | A6AA7EB6215690FB009D514F /* Embed Frameworks */ = { 44 | isa = PBXCopyFilesBuildPhase; 45 | buildActionMask = 2147483647; 46 | dstPath = ""; 47 | dstSubfolderSpec = 10; 48 | files = ( 49 | A6AA7EB5215690FB009D514F /* DeallocationChecker.framework in Embed Frameworks */, 50 | ); 51 | name = "Embed Frameworks"; 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | /* End PBXCopyFilesBuildPhase section */ 55 | 56 | /* Begin PBXFileReference section */ 57 | 52D6D97C1BEFF229002C0205 /* DeallocationChecker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DeallocationChecker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 52D6D9F01BEFFFBE002C0205 /* DeallocationChecker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DeallocationChecker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | 8933C7841EB5B820000D00A4 /* DeallocationChecker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeallocationChecker.swift; sourceTree = ""; }; 60 | A6218B4E231ABE550006A2D0 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 61 | A6AA7E7921568EF0009D514F /* ExampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ExampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | A6AA7E7B21568EF0009D514F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 63 | A6AA7E8021568EF0009D514F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 64 | A6AA7E8221568EF1009D514F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 65 | A6AA7E8521568EF1009D514F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 66 | A6AA7E8721568EF1009D514F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67 | A6AA7E9921568F48009D514F /* NotLeakingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotLeakingViewController.swift; sourceTree = ""; }; 68 | A6AA7E9A21568F48009D514F /* LeakingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LeakingViewController.swift; sourceTree = ""; }; 69 | A6AA7EA221568FC8009D514F /* ExampleApp-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ExampleApp-Bridging-Header.h"; sourceTree = ""; }; 70 | A6AA7EA321568FC9009D514F /* LeakingObjCViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LeakingObjCViewController.h; sourceTree = ""; }; 71 | A6AA7EA421568FC9009D514F /* LeakingObjCViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LeakingObjCViewController.m; sourceTree = ""; }; 72 | A6AA7EAA215690A0009D514F /* DeallocationCheckerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DeallocationCheckerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 73 | A6AA7EAC215690A0009D514F /* DeallocationCheckerUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeallocationCheckerUITests.swift; sourceTree = ""; }; 74 | A6AA7EAE215690A0009D514F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 75 | A6AA7EB7215696F5009D514F /* NavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationController.swift; sourceTree = ""; }; 76 | A6AC776D21563F2900500C35 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 77 | AD2FAA261CD0B6D800659CF4 /* DeallocationChecker.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = DeallocationChecker.plist; sourceTree = ""; }; 78 | /* End PBXFileReference section */ 79 | 80 | /* Begin PBXFrameworksBuildPhase section */ 81 | 52D6D9781BEFF229002C0205 /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | 52D6D9EC1BEFFFBE002C0205 /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | A6AA7E7621568EF0009D514F /* Frameworks */ = { 96 | isa = PBXFrameworksBuildPhase; 97 | buildActionMask = 2147483647; 98 | files = ( 99 | ); 100 | runOnlyForDeploymentPostprocessing = 0; 101 | }; 102 | A6AA7EA7215690A0009D514F /* Frameworks */ = { 103 | isa = PBXFrameworksBuildPhase; 104 | buildActionMask = 2147483647; 105 | files = ( 106 | ); 107 | runOnlyForDeploymentPostprocessing = 0; 108 | }; 109 | /* End PBXFrameworksBuildPhase section */ 110 | 111 | /* Begin PBXGroup section */ 112 | 52D6D9721BEFF229002C0205 = { 113 | isa = PBXGroup; 114 | children = ( 115 | A6AC776D21563F2900500C35 /* README.md */, 116 | A6218B4E231ABE550006A2D0 /* Package.swift */, 117 | 8933C7811EB5B7E0000D00A4 /* Sources */, 118 | 52D6D99C1BEFF38C002C0205 /* Configs */, 119 | A6AA7E7A21568EF0009D514F /* ExampleApp */, 120 | A6AA7EAB215690A0009D514F /* DeallocationCheckerUITests */, 121 | 52D6D97D1BEFF229002C0205 /* Products */, 122 | A6AA7E9D21568F65009D514F /* Frameworks */, 123 | ); 124 | sourceTree = ""; 125 | }; 126 | 52D6D97D1BEFF229002C0205 /* Products */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 52D6D97C1BEFF229002C0205 /* DeallocationChecker.framework */, 130 | 52D6D9F01BEFFFBE002C0205 /* DeallocationChecker.framework */, 131 | A6AA7E7921568EF0009D514F /* ExampleApp.app */, 132 | A6AA7EAA215690A0009D514F /* DeallocationCheckerUITests.xctest */, 133 | ); 134 | name = Products; 135 | sourceTree = ""; 136 | }; 137 | 52D6D99C1BEFF38C002C0205 /* Configs */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | DD7502721C68FC1B006590AF /* Frameworks */, 141 | ); 142 | path = Configs; 143 | sourceTree = ""; 144 | }; 145 | 8933C7811EB5B7E0000D00A4 /* Sources */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 8933C7841EB5B820000D00A4 /* DeallocationChecker.swift */, 149 | ); 150 | path = Sources; 151 | sourceTree = ""; 152 | }; 153 | A6AA7E7A21568EF0009D514F /* ExampleApp */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | A6AA7E7B21568EF0009D514F /* AppDelegate.swift */, 157 | A6AA7E9A21568F48009D514F /* LeakingViewController.swift */, 158 | A6AA7EA321568FC9009D514F /* LeakingObjCViewController.h */, 159 | A6AA7EA421568FC9009D514F /* LeakingObjCViewController.m */, 160 | A6AA7EB7215696F5009D514F /* NavigationController.swift */, 161 | A6AA7E9921568F48009D514F /* NotLeakingViewController.swift */, 162 | A6AA7E7F21568EF0009D514F /* Main.storyboard */, 163 | A6AA7E8221568EF1009D514F /* Assets.xcassets */, 164 | A6AA7E8421568EF1009D514F /* LaunchScreen.storyboard */, 165 | A6AA7E8721568EF1009D514F /* Info.plist */, 166 | A6AA7EA221568FC8009D514F /* ExampleApp-Bridging-Header.h */, 167 | ); 168 | path = ExampleApp; 169 | sourceTree = ""; 170 | }; 171 | A6AA7E9D21568F65009D514F /* Frameworks */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | ); 175 | name = Frameworks; 176 | sourceTree = ""; 177 | }; 178 | A6AA7EAB215690A0009D514F /* DeallocationCheckerUITests */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | A6AA7EAC215690A0009D514F /* DeallocationCheckerUITests.swift */, 182 | A6AA7EAE215690A0009D514F /* Info.plist */, 183 | ); 184 | path = DeallocationCheckerUITests; 185 | sourceTree = ""; 186 | }; 187 | DD7502721C68FC1B006590AF /* Frameworks */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | AD2FAA261CD0B6D800659CF4 /* DeallocationChecker.plist */, 191 | ); 192 | name = Frameworks; 193 | sourceTree = ""; 194 | }; 195 | /* End PBXGroup section */ 196 | 197 | /* Begin PBXHeadersBuildPhase section */ 198 | 52D6D9791BEFF229002C0205 /* Headers */ = { 199 | isa = PBXHeadersBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | ); 203 | runOnlyForDeploymentPostprocessing = 0; 204 | }; 205 | 52D6D9ED1BEFFFBE002C0205 /* Headers */ = { 206 | isa = PBXHeadersBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXHeadersBuildPhase section */ 213 | 214 | /* Begin PBXNativeTarget section */ 215 | 52D6D97B1BEFF229002C0205 /* DeallocationChecker-iOS */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = 52D6D9901BEFF229002C0205 /* Build configuration list for PBXNativeTarget "DeallocationChecker-iOS" */; 218 | buildPhases = ( 219 | 52D6D9771BEFF229002C0205 /* Sources */, 220 | 52D6D9781BEFF229002C0205 /* Frameworks */, 221 | 52D6D9791BEFF229002C0205 /* Headers */, 222 | 52D6D97A1BEFF229002C0205 /* Resources */, 223 | ); 224 | buildRules = ( 225 | ); 226 | dependencies = ( 227 | ); 228 | name = "DeallocationChecker-iOS"; 229 | productName = DeallocationChecker; 230 | productReference = 52D6D97C1BEFF229002C0205 /* DeallocationChecker.framework */; 231 | productType = "com.apple.product-type.framework"; 232 | }; 233 | 52D6D9EF1BEFFFBE002C0205 /* DeallocationChecker-tvOS */ = { 234 | isa = PBXNativeTarget; 235 | buildConfigurationList = 52D6DA011BEFFFBE002C0205 /* Build configuration list for PBXNativeTarget "DeallocationChecker-tvOS" */; 236 | buildPhases = ( 237 | 52D6D9EB1BEFFFBE002C0205 /* Sources */, 238 | 52D6D9EC1BEFFFBE002C0205 /* Frameworks */, 239 | 52D6D9ED1BEFFFBE002C0205 /* Headers */, 240 | 52D6D9EE1BEFFFBE002C0205 /* Resources */, 241 | ); 242 | buildRules = ( 243 | ); 244 | dependencies = ( 245 | ); 246 | name = "DeallocationChecker-tvOS"; 247 | productName = "DeallocationChecker-tvOS"; 248 | productReference = 52D6D9F01BEFFFBE002C0205 /* DeallocationChecker.framework */; 249 | productType = "com.apple.product-type.framework"; 250 | }; 251 | A6AA7E7821568EF0009D514F /* ExampleApp */ = { 252 | isa = PBXNativeTarget; 253 | buildConfigurationList = A6AA7E9321568EF1009D514F /* Build configuration list for PBXNativeTarget "ExampleApp" */; 254 | buildPhases = ( 255 | A6AA7E7521568EF0009D514F /* Sources */, 256 | A6AA7E7621568EF0009D514F /* Frameworks */, 257 | A6AA7E7721568EF0009D514F /* Resources */, 258 | A6AA7EB6215690FB009D514F /* Embed Frameworks */, 259 | ); 260 | buildRules = ( 261 | ); 262 | dependencies = ( 263 | A6AA7EA021568F69009D514F /* PBXTargetDependency */, 264 | ); 265 | name = ExampleApp; 266 | productName = ExampleApp; 267 | productReference = A6AA7E7921568EF0009D514F /* ExampleApp.app */; 268 | productType = "com.apple.product-type.application"; 269 | }; 270 | A6AA7EA9215690A0009D514F /* DeallocationCheckerUITests */ = { 271 | isa = PBXNativeTarget; 272 | buildConfigurationList = A6AA7EB1215690A0009D514F /* Build configuration list for PBXNativeTarget "DeallocationCheckerUITests" */; 273 | buildPhases = ( 274 | A6AA7EA6215690A0009D514F /* Sources */, 275 | A6AA7EA7215690A0009D514F /* Frameworks */, 276 | A6AA7EA8215690A0009D514F /* Resources */, 277 | ); 278 | buildRules = ( 279 | ); 280 | dependencies = ( 281 | A6AA7EB0215690A0009D514F /* PBXTargetDependency */, 282 | ); 283 | name = DeallocationCheckerUITests; 284 | productName = DeallocationCheckerUITests; 285 | productReference = A6AA7EAA215690A0009D514F /* DeallocationCheckerUITests.xctest */; 286 | productType = "com.apple.product-type.bundle.ui-testing"; 287 | }; 288 | /* End PBXNativeTarget section */ 289 | 290 | /* Begin PBXProject section */ 291 | 52D6D9731BEFF229002C0205 /* Project object */ = { 292 | isa = PBXProject; 293 | attributes = { 294 | LastSwiftUpdateCheck = 1000; 295 | LastUpgradeCheck = 1000; 296 | ORGANIZATIONNAME = DeallocationChecker; 297 | TargetAttributes = { 298 | 52D6D97B1BEFF229002C0205 = { 299 | CreatedOnToolsVersion = 7.1; 300 | DevelopmentTeam = JNVZW2VES4; 301 | LastSwiftMigration = 1000; 302 | }; 303 | 52D6D9EF1BEFFFBE002C0205 = { 304 | CreatedOnToolsVersion = 7.1; 305 | LastSwiftMigration = 0800; 306 | }; 307 | A6AA7E7821568EF0009D514F = { 308 | CreatedOnToolsVersion = 10.0; 309 | DevelopmentTeam = JNVZW2VES4; 310 | LastSwiftMigration = 1000; 311 | ProvisioningStyle = Automatic; 312 | }; 313 | A6AA7EA9215690A0009D514F = { 314 | CreatedOnToolsVersion = 10.0; 315 | DevelopmentTeam = JNVZW2VES4; 316 | ProvisioningStyle = Automatic; 317 | TestTargetID = A6AA7E7821568EF0009D514F; 318 | }; 319 | }; 320 | }; 321 | buildConfigurationList = 52D6D9761BEFF229002C0205 /* Build configuration list for PBXProject "DeallocationChecker" */; 322 | compatibilityVersion = "Xcode 6.3"; 323 | developmentRegion = English; 324 | hasScannedForEncodings = 0; 325 | knownRegions = ( 326 | en, 327 | Base, 328 | ); 329 | mainGroup = 52D6D9721BEFF229002C0205; 330 | productRefGroup = 52D6D97D1BEFF229002C0205 /* Products */; 331 | projectDirPath = ""; 332 | projectRoot = ""; 333 | targets = ( 334 | 52D6D97B1BEFF229002C0205 /* DeallocationChecker-iOS */, 335 | 52D6D9EF1BEFFFBE002C0205 /* DeallocationChecker-tvOS */, 336 | A6AA7E7821568EF0009D514F /* ExampleApp */, 337 | A6AA7EA9215690A0009D514F /* DeallocationCheckerUITests */, 338 | ); 339 | }; 340 | /* End PBXProject section */ 341 | 342 | /* Begin PBXResourcesBuildPhase section */ 343 | 52D6D97A1BEFF229002C0205 /* Resources */ = { 344 | isa = PBXResourcesBuildPhase; 345 | buildActionMask = 2147483647; 346 | files = ( 347 | A6AC776E21563F2900500C35 /* README.md in Resources */, 348 | ); 349 | runOnlyForDeploymentPostprocessing = 0; 350 | }; 351 | 52D6D9EE1BEFFFBE002C0205 /* Resources */ = { 352 | isa = PBXResourcesBuildPhase; 353 | buildActionMask = 2147483647; 354 | files = ( 355 | ); 356 | runOnlyForDeploymentPostprocessing = 0; 357 | }; 358 | A6AA7E7721568EF0009D514F /* Resources */ = { 359 | isa = PBXResourcesBuildPhase; 360 | buildActionMask = 2147483647; 361 | files = ( 362 | A6AA7E8621568EF1009D514F /* LaunchScreen.storyboard in Resources */, 363 | A6AA7E8321568EF1009D514F /* Assets.xcassets in Resources */, 364 | A6AA7E8121568EF0009D514F /* Main.storyboard in Resources */, 365 | ); 366 | runOnlyForDeploymentPostprocessing = 0; 367 | }; 368 | A6AA7EA8215690A0009D514F /* Resources */ = { 369 | isa = PBXResourcesBuildPhase; 370 | buildActionMask = 2147483647; 371 | files = ( 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | }; 375 | /* End PBXResourcesBuildPhase section */ 376 | 377 | /* Begin PBXSourcesBuildPhase section */ 378 | 52D6D9771BEFF229002C0205 /* Sources */ = { 379 | isa = PBXSourcesBuildPhase; 380 | buildActionMask = 2147483647; 381 | files = ( 382 | 8933C7851EB5B820000D00A4 /* DeallocationChecker.swift in Sources */, 383 | ); 384 | runOnlyForDeploymentPostprocessing = 0; 385 | }; 386 | 52D6D9EB1BEFFFBE002C0205 /* Sources */ = { 387 | isa = PBXSourcesBuildPhase; 388 | buildActionMask = 2147483647; 389 | files = ( 390 | 8933C7881EB5B820000D00A4 /* DeallocationChecker.swift in Sources */, 391 | ); 392 | runOnlyForDeploymentPostprocessing = 0; 393 | }; 394 | A6AA7E7521568EF0009D514F /* Sources */ = { 395 | isa = PBXSourcesBuildPhase; 396 | buildActionMask = 2147483647; 397 | files = ( 398 | A6AA7E9C21568F48009D514F /* LeakingViewController.swift in Sources */, 399 | A6AA7EB8215696F5009D514F /* NavigationController.swift in Sources */, 400 | A6AA7E9B21568F48009D514F /* NotLeakingViewController.swift in Sources */, 401 | A6AA7E7C21568EF0009D514F /* AppDelegate.swift in Sources */, 402 | A6AA7EA521568FC9009D514F /* LeakingObjCViewController.m in Sources */, 403 | ); 404 | runOnlyForDeploymentPostprocessing = 0; 405 | }; 406 | A6AA7EA6215690A0009D514F /* Sources */ = { 407 | isa = PBXSourcesBuildPhase; 408 | buildActionMask = 2147483647; 409 | files = ( 410 | A6AA7EAD215690A0009D514F /* DeallocationCheckerUITests.swift in Sources */, 411 | ); 412 | runOnlyForDeploymentPostprocessing = 0; 413 | }; 414 | /* End PBXSourcesBuildPhase section */ 415 | 416 | /* Begin PBXTargetDependency section */ 417 | A6AA7EA021568F69009D514F /* PBXTargetDependency */ = { 418 | isa = PBXTargetDependency; 419 | target = 52D6D97B1BEFF229002C0205 /* DeallocationChecker-iOS */; 420 | targetProxy = A6AA7E9F21568F69009D514F /* PBXContainerItemProxy */; 421 | }; 422 | A6AA7EB0215690A0009D514F /* PBXTargetDependency */ = { 423 | isa = PBXTargetDependency; 424 | target = A6AA7E7821568EF0009D514F /* ExampleApp */; 425 | targetProxy = A6AA7EAF215690A0009D514F /* PBXContainerItemProxy */; 426 | }; 427 | /* End PBXTargetDependency section */ 428 | 429 | /* Begin PBXVariantGroup section */ 430 | A6AA7E7F21568EF0009D514F /* Main.storyboard */ = { 431 | isa = PBXVariantGroup; 432 | children = ( 433 | A6AA7E8021568EF0009D514F /* Base */, 434 | ); 435 | name = Main.storyboard; 436 | sourceTree = ""; 437 | }; 438 | A6AA7E8421568EF1009D514F /* LaunchScreen.storyboard */ = { 439 | isa = PBXVariantGroup; 440 | children = ( 441 | A6AA7E8521568EF1009D514F /* Base */, 442 | ); 443 | name = LaunchScreen.storyboard; 444 | sourceTree = ""; 445 | }; 446 | /* End PBXVariantGroup section */ 447 | 448 | /* Begin XCBuildConfiguration section */ 449 | 52D6D98E1BEFF229002C0205 /* Debug */ = { 450 | isa = XCBuildConfiguration; 451 | buildSettings = { 452 | ALWAYS_SEARCH_USER_PATHS = NO; 453 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 454 | CLANG_CXX_LIBRARY = "libc++"; 455 | CLANG_ENABLE_MODULES = YES; 456 | CLANG_ENABLE_OBJC_ARC = YES; 457 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 458 | CLANG_WARN_BOOL_CONVERSION = YES; 459 | CLANG_WARN_COMMA = YES; 460 | CLANG_WARN_CONSTANT_CONVERSION = YES; 461 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 462 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 463 | CLANG_WARN_EMPTY_BODY = YES; 464 | CLANG_WARN_ENUM_CONVERSION = YES; 465 | CLANG_WARN_INFINITE_RECURSION = YES; 466 | CLANG_WARN_INT_CONVERSION = YES; 467 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 468 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 469 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 470 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 471 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 472 | CLANG_WARN_STRICT_PROTOTYPES = YES; 473 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 474 | CLANG_WARN_UNREACHABLE_CODE = YES; 475 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 476 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 477 | COPY_PHASE_STRIP = NO; 478 | CURRENT_PROJECT_VERSION = 1; 479 | DEBUG_INFORMATION_FORMAT = dwarf; 480 | ENABLE_STRICT_OBJC_MSGSEND = YES; 481 | ENABLE_TESTABILITY = YES; 482 | GCC_C_LANGUAGE_STANDARD = gnu99; 483 | GCC_DYNAMIC_NO_PIC = NO; 484 | GCC_NO_COMMON_BLOCKS = YES; 485 | GCC_OPTIMIZATION_LEVEL = 0; 486 | GCC_PREPROCESSOR_DEFINITIONS = ( 487 | "DEBUG=1", 488 | "$(inherited)", 489 | ); 490 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 491 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 492 | GCC_WARN_UNDECLARED_SELECTOR = YES; 493 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 494 | GCC_WARN_UNUSED_FUNCTION = YES; 495 | GCC_WARN_UNUSED_VARIABLE = YES; 496 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 497 | MTL_ENABLE_DEBUG_INFO = YES; 498 | ONLY_ACTIVE_ARCH = YES; 499 | SDKROOT = iphoneos; 500 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 501 | SWIFT_VERSION = 4.0; 502 | TARGETED_DEVICE_FAMILY = "1,2"; 503 | VERSIONING_SYSTEM = "apple-generic"; 504 | VERSION_INFO_PREFIX = ""; 505 | }; 506 | name = Debug; 507 | }; 508 | 52D6D98F1BEFF229002C0205 /* Release */ = { 509 | isa = XCBuildConfiguration; 510 | buildSettings = { 511 | ALWAYS_SEARCH_USER_PATHS = NO; 512 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 513 | CLANG_CXX_LIBRARY = "libc++"; 514 | CLANG_ENABLE_MODULES = YES; 515 | CLANG_ENABLE_OBJC_ARC = YES; 516 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 517 | CLANG_WARN_BOOL_CONVERSION = YES; 518 | CLANG_WARN_COMMA = YES; 519 | CLANG_WARN_CONSTANT_CONVERSION = YES; 520 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 521 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 522 | CLANG_WARN_EMPTY_BODY = YES; 523 | CLANG_WARN_ENUM_CONVERSION = YES; 524 | CLANG_WARN_INFINITE_RECURSION = YES; 525 | CLANG_WARN_INT_CONVERSION = YES; 526 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 527 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 528 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 529 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 530 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 531 | CLANG_WARN_STRICT_PROTOTYPES = YES; 532 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 533 | CLANG_WARN_UNREACHABLE_CODE = YES; 534 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 535 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 536 | COPY_PHASE_STRIP = NO; 537 | CURRENT_PROJECT_VERSION = 1; 538 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 539 | ENABLE_NS_ASSERTIONS = NO; 540 | ENABLE_STRICT_OBJC_MSGSEND = YES; 541 | GCC_C_LANGUAGE_STANDARD = gnu99; 542 | GCC_NO_COMMON_BLOCKS = YES; 543 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 544 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 545 | GCC_WARN_UNDECLARED_SELECTOR = YES; 546 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 547 | GCC_WARN_UNUSED_FUNCTION = YES; 548 | GCC_WARN_UNUSED_VARIABLE = YES; 549 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 550 | MTL_ENABLE_DEBUG_INFO = NO; 551 | SDKROOT = iphoneos; 552 | SWIFT_VERSION = 4.0; 553 | TARGETED_DEVICE_FAMILY = "1,2"; 554 | VALIDATE_PRODUCT = YES; 555 | VERSIONING_SYSTEM = "apple-generic"; 556 | VERSION_INFO_PREFIX = ""; 557 | }; 558 | name = Release; 559 | }; 560 | 52D6D9911BEFF229002C0205 /* Debug */ = { 561 | isa = XCBuildConfiguration; 562 | buildSettings = { 563 | APPLICATION_EXTENSION_API_ONLY = YES; 564 | CLANG_ENABLE_MODULES = YES; 565 | CODE_SIGN_IDENTITY = "iPhone Developer"; 566 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 567 | DEFINES_MODULE = YES; 568 | DEVELOPMENT_TEAM = JNVZW2VES4; 569 | DYLIB_COMPATIBILITY_VERSION = 1; 570 | DYLIB_CURRENT_VERSION = 1; 571 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 572 | INFOPLIST_FILE = Configs/DeallocationChecker.plist; 573 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 574 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 575 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 576 | ONLY_ACTIVE_ARCH = NO; 577 | PRODUCT_BUNDLE_IDENTIFIER = "com.DeallocationChecker.DeallocationChecker-iOS"; 578 | PRODUCT_NAME = DeallocationChecker; 579 | SKIP_INSTALL = YES; 580 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 581 | SWIFT_VERSION = 4.2; 582 | }; 583 | name = Debug; 584 | }; 585 | 52D6D9921BEFF229002C0205 /* Release */ = { 586 | isa = XCBuildConfiguration; 587 | buildSettings = { 588 | APPLICATION_EXTENSION_API_ONLY = YES; 589 | CLANG_ENABLE_MODULES = YES; 590 | CODE_SIGN_IDENTITY = "iPhone Developer"; 591 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 592 | DEFINES_MODULE = YES; 593 | DEVELOPMENT_TEAM = JNVZW2VES4; 594 | DYLIB_COMPATIBILITY_VERSION = 1; 595 | DYLIB_CURRENT_VERSION = 1; 596 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 597 | INFOPLIST_FILE = Configs/DeallocationChecker.plist; 598 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 599 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 600 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 601 | PRODUCT_BUNDLE_IDENTIFIER = "com.DeallocationChecker.DeallocationChecker-iOS"; 602 | PRODUCT_NAME = DeallocationChecker; 603 | SKIP_INSTALL = YES; 604 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 605 | SWIFT_VERSION = 4.2; 606 | }; 607 | name = Release; 608 | }; 609 | 52D6DA021BEFFFBE002C0205 /* Debug */ = { 610 | isa = XCBuildConfiguration; 611 | buildSettings = { 612 | APPLICATION_EXTENSION_API_ONLY = YES; 613 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 614 | DEFINES_MODULE = YES; 615 | DYLIB_COMPATIBILITY_VERSION = 1; 616 | DYLIB_CURRENT_VERSION = 1; 617 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 618 | INFOPLIST_FILE = Configs/DeallocationChecker.plist; 619 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 620 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 621 | PRODUCT_BUNDLE_IDENTIFIER = "com.DeallocationChecker.DeallocationChecker-tvOS"; 622 | PRODUCT_NAME = DeallocationChecker; 623 | SDKROOT = appletvos; 624 | SKIP_INSTALL = YES; 625 | SWIFT_VERSION = 4.0; 626 | TARGETED_DEVICE_FAMILY = 3; 627 | TVOS_DEPLOYMENT_TARGET = 9.0; 628 | }; 629 | name = Debug; 630 | }; 631 | 52D6DA031BEFFFBE002C0205 /* Release */ = { 632 | isa = XCBuildConfiguration; 633 | buildSettings = { 634 | APPLICATION_EXTENSION_API_ONLY = YES; 635 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 636 | DEFINES_MODULE = YES; 637 | DYLIB_COMPATIBILITY_VERSION = 1; 638 | DYLIB_CURRENT_VERSION = 1; 639 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 640 | INFOPLIST_FILE = Configs/DeallocationChecker.plist; 641 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 642 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 643 | PRODUCT_BUNDLE_IDENTIFIER = "com.DeallocationChecker.DeallocationChecker-tvOS"; 644 | PRODUCT_NAME = DeallocationChecker; 645 | SDKROOT = appletvos; 646 | SKIP_INSTALL = YES; 647 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 648 | SWIFT_VERSION = 4.0; 649 | TARGETED_DEVICE_FAMILY = 3; 650 | TVOS_DEPLOYMENT_TARGET = 9.0; 651 | }; 652 | name = Release; 653 | }; 654 | A6AA7E9421568EF1009D514F /* Debug */ = { 655 | isa = XCBuildConfiguration; 656 | buildSettings = { 657 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 658 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 659 | CLANG_ANALYZER_NONNULL = YES; 660 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 661 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 662 | CLANG_ENABLE_MODULES = YES; 663 | CLANG_ENABLE_OBJC_WEAK = YES; 664 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 665 | CLANG_WARN_COMMA = YES; 666 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 667 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 668 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 669 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 670 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 671 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 672 | CLANG_WARN_STRICT_PROTOTYPES = YES; 673 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 674 | CODE_SIGN_IDENTITY = "iPhone Developer"; 675 | CODE_SIGN_STYLE = Automatic; 676 | DEVELOPMENT_TEAM = JNVZW2VES4; 677 | GCC_C_LANGUAGE_STANDARD = gnu11; 678 | INFOPLIST_FILE = ExampleApp/Info.plist; 679 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 680 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 681 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 682 | MTL_FAST_MATH = YES; 683 | PRODUCT_BUNDLE_IDENTIFIER = pl.holko.ExampleApp; 684 | PRODUCT_NAME = "$(TARGET_NAME)"; 685 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 686 | SWIFT_OBJC_BRIDGING_HEADER = "ExampleApp/ExampleApp-Bridging-Header.h"; 687 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 688 | SWIFT_VERSION = 4.2; 689 | TARGETED_DEVICE_FAMILY = "1,2"; 690 | }; 691 | name = Debug; 692 | }; 693 | A6AA7E9521568EF1009D514F /* Release */ = { 694 | isa = XCBuildConfiguration; 695 | buildSettings = { 696 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 697 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 698 | CLANG_ANALYZER_NONNULL = YES; 699 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 700 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 701 | CLANG_ENABLE_MODULES = YES; 702 | CLANG_ENABLE_OBJC_WEAK = YES; 703 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 704 | CLANG_WARN_COMMA = YES; 705 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 706 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 707 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 708 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 709 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 710 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 711 | CLANG_WARN_STRICT_PROTOTYPES = YES; 712 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 713 | CODE_SIGN_IDENTITY = "iPhone Developer"; 714 | CODE_SIGN_STYLE = Automatic; 715 | DEVELOPMENT_TEAM = JNVZW2VES4; 716 | GCC_C_LANGUAGE_STANDARD = gnu11; 717 | INFOPLIST_FILE = ExampleApp/Info.plist; 718 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 719 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 720 | MTL_FAST_MATH = YES; 721 | PRODUCT_BUNDLE_IDENTIFIER = pl.holko.ExampleApp; 722 | PRODUCT_NAME = "$(TARGET_NAME)"; 723 | SWIFT_OBJC_BRIDGING_HEADER = "ExampleApp/ExampleApp-Bridging-Header.h"; 724 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 725 | SWIFT_VERSION = 4.2; 726 | TARGETED_DEVICE_FAMILY = "1,2"; 727 | }; 728 | name = Release; 729 | }; 730 | A6AA7EB2215690A0009D514F /* Debug */ = { 731 | isa = XCBuildConfiguration; 732 | buildSettings = { 733 | CLANG_ANALYZER_NONNULL = YES; 734 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 735 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 736 | CLANG_ENABLE_OBJC_WEAK = YES; 737 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 738 | CLANG_WARN_COMMA = YES; 739 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 740 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 741 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 742 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 743 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 744 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 745 | CLANG_WARN_STRICT_PROTOTYPES = YES; 746 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 747 | CODE_SIGN_IDENTITY = "iPhone Developer"; 748 | CODE_SIGN_STYLE = Automatic; 749 | DEVELOPMENT_TEAM = JNVZW2VES4; 750 | GCC_C_LANGUAGE_STANDARD = gnu11; 751 | INFOPLIST_FILE = DeallocationCheckerUITests/Info.plist; 752 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 753 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 754 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 755 | MTL_FAST_MATH = YES; 756 | PRODUCT_BUNDLE_IDENTIFIER = pl.holko.DeallocationCheckerUITests; 757 | PRODUCT_NAME = "$(TARGET_NAME)"; 758 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 759 | SWIFT_VERSION = 4.2; 760 | TARGETED_DEVICE_FAMILY = "1,2"; 761 | TEST_TARGET_NAME = ExampleApp; 762 | }; 763 | name = Debug; 764 | }; 765 | A6AA7EB3215690A0009D514F /* Release */ = { 766 | isa = XCBuildConfiguration; 767 | buildSettings = { 768 | CLANG_ANALYZER_NONNULL = YES; 769 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 770 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 771 | CLANG_ENABLE_OBJC_WEAK = YES; 772 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 773 | CLANG_WARN_COMMA = YES; 774 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 775 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 776 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 777 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 778 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 779 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 780 | CLANG_WARN_STRICT_PROTOTYPES = YES; 781 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 782 | CODE_SIGN_IDENTITY = "iPhone Developer"; 783 | CODE_SIGN_STYLE = Automatic; 784 | DEVELOPMENT_TEAM = JNVZW2VES4; 785 | GCC_C_LANGUAGE_STANDARD = gnu11; 786 | INFOPLIST_FILE = DeallocationCheckerUITests/Info.plist; 787 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 788 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 789 | MTL_FAST_MATH = YES; 790 | PRODUCT_BUNDLE_IDENTIFIER = pl.holko.DeallocationCheckerUITests; 791 | PRODUCT_NAME = "$(TARGET_NAME)"; 792 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 793 | SWIFT_VERSION = 4.2; 794 | TARGETED_DEVICE_FAMILY = "1,2"; 795 | TEST_TARGET_NAME = ExampleApp; 796 | }; 797 | name = Release; 798 | }; 799 | /* End XCBuildConfiguration section */ 800 | 801 | /* Begin XCConfigurationList section */ 802 | 52D6D9761BEFF229002C0205 /* Build configuration list for PBXProject "DeallocationChecker" */ = { 803 | isa = XCConfigurationList; 804 | buildConfigurations = ( 805 | 52D6D98E1BEFF229002C0205 /* Debug */, 806 | 52D6D98F1BEFF229002C0205 /* Release */, 807 | ); 808 | defaultConfigurationIsVisible = 0; 809 | defaultConfigurationName = Release; 810 | }; 811 | 52D6D9901BEFF229002C0205 /* Build configuration list for PBXNativeTarget "DeallocationChecker-iOS" */ = { 812 | isa = XCConfigurationList; 813 | buildConfigurations = ( 814 | 52D6D9911BEFF229002C0205 /* Debug */, 815 | 52D6D9921BEFF229002C0205 /* Release */, 816 | ); 817 | defaultConfigurationIsVisible = 0; 818 | defaultConfigurationName = Release; 819 | }; 820 | 52D6DA011BEFFFBE002C0205 /* Build configuration list for PBXNativeTarget "DeallocationChecker-tvOS" */ = { 821 | isa = XCConfigurationList; 822 | buildConfigurations = ( 823 | 52D6DA021BEFFFBE002C0205 /* Debug */, 824 | 52D6DA031BEFFFBE002C0205 /* Release */, 825 | ); 826 | defaultConfigurationIsVisible = 0; 827 | defaultConfigurationName = Release; 828 | }; 829 | A6AA7E9321568EF1009D514F /* Build configuration list for PBXNativeTarget "ExampleApp" */ = { 830 | isa = XCConfigurationList; 831 | buildConfigurations = ( 832 | A6AA7E9421568EF1009D514F /* Debug */, 833 | A6AA7E9521568EF1009D514F /* Release */, 834 | ); 835 | defaultConfigurationIsVisible = 0; 836 | defaultConfigurationName = Release; 837 | }; 838 | A6AA7EB1215690A0009D514F /* Build configuration list for PBXNativeTarget "DeallocationCheckerUITests" */ = { 839 | isa = XCConfigurationList; 840 | buildConfigurations = ( 841 | A6AA7EB2215690A0009D514F /* Debug */, 842 | A6AA7EB3215690A0009D514F /* Release */, 843 | ); 844 | defaultConfigurationIsVisible = 0; 845 | defaultConfigurationName = Release; 846 | }; 847 | /* End XCConfigurationList section */ 848 | }; 849 | rootObject = 52D6D9731BEFF229002C0205 /* Project object */; 850 | } 851 | --------------------------------------------------------------------------------