├── Starter_Project.zip
├── GCDSamples.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ ├── gabriel.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ │ └── simon.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
├── xcuserdata
│ ├── simon.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── GCDSamples.xcscheme
│ └── gabriel.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── GCDSamples.xcscheme
└── project.pbxproj
├── README.md
└── GCDSamples
├── Assets.xcassets
└── AppIcon.appiconset
│ └── Contents.json
├── Info.plist
├── Base.lproj
├── LaunchScreen.storyboard
└── Main.storyboard
├── AppDelegate.swift
└── ViewController.swift
/Starter_Project.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appcoda/GCDSamples/HEAD/Starter_Project.zip
--------------------------------------------------------------------------------
/GCDSamples.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GCDSamples.xcodeproj/project.xcworkspace/xcuserdata/gabriel.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appcoda/GCDSamples/HEAD/GCDSamples.xcodeproj/project.xcworkspace/xcuserdata/gabriel.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GCDSamples.xcodeproj/project.xcworkspace/xcuserdata/simon.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appcoda/GCDSamples/HEAD/GCDSamples.xcodeproj/project.xcworkspace/xcuserdata/simon.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GCDSamples.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GCDSamples.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C011DDA21DD05F6200C510C1
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/GCDSamples.xcodeproj/xcuserdata/gabriel.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GCDSamples.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C011DDA21DD05F6200C510C1
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # A simple demo for Grand Central Dispatch in Swift 3
2 |
3 | In Swift 3 things have dramatically changed. The way GCD is used is brand new, totally Swift-like, and the new syntax makes it a lot easier for developers to get familiarised with it. These changes gave me the motivation to write a post about the most basic and important things one can do with GCD in Swift 3. If you were using GCD with its old coding style (even a little), then this whole new syntax will seem like a piece of cake; if not, then you’re just about to learn about a new programming chapter.
4 |
5 | For the full tutorial, please refer to the link below:
6 |
7 | http://www.appcoda.com/grand-central-dispatch
8 |
--------------------------------------------------------------------------------
/GCDSamples/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 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/GCDSamples/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 | 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 | NSAppTransportSecurity
45 |
46 | NSAllowsArbitraryLoads
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/GCDSamples/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 |
--------------------------------------------------------------------------------
/GCDSamples/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // GCDSamples
4 | //
5 | // Created by Gabriel Theodoropoulos on 07/11/16.
6 | // Copyright © 2016 Appcoda. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> 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 invalidate graphics rendering callbacks. 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 active 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 |
--------------------------------------------------------------------------------
/GCDSamples/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 |
--------------------------------------------------------------------------------
/GCDSamples.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/GCDSamples.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/GCDSamples.xcodeproj/xcuserdata/gabriel.xcuserdatad/xcschemes/GCDSamples.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
69 |
70 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/GCDSamples/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // GCDSamples
4 | //
5 | // Created by Gabriel Theodoropoulos on 07/11/16.
6 | // Copyright © 2016 Appcoda. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | @IBOutlet weak var imageView: UIImageView!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | // Do any additional setup after loading the view, typically from a nib.
18 | }
19 |
20 | override func didReceiveMemoryWarning() {
21 | super.didReceiveMemoryWarning()
22 | // Dispose of any resources that can be recreated.
23 | }
24 |
25 |
26 | override func viewDidAppear(_ animated: Bool) {
27 | super.viewDidAppear(animated)
28 |
29 | // Uncomment the following method call to test
30 |
31 | simpleQueues()
32 |
33 | // queuesWithQoS()
34 |
35 | /*
36 | concurrentQueues()
37 | if let queue = inactiveQueue {
38 | queue.activate()
39 | }
40 | */
41 |
42 | // queueWithDelay()
43 |
44 | // fetchImage()
45 |
46 | // useWorkItem()
47 | }
48 |
49 |
50 |
51 | func simpleQueues() {
52 | let queue = DispatchQueue(label: "com.appcoda.myqueue")
53 |
54 | queue.async {
55 | for i in 0..<10 {
56 | print("🔴", i)
57 | }
58 | }
59 |
60 | for i in 100..<110 {
61 | print("Ⓜ️", i)
62 | }
63 | }
64 |
65 |
66 | func queuesWithQoS() {
67 | let queue1 = DispatchQueue(label: "com.appcoda.queue1", qos: DispatchQoS.userInitiated)
68 | // let queue1 = DispatchQueue(label: "com.appcoda.queue1", qos: DispatchQoS.background)
69 | // let queue2 = DispatchQueue(label: "com.appcoda.queue2", qos: DispatchQoS.userInitiated)
70 | let queue2 = DispatchQueue(label: "com.appcoda.queue2", qos: DispatchQoS.utility)
71 |
72 | queue1.async {
73 | for i in 0..<10 {
74 | print("🔴", i)
75 | }
76 | }
77 |
78 | queue2.async {
79 | for i in 100..<110 {
80 | print("🔵", i)
81 | }
82 | }
83 |
84 | for i in 1000..<1010 {
85 | print("Ⓜ️", i)
86 | }
87 | }
88 |
89 |
90 | var inactiveQueue: DispatchQueue!
91 | func concurrentQueues() {
92 | // let anotherQueue = DispatchQueue(label: "com.appcoda.anotherQueue", qos: .utility)
93 | // let anotherQueue = DispatchQueue(label: "com.appcoda.anotherQueue", qos: .utility, attributes: .concurrent)
94 | // let anotherQueue = DispatchQueue(label: "com.appcoda.anotherQueue", qos: .utility, attributes: .initiallyInactive)
95 | let anotherQueue = DispatchQueue(label: "com.appcoda.anotherQueue", qos: .userInitiated, attributes: [.concurrent, .initiallyInactive])
96 | inactiveQueue = anotherQueue
97 |
98 | anotherQueue.async {
99 | for i in 0..<10 {
100 | print("🔴", i)
101 | }
102 | }
103 |
104 |
105 | anotherQueue.async {
106 | for i in 100..<110 {
107 | print("🔵", i)
108 | }
109 | }
110 |
111 |
112 | anotherQueue.async {
113 | for i in 1000..<1010 {
114 | print("⚫️", i)
115 | }
116 | }
117 | }
118 |
119 |
120 | func queueWithDelay() {
121 | let delayQueue = DispatchQueue(label: "com.appcoda.delayqueue", qos: .userInitiated)
122 |
123 | print(Date())
124 | let additionalTime: DispatchTimeInterval = .seconds(2)
125 |
126 | delayQueue.asyncAfter(deadline: .now() + additionalTime) {
127 | print(Date())
128 | }
129 | }
130 |
131 |
132 | func fetchImage() {
133 | let imageURL: URL = URL(string: "http://www.appcoda.com/wp-content/uploads/2015/12/blog-logo-dark-400.png")!
134 |
135 | (URLSession(configuration: URLSessionConfiguration.default)).dataTask(with: imageURL, completionHandler: { (imageData, response, error) in
136 |
137 | if let data = imageData {
138 | print("Did download image data")
139 |
140 | DispatchQueue.main.async {
141 | self.imageView.image = UIImage(data: data)
142 | }
143 | }
144 | }).resume()
145 | }
146 |
147 |
148 | func useWorkItem() {
149 | var value = 10
150 |
151 | let workItem = DispatchWorkItem {
152 | value += 5
153 | }
154 |
155 | workItem.perform()
156 |
157 | let queue = DispatchQueue.global(qos: .utility)
158 | /*
159 | queue.async {
160 | workItem.perform()
161 | }
162 | */
163 |
164 | queue.async(execute: workItem)
165 |
166 |
167 | workItem.notify(queue: DispatchQueue.main) {
168 | print("value = ", value)
169 | }
170 | }
171 | }
172 |
173 |
--------------------------------------------------------------------------------
/GCDSamples.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | C011DDA71DD05F6200C510C1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C011DDA61DD05F6200C510C1 /* AppDelegate.swift */; };
11 | C011DDA91DD05F6200C510C1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C011DDA81DD05F6200C510C1 /* ViewController.swift */; };
12 | C011DDAC1DD05F6200C510C1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C011DDAA1DD05F6200C510C1 /* Main.storyboard */; };
13 | C011DDAE1DD05F6200C510C1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C011DDAD1DD05F6200C510C1 /* Assets.xcassets */; };
14 | C011DDB11DD05F6200C510C1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C011DDAF1DD05F6200C510C1 /* LaunchScreen.storyboard */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXFileReference section */
18 | C011DDA31DD05F6200C510C1 /* GCDSamples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GCDSamples.app; sourceTree = BUILT_PRODUCTS_DIR; };
19 | C011DDA61DD05F6200C510C1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
20 | C011DDA81DD05F6200C510C1 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
21 | C011DDAB1DD05F6200C510C1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
22 | C011DDAD1DD05F6200C510C1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
23 | C011DDB01DD05F6200C510C1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
24 | C011DDB21DD05F6200C510C1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
25 | /* End PBXFileReference section */
26 |
27 | /* Begin PBXFrameworksBuildPhase section */
28 | C011DDA01DD05F6200C510C1 /* Frameworks */ = {
29 | isa = PBXFrameworksBuildPhase;
30 | buildActionMask = 2147483647;
31 | files = (
32 | );
33 | runOnlyForDeploymentPostprocessing = 0;
34 | };
35 | /* End PBXFrameworksBuildPhase section */
36 |
37 | /* Begin PBXGroup section */
38 | C011DD9A1DD05F6200C510C1 = {
39 | isa = PBXGroup;
40 | children = (
41 | C011DDA51DD05F6200C510C1 /* GCDSamples */,
42 | C011DDA41DD05F6200C510C1 /* Products */,
43 | );
44 | sourceTree = "";
45 | };
46 | C011DDA41DD05F6200C510C1 /* Products */ = {
47 | isa = PBXGroup;
48 | children = (
49 | C011DDA31DD05F6200C510C1 /* GCDSamples.app */,
50 | );
51 | name = Products;
52 | sourceTree = "";
53 | };
54 | C011DDA51DD05F6200C510C1 /* GCDSamples */ = {
55 | isa = PBXGroup;
56 | children = (
57 | C011DDA61DD05F6200C510C1 /* AppDelegate.swift */,
58 | C011DDA81DD05F6200C510C1 /* ViewController.swift */,
59 | C011DDAA1DD05F6200C510C1 /* Main.storyboard */,
60 | C011DDAD1DD05F6200C510C1 /* Assets.xcassets */,
61 | C011DDAF1DD05F6200C510C1 /* LaunchScreen.storyboard */,
62 | C011DDB21DD05F6200C510C1 /* Info.plist */,
63 | );
64 | path = GCDSamples;
65 | sourceTree = "";
66 | };
67 | /* End PBXGroup section */
68 |
69 | /* Begin PBXNativeTarget section */
70 | C011DDA21DD05F6200C510C1 /* GCDSamples */ = {
71 | isa = PBXNativeTarget;
72 | buildConfigurationList = C011DDB51DD05F6200C510C1 /* Build configuration list for PBXNativeTarget "GCDSamples" */;
73 | buildPhases = (
74 | C011DD9F1DD05F6200C510C1 /* Sources */,
75 | C011DDA01DD05F6200C510C1 /* Frameworks */,
76 | C011DDA11DD05F6200C510C1 /* Resources */,
77 | );
78 | buildRules = (
79 | );
80 | dependencies = (
81 | );
82 | name = GCDSamples;
83 | productName = GCDSamples;
84 | productReference = C011DDA31DD05F6200C510C1 /* GCDSamples.app */;
85 | productType = "com.apple.product-type.application";
86 | };
87 | /* End PBXNativeTarget section */
88 |
89 | /* Begin PBXProject section */
90 | C011DD9B1DD05F6200C510C1 /* Project object */ = {
91 | isa = PBXProject;
92 | attributes = {
93 | LastSwiftUpdateCheck = 0800;
94 | LastUpgradeCheck = 0800;
95 | ORGANIZATIONNAME = Appcoda;
96 | TargetAttributes = {
97 | C011DDA21DD05F6200C510C1 = {
98 | CreatedOnToolsVersion = 8.0;
99 | ProvisioningStyle = Automatic;
100 | };
101 | };
102 | };
103 | buildConfigurationList = C011DD9E1DD05F6200C510C1 /* Build configuration list for PBXProject "GCDSamples" */;
104 | compatibilityVersion = "Xcode 3.2";
105 | developmentRegion = English;
106 | hasScannedForEncodings = 0;
107 | knownRegions = (
108 | en,
109 | Base,
110 | );
111 | mainGroup = C011DD9A1DD05F6200C510C1;
112 | productRefGroup = C011DDA41DD05F6200C510C1 /* Products */;
113 | projectDirPath = "";
114 | projectRoot = "";
115 | targets = (
116 | C011DDA21DD05F6200C510C1 /* GCDSamples */,
117 | );
118 | };
119 | /* End PBXProject section */
120 |
121 | /* Begin PBXResourcesBuildPhase section */
122 | C011DDA11DD05F6200C510C1 /* Resources */ = {
123 | isa = PBXResourcesBuildPhase;
124 | buildActionMask = 2147483647;
125 | files = (
126 | C011DDB11DD05F6200C510C1 /* LaunchScreen.storyboard in Resources */,
127 | C011DDAE1DD05F6200C510C1 /* Assets.xcassets in Resources */,
128 | C011DDAC1DD05F6200C510C1 /* Main.storyboard in Resources */,
129 | );
130 | runOnlyForDeploymentPostprocessing = 0;
131 | };
132 | /* End PBXResourcesBuildPhase section */
133 |
134 | /* Begin PBXSourcesBuildPhase section */
135 | C011DD9F1DD05F6200C510C1 /* Sources */ = {
136 | isa = PBXSourcesBuildPhase;
137 | buildActionMask = 2147483647;
138 | files = (
139 | C011DDA91DD05F6200C510C1 /* ViewController.swift in Sources */,
140 | C011DDA71DD05F6200C510C1 /* AppDelegate.swift in Sources */,
141 | );
142 | runOnlyForDeploymentPostprocessing = 0;
143 | };
144 | /* End PBXSourcesBuildPhase section */
145 |
146 | /* Begin PBXVariantGroup section */
147 | C011DDAA1DD05F6200C510C1 /* Main.storyboard */ = {
148 | isa = PBXVariantGroup;
149 | children = (
150 | C011DDAB1DD05F6200C510C1 /* Base */,
151 | );
152 | name = Main.storyboard;
153 | sourceTree = "";
154 | };
155 | C011DDAF1DD05F6200C510C1 /* LaunchScreen.storyboard */ = {
156 | isa = PBXVariantGroup;
157 | children = (
158 | C011DDB01DD05F6200C510C1 /* Base */,
159 | );
160 | name = LaunchScreen.storyboard;
161 | sourceTree = "";
162 | };
163 | /* End PBXVariantGroup section */
164 |
165 | /* Begin XCBuildConfiguration section */
166 | C011DDB31DD05F6200C510C1 /* Debug */ = {
167 | isa = XCBuildConfiguration;
168 | buildSettings = {
169 | ALWAYS_SEARCH_USER_PATHS = NO;
170 | CLANG_ANALYZER_NONNULL = YES;
171 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
172 | CLANG_CXX_LIBRARY = "libc++";
173 | CLANG_ENABLE_MODULES = YES;
174 | CLANG_ENABLE_OBJC_ARC = YES;
175 | CLANG_WARN_BOOL_CONVERSION = YES;
176 | CLANG_WARN_CONSTANT_CONVERSION = YES;
177 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
178 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
179 | CLANG_WARN_EMPTY_BODY = YES;
180 | CLANG_WARN_ENUM_CONVERSION = YES;
181 | CLANG_WARN_INFINITE_RECURSION = YES;
182 | CLANG_WARN_INT_CONVERSION = YES;
183 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
184 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
185 | CLANG_WARN_UNREACHABLE_CODE = YES;
186 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
187 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
188 | COPY_PHASE_STRIP = NO;
189 | DEBUG_INFORMATION_FORMAT = dwarf;
190 | ENABLE_STRICT_OBJC_MSGSEND = YES;
191 | ENABLE_TESTABILITY = YES;
192 | GCC_C_LANGUAGE_STANDARD = gnu99;
193 | GCC_DYNAMIC_NO_PIC = NO;
194 | GCC_NO_COMMON_BLOCKS = YES;
195 | GCC_OPTIMIZATION_LEVEL = 0;
196 | GCC_PREPROCESSOR_DEFINITIONS = (
197 | "DEBUG=1",
198 | "$(inherited)",
199 | );
200 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
201 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
202 | GCC_WARN_UNDECLARED_SELECTOR = YES;
203 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
204 | GCC_WARN_UNUSED_FUNCTION = YES;
205 | GCC_WARN_UNUSED_VARIABLE = YES;
206 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
207 | MTL_ENABLE_DEBUG_INFO = YES;
208 | ONLY_ACTIVE_ARCH = YES;
209 | SDKROOT = iphoneos;
210 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
211 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
212 | TARGETED_DEVICE_FAMILY = "1,2";
213 | };
214 | name = Debug;
215 | };
216 | C011DDB41DD05F6200C510C1 /* Release */ = {
217 | isa = XCBuildConfiguration;
218 | buildSettings = {
219 | ALWAYS_SEARCH_USER_PATHS = NO;
220 | CLANG_ANALYZER_NONNULL = YES;
221 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
222 | CLANG_CXX_LIBRARY = "libc++";
223 | CLANG_ENABLE_MODULES = YES;
224 | CLANG_ENABLE_OBJC_ARC = YES;
225 | CLANG_WARN_BOOL_CONVERSION = YES;
226 | CLANG_WARN_CONSTANT_CONVERSION = YES;
227 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
228 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
229 | CLANG_WARN_EMPTY_BODY = YES;
230 | CLANG_WARN_ENUM_CONVERSION = YES;
231 | CLANG_WARN_INFINITE_RECURSION = YES;
232 | CLANG_WARN_INT_CONVERSION = YES;
233 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
234 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
235 | CLANG_WARN_UNREACHABLE_CODE = YES;
236 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
237 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
238 | COPY_PHASE_STRIP = NO;
239 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
240 | ENABLE_NS_ASSERTIONS = NO;
241 | ENABLE_STRICT_OBJC_MSGSEND = YES;
242 | GCC_C_LANGUAGE_STANDARD = gnu99;
243 | GCC_NO_COMMON_BLOCKS = YES;
244 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
245 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
246 | GCC_WARN_UNDECLARED_SELECTOR = YES;
247 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
248 | GCC_WARN_UNUSED_FUNCTION = YES;
249 | GCC_WARN_UNUSED_VARIABLE = YES;
250 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
251 | MTL_ENABLE_DEBUG_INFO = NO;
252 | SDKROOT = iphoneos;
253 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
254 | TARGETED_DEVICE_FAMILY = "1,2";
255 | VALIDATE_PRODUCT = YES;
256 | };
257 | name = Release;
258 | };
259 | C011DDB61DD05F6200C510C1 /* Debug */ = {
260 | isa = XCBuildConfiguration;
261 | buildSettings = {
262 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
263 | INFOPLIST_FILE = GCDSamples/Info.plist;
264 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
265 | PRODUCT_BUNDLE_IDENTIFIER = com.appcoda.GCDSamples;
266 | PRODUCT_NAME = "$(TARGET_NAME)";
267 | SWIFT_VERSION = 3.0;
268 | };
269 | name = Debug;
270 | };
271 | C011DDB71DD05F6200C510C1 /* Release */ = {
272 | isa = XCBuildConfiguration;
273 | buildSettings = {
274 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
275 | INFOPLIST_FILE = GCDSamples/Info.plist;
276 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
277 | PRODUCT_BUNDLE_IDENTIFIER = com.appcoda.GCDSamples;
278 | PRODUCT_NAME = "$(TARGET_NAME)";
279 | SWIFT_VERSION = 3.0;
280 | };
281 | name = Release;
282 | };
283 | /* End XCBuildConfiguration section */
284 |
285 | /* Begin XCConfigurationList section */
286 | C011DD9E1DD05F6200C510C1 /* Build configuration list for PBXProject "GCDSamples" */ = {
287 | isa = XCConfigurationList;
288 | buildConfigurations = (
289 | C011DDB31DD05F6200C510C1 /* Debug */,
290 | C011DDB41DD05F6200C510C1 /* Release */,
291 | );
292 | defaultConfigurationIsVisible = 0;
293 | defaultConfigurationName = Release;
294 | };
295 | C011DDB51DD05F6200C510C1 /* Build configuration list for PBXNativeTarget "GCDSamples" */ = {
296 | isa = XCConfigurationList;
297 | buildConfigurations = (
298 | C011DDB61DD05F6200C510C1 /* Debug */,
299 | C011DDB71DD05F6200C510C1 /* Release */,
300 | );
301 | defaultConfigurationIsVisible = 0;
302 | };
303 | /* End XCConfigurationList section */
304 | };
305 | rootObject = C011DD9B1DD05F6200C510C1 /* Project object */;
306 | }
307 |
--------------------------------------------------------------------------------