├── Typed.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcshareddata
│ └── xcschemes
│ │ └── Test.xcscheme
└── project.pbxproj
├── .gitignore
├── Sources
├── TypedKeyPaths.h
├── Typed.h
├── TypedCollectionLiterals.h
├── TypedNSFastEnumeration.h
└── TypedNSCopying.h
├── Test
└── main.m
├── LICENSE.md
└── README.md
/Typed.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
20 | # CocoaPods
21 | #
22 | # We recommend against adding the Pods directory to your .gitignore. However
23 | # you should judge for yourself, the pros and cons are mentioned at:
24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25 | #
26 | # Pods/
27 |
--------------------------------------------------------------------------------
/Sources/TypedKeyPaths.h:
--------------------------------------------------------------------------------
1 | //
2 | // TypedKeyPaths.h
3 | // Typed
4 | //
5 | // Created by Martin Kiss on 14 June 2017.
6 | // https://github.com/Tricertops/Typed
7 | //
8 | // The MIT License (MIT)
9 | // Copyright © 2017 Martin Kiss
10 | //
11 |
12 |
13 |
14 | //! Macro for building type-checked keypath strings. Prefix usage with @ symbol. Works with instances and classes.
15 | #define keypath(receiver, keypath) \
16 | ( ((void)(NO && ((void)receiver.Typed_keypath.keypath, NO)), #keypath) )
17 |
18 |
19 |
20 | //! This extends both instances and classes with unified method that returns instancetype for use in @keypath(…) macro.
21 | @interface NSObject (TypedKeyPaths)
22 |
23 | + (instancetype)Typed_keypath;
24 | - (instancetype)Typed_keypath;
25 |
26 | @end
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Test/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // TypedCollectionLiterals.h
3 | // Typed
4 | //
5 | // Created by Martin Kiss on 24 May 2017.
6 | // https://github.com/Tricertops/Typed
7 | //
8 | // The MIT License (MIT)
9 | // Copyright © 2017 Martin Kiss
10 | //
11 |
12 | @import Foundation;
13 | @import AppKit;
14 | #import "Typed.h"
15 |
16 |
17 |
18 | int main(int argc, const char * argv[]) {
19 | @autoreleasepool {
20 | //! Some example usage:
21 |
22 | let name = @"Martin"; // NSString * const
23 | var mutableName = [name mutableCopy]; // NSMutableString *
24 |
25 | let letters = NSArray(@"A", @"B", @"C"); // NSArray * const
26 | var mutableLetters = [letters mutableCopy]; // NSMutableArray *
27 |
28 | foreach (letter, letters) {
29 | // NSString *
30 | }
31 |
32 | }
33 | return EXIT_SUCCESS;
34 | }
35 |
36 |
37 |
--------------------------------------------------------------------------------
/Sources/Typed.h:
--------------------------------------------------------------------------------
1 | //
2 | // Typed.h
3 | // Typed
4 | //
5 | // Created by Martin Kiss on 24 May 2017.
6 | // https://github.com/Tricertops/Typed
7 | //
8 | // The MIT License (MIT)
9 | // Copyright © 2017 Martin Kiss
10 | //
11 |
12 | @import Foundation;
13 |
14 |
15 |
16 | //! Swift-like macro for type inference of local or global variables.
17 | #define var __auto_type
18 |
19 |
20 | //! Swift-like macro for type inference of local or global variables that cannot be re-assigned.
21 | #define let __auto_type const
22 |
23 |
24 | //! Macro that expands to for-in loop with inferred type of enumerated variable.
25 | #import "TypedNSFastEnumeration.h"
26 |
27 |
28 | //! Type inference for -copy and -mutableCopy methods.
29 | #import "TypedNSCopying.h"
30 |
31 |
32 | //! Type-checked collection literals as a replacement for built-in @[…].
33 | #import "TypedCollectionLiterals.h"
34 |
35 |
36 | //! Type-checked keypath building macro @keypath(…).
37 | #import "TypedKeyPaths.h"
38 |
39 |
40 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | =====================
3 |
4 | **Copyright © 2017 Martin Kiss**
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 |
8 | - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 |
10 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Type inference in Objective-C
2 | =============================
3 |
4 | This project includes several macros and class categories that provide hints for compiler type inference. From simple `let` and `var` that are inspired by Swift, to `foreach () {}` construct that replaces `for (in) {}` loops.
5 |
6 |
7 | **Without type inference, the types are error-prone:**
8 |
9 | ```objc
10 | NSString *name = @"Martin";
11 | NSMutableString *mutableName = [name mutableCopy];
12 |
13 | NSArray *letters = @[@"A", @"B", @"C"];
14 | NSMutableArray *mutableLetters = [letters mutableCopy];
15 |
16 | for (NSString *letter in letters) {
17 | //...
18 | }
19 | ```
20 |
21 | - Types of almost all variables are *not* checked by compiler.
22 | - Methods `-mutableCopy` discard types, because they return `id`.
23 | - Array literal doesn’t check for mixed types and doesn’t propagate element type.
24 | - Loop `for (in) {}` ignores element type of enumerated collection.
25 |
26 |
27 | **With type inference, this is still pure Objective-C:**
28 |
29 | ```objc
30 | let name = @"Martin";
31 | var mutableName = [name mutableCopy];
32 |
33 | let letters = NSArray(@"A", @"B", @"C");
34 | var mutableLetters = [letters mutableCopy];
35 |
36 | foreach (letter, letters) {
37 | //...
38 | }
39 | ```
40 |
41 | - Types of *all* variables are inferred from context.
42 | - Methods `-mutableCopy` are redeclared with proper return type.
43 | - Macro `NSArray(…)` doesn’t accept mixed types as arguments and returns `NSArray` with proper element type.
44 | - Macro `foreach () {}` infers type of the variable from the enumerated collection.
45 |
46 |
--------------------------------------------------------------------------------
/Sources/TypedCollectionLiterals.h:
--------------------------------------------------------------------------------
1 | //
2 | // TypedCollectionLiterals.h
3 | // Typed
4 | //
5 | // Created by Martin Kiss on 24 May 2017.
6 | // https://github.com/Tricertops/Typed
7 | //
8 | // The MIT License (MIT)
9 | // Copyright © 2017 Martin Kiss
10 | //
11 |
12 |
13 |
14 | //! These macros are much better alternative for built-in @[…] literal, because they infer type of the collection from the objects.
15 | //! In addition, they report compilation error when types of all arguments are not the same.
16 |
17 |
18 |
19 | #define NSArray(first, other...) \
20 | ( (NSArray *) ({ \
21 | typeof(first) _objects[] = {first, other}; \
22 | NSUInteger _count = sizeof(_objects) / sizeof(id); \
23 | [NSArray arrayWithObjects:_objects count:_count]; \
24 | }) )
25 |
26 |
27 |
28 | #define NSMutableArray(first, other...) \
29 | ( (NSMutableArray *) ({ \
30 | typeof(first) _objects[] = {first, other}; \
31 | NSUInteger _count = sizeof(_objects) / sizeof(id); \
32 | [NSMutableArray arrayWithObjects:_objects count:_count]; \
33 | }) )
34 |
35 |
36 | #define NSSet(first, other...) \
37 | ( (NSSet *) ({ \
38 | typeof(first) _objects[] = {first, other}; \
39 | NSUInteger _count = sizeof(_objects) / sizeof(id); \
40 | [NSSet setWithObjects:_objects count:_count]; \
41 | }) )
42 |
43 |
44 |
45 | #define NSMutableSet(first, other...) \
46 | ( (NSMutableSet *) ({ \
47 | typeof(first) _objects[] = {first, other}; \
48 | NSUInteger _count = sizeof(_objects) / sizeof(id); \
49 | [NSMutableSet setWithObjects:_objects count:_count]; \
50 | }) )
51 |
52 |
53 |
--------------------------------------------------------------------------------
/Sources/TypedNSFastEnumeration.h:
--------------------------------------------------------------------------------
1 | //
2 | // TypedNSFastEnumeration.h
3 | // Typed
4 | //
5 | // Created by Martin Kiss on 24 May 2017.
6 | // https://github.com/Tricertops/Typed
7 | //
8 | // The MIT License (MIT)
9 | // Copyright © 2017 Martin Kiss
10 | //
11 |
12 |
13 |
14 | //! Replacement for for-in loop that infers type of enumerated variable from the collection.
15 | #define foreach(element, collection) \
16 | for (typeof((collection).Typed_enumeratedType) element in (collection))
17 |
18 |
19 |
20 | //! Formalized method for type inference. All classes that conform to NSFastEnumeration should be extended with this protocol.
21 | //! The method doesn’t need implementation, since it’s only used for typeof(…) compiler feature in foreach(…) macro.
22 | @protocol TypedNSFastEnumeration
23 |
24 | - (id)Typed_enumeratedType;
25 |
26 | @end
27 |
28 |
29 |
30 | @interface NSArray (TypedNSFastEnumeration)
31 |
32 | - (ElementType)Typed_enumeratedType;
33 |
34 | @end
35 |
36 |
37 |
38 | @interface NSSet (TypedNSFastEnumeration)
39 |
40 | - (ElementType)Typed_enumeratedType;
41 |
42 | @end
43 |
44 |
45 |
46 | @interface NSOrderedSet (TypedNSFastEnumeration)
47 |
48 | - (ElementType)Typed_enumeratedType;
49 |
50 | @end
51 |
52 |
53 |
54 | @interface NSPointerArray (TypedNSFastEnumeration)
55 |
56 | - (void *)Typed_enumeratedType;
57 |
58 | @end
59 |
60 |
61 |
62 | @interface NSHashTable (TypedNSFastEnumeration)
63 |
64 | - (ElementType)Typed_enumeratedType;
65 |
66 | @end
67 |
68 |
69 |
70 | @interface NSDictionary (TypedNSFastEnumeration)
71 |
72 | - (KeyType)Typed_enumeratedType;
73 |
74 | @end
75 |
76 |
77 |
78 | @interface NSMapTable (TypedNSFastEnumeration)
79 |
80 | - (KeyType)Typed_enumeratedType;
81 |
82 | @end
83 |
84 |
85 |
86 | @interface NSEnumerator (TypedNSFastEnumeration)
87 |
88 | - (ElementType)Typed_enumeratedType;
89 |
90 | @end
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/Typed.xcodeproj/xcshareddata/xcschemes/Test.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/Sources/TypedNSCopying.h:
--------------------------------------------------------------------------------
1 | //
2 | // TypedNSCopying.h
3 | // Typed
4 | //
5 | // Created by Martin Kiss on 24 May 2017.
6 | // https://github.com/Tricertops/Typed
7 | //
8 | // The MIT License (MIT)
9 | // Copyright © 2017 Martin Kiss
10 | //
11 |
12 |
13 |
14 | //! Many classes that conform to NSCopying and mainly to NSMutableCopying are extended to provide type inference hint about their copies.
15 |
16 |
17 | #if defined(APPKIT_EXTERN)
18 | @import AppKit;
19 | #endif
20 |
21 | #if defined(UIKIT_EXTERN)
22 | @import UIKit;
23 | #endif
24 |
25 |
26 | @interface NSArray (TypedNSCopying)
27 |
28 | - (NSArray *)copy;
29 | - (NSMutableArray *)mutableCopy;
30 |
31 | @end
32 |
33 |
34 |
35 | @interface NSSet (TypedNSCopying)
36 |
37 | - (NSSet *)copy;
38 | - (NSMutableSet *)mutableCopy;
39 |
40 | @end
41 |
42 |
43 |
44 | @interface NSOrderedSet (TypedNSCopying)
45 |
46 | - (NSOrderedSet *)copy;
47 | - (NSMutableOrderedSet *)mutableCopy;
48 |
49 | @end
50 |
51 |
52 |
53 | @interface NSHashTable (TypedNSCopying)
54 |
55 | - (instancetype)copy;
56 |
57 | @end
58 |
59 |
60 |
61 | @interface NSDictionary (TypedNSCopying)
62 |
63 | - (NSDictionary *)copy;
64 | - (NSMutableDictionary *)mutableCopy;
65 |
66 | @end
67 |
68 |
69 |
70 | @interface NSMapTable (TypedNSCopying)
71 |
72 | - (instancetype)copy;
73 |
74 | @end
75 |
76 |
77 |
78 | @interface NSAttributedString (TypedNSCopying)
79 |
80 | - (NSAttributedString *)copy;
81 | - (NSMutableAttributedString *)mutableCopy;
82 |
83 | @end
84 |
85 |
86 |
87 | @interface NSCharacterSet (TypedNSCopying)
88 |
89 | - (NSCharacterSet *)copy;
90 | - (NSMutableCharacterSet *)mutableCopy;
91 |
92 | @end
93 |
94 |
95 |
96 | @interface NSData (TypedNSCopying)
97 |
98 | - (NSData *)copy;
99 | - (NSMutableData *)mutableCopy;
100 |
101 | @end
102 |
103 |
104 |
105 | @interface NSIndexSet (TypedNSCopying)
106 |
107 | - (NSIndexSet *)copy;
108 | - (NSMutableIndexSet *)mutableCopy;
109 |
110 | @end
111 |
112 |
113 |
114 | #if defined(APPKIT_EXTERN) || defined(UIKIT_EXTERN)
115 |
116 | @interface NSParagraphStyle (TypedNSCopying)
117 |
118 | - (NSParagraphStyle *)copy;
119 | - (NSMutableParagraphStyle *)mutableCopy;
120 |
121 | @end
122 |
123 | @interface NSShadow (TypedNSCopying)
124 |
125 | - (instancetype)copy;
126 |
127 | @end
128 |
129 | #endif
130 |
131 |
132 |
133 | @interface NSString (TypedNSCopying)
134 |
135 | - (NSString *)copy;
136 | - (NSMutableString *)mutableCopy;
137 |
138 | @end
139 |
140 |
141 |
142 | @interface NSURLRequest (TypedNSCopying)
143 |
144 | - (NSURLRequest *)copy;
145 | - (NSMutableURLRequest *)mutableCopy;
146 |
147 | @end
148 |
149 |
150 |
151 | @interface NSDateComponents (TypedNSCopying)
152 |
153 | - (instancetype)copy;
154 |
155 | @end
156 |
157 |
158 |
159 | @interface NSURLComponents (TypedNSCopying)
160 |
161 | - (instancetype)copy;
162 |
163 | @end
164 |
165 |
166 |
167 | #if defined(APPKIT_EXTERN)
168 |
169 | @interface NSBezierPath (TypedNSCopying)
170 |
171 | - (instancetype)copy;
172 |
173 | @end
174 |
175 | #endif
176 |
177 |
178 |
179 | #if defined(UIKIT_EXTERN)
180 |
181 | @interface UIBezierPath (TypedNSCopying)
182 |
183 | - (instancetype)copy;
184 |
185 | @end
186 |
187 | #endif
188 |
189 |
190 |
--------------------------------------------------------------------------------
/Typed.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 5BDA3FD51A023EEB00B3F9E0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BDA3FD41A023EEB00B3F9E0 /* main.m */; };
11 | /* End PBXBuildFile section */
12 |
13 | /* Begin PBXCopyFilesBuildPhase section */
14 | 5BDA3FD01A023EEB00B3F9E0 /* CopyFiles */ = {
15 | isa = PBXCopyFilesBuildPhase;
16 | buildActionMask = 2147483647;
17 | dstPath = /usr/share/man/man1/;
18 | dstSubfolderSpec = 0;
19 | files = (
20 | );
21 | runOnlyForDeploymentPostprocessing = 1;
22 | };
23 | /* End PBXCopyFilesBuildPhase section */
24 |
25 | /* Begin PBXFileReference section */
26 | 5B0312F41B7FC587007D3481 /* Typed.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Typed.h; sourceTree = ""; };
27 | 5BC8701A1ED568EC00380728 /* TypedNSFastEnumeration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypedNSFastEnumeration.h; sourceTree = ""; };
28 | 5BC8701F1ED56A3900380728 /* TypedNSCopying.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypedNSCopying.h; sourceTree = ""; };
29 | 5BC870201ED5749A00380728 /* TypedCollectionLiterals.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypedCollectionLiterals.h; sourceTree = ""; };
30 | 5BDA3FD21A023EEB00B3F9E0 /* Test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Test; sourceTree = BUILT_PRODUCTS_DIR; };
31 | 5BDA3FD41A023EEB00B3F9E0 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
32 | 5BF07E0C1EF1C1DE00562966 /* TypedKeyPaths.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypedKeyPaths.h; sourceTree = ""; };
33 | /* End PBXFileReference section */
34 |
35 | /* Begin PBXFrameworksBuildPhase section */
36 | 5BDA3FCF1A023EEB00B3F9E0 /* Frameworks */ = {
37 | isa = PBXFrameworksBuildPhase;
38 | buildActionMask = 2147483647;
39 | files = (
40 | );
41 | runOnlyForDeploymentPostprocessing = 0;
42 | };
43 | /* End PBXFrameworksBuildPhase section */
44 |
45 | /* Begin PBXGroup section */
46 | 5B8F5BA71A06619600253734 /* Sources */ = {
47 | isa = PBXGroup;
48 | children = (
49 | 5B0312F41B7FC587007D3481 /* Typed.h */,
50 | 5BC8701A1ED568EC00380728 /* TypedNSFastEnumeration.h */,
51 | 5BC8701F1ED56A3900380728 /* TypedNSCopying.h */,
52 | 5BC870201ED5749A00380728 /* TypedCollectionLiterals.h */,
53 | 5BF07E0C1EF1C1DE00562966 /* TypedKeyPaths.h */,
54 | );
55 | path = Sources;
56 | sourceTree = "";
57 | };
58 | 5BDA3FA11A0235F600B3F9E0 = {
59 | isa = PBXGroup;
60 | children = (
61 | 5B8F5BA71A06619600253734 /* Sources */,
62 | 5BDA3FD31A023EEB00B3F9E0 /* Test */,
63 | 5BDA3FAB1A0235F700B3F9E0 /* Products */,
64 | );
65 | sourceTree = "";
66 | };
67 | 5BDA3FAB1A0235F700B3F9E0 /* Products */ = {
68 | isa = PBXGroup;
69 | children = (
70 | 5BDA3FD21A023EEB00B3F9E0 /* Test */,
71 | );
72 | name = Products;
73 | sourceTree = "";
74 | };
75 | 5BDA3FD31A023EEB00B3F9E0 /* Test */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 5BDA3FD41A023EEB00B3F9E0 /* main.m */,
79 | );
80 | path = Test;
81 | sourceTree = "";
82 | };
83 | /* End PBXGroup section */
84 |
85 | /* Begin PBXNativeTarget section */
86 | 5BDA3FD11A023EEB00B3F9E0 /* Test */ = {
87 | isa = PBXNativeTarget;
88 | buildConfigurationList = 5BDA3FD61A023EEB00B3F9E0 /* Build configuration list for PBXNativeTarget "Test" */;
89 | buildPhases = (
90 | 5BDA3FCE1A023EEB00B3F9E0 /* Sources */,
91 | 5BDA3FCF1A023EEB00B3F9E0 /* Frameworks */,
92 | 5BDA3FD01A023EEB00B3F9E0 /* CopyFiles */,
93 | );
94 | buildRules = (
95 | );
96 | dependencies = (
97 | );
98 | name = Test;
99 | productName = Test;
100 | productReference = 5BDA3FD21A023EEB00B3F9E0 /* Test */;
101 | productType = "com.apple.product-type.tool";
102 | };
103 | /* End PBXNativeTarget section */
104 |
105 | /* Begin PBXProject section */
106 | 5BDA3FA21A0235F600B3F9E0 /* Project object */ = {
107 | isa = PBXProject;
108 | attributes = {
109 | BuildIndependentTargetsInParallel = YES;
110 | LastUpgradeCheck = 2600;
111 | ORGANIZATIONNAME = Triceratops;
112 | TargetAttributes = {
113 | 5BDA3FD11A023EEB00B3F9E0 = {
114 | CreatedOnToolsVersion = 6.1;
115 | };
116 | };
117 | };
118 | buildConfigurationList = 5BDA3FA51A0235F600B3F9E0 /* Build configuration list for PBXProject "Typed" */;
119 | compatibilityVersion = "Xcode 3.2";
120 | developmentRegion = en;
121 | hasScannedForEncodings = 0;
122 | knownRegions = (
123 | en,
124 | Base,
125 | );
126 | mainGroup = 5BDA3FA11A0235F600B3F9E0;
127 | productRefGroup = 5BDA3FAB1A0235F700B3F9E0 /* Products */;
128 | projectDirPath = "";
129 | projectRoot = "";
130 | targets = (
131 | 5BDA3FD11A023EEB00B3F9E0 /* Test */,
132 | );
133 | };
134 | /* End PBXProject section */
135 |
136 | /* Begin PBXSourcesBuildPhase section */
137 | 5BDA3FCE1A023EEB00B3F9E0 /* Sources */ = {
138 | isa = PBXSourcesBuildPhase;
139 | buildActionMask = 2147483647;
140 | files = (
141 | 5BDA3FD51A023EEB00B3F9E0 /* main.m in Sources */,
142 | );
143 | runOnlyForDeploymentPostprocessing = 0;
144 | };
145 | /* End PBXSourcesBuildPhase section */
146 |
147 | /* Begin XCBuildConfiguration section */
148 | 5BDA3FBC1A0235F700B3F9E0 /* Debug */ = {
149 | isa = XCBuildConfiguration;
150 | buildSettings = {
151 | ALWAYS_SEARCH_USER_PATHS = NO;
152 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
153 | CLANG_CXX_LIBRARY = "libc++";
154 | CLANG_ENABLE_MODULES = YES;
155 | CLANG_ENABLE_OBJC_ARC = YES;
156 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
157 | CLANG_WARN_BOOL_CONVERSION = YES;
158 | CLANG_WARN_COMMA = YES;
159 | CLANG_WARN_CONSTANT_CONVERSION = YES;
160 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
161 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
162 | CLANG_WARN_EMPTY_BODY = YES;
163 | CLANG_WARN_ENUM_CONVERSION = YES;
164 | CLANG_WARN_INFINITE_RECURSION = YES;
165 | CLANG_WARN_INT_CONVERSION = YES;
166 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
167 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
168 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
169 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
170 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
171 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
172 | CLANG_WARN_STRICT_PROTOTYPES = YES;
173 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
174 | CLANG_WARN_UNREACHABLE_CODE = YES;
175 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
176 | COPY_PHASE_STRIP = NO;
177 | DEAD_CODE_STRIPPING = YES;
178 | ENABLE_STRICT_OBJC_MSGSEND = YES;
179 | ENABLE_TESTABILITY = YES;
180 | ENABLE_USER_SCRIPT_SANDBOXING = YES;
181 | GCC_C_LANGUAGE_STANDARD = gnu99;
182 | GCC_DYNAMIC_NO_PIC = NO;
183 | GCC_NO_COMMON_BLOCKS = YES;
184 | GCC_OPTIMIZATION_LEVEL = 0;
185 | GCC_PREPROCESSOR_DEFINITIONS = (
186 | "DEBUG=1",
187 | "$(inherited)",
188 | );
189 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
190 | GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
191 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
192 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
193 | GCC_WARN_UNDECLARED_SELECTOR = YES;
194 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
195 | GCC_WARN_UNUSED_FUNCTION = YES;
196 | GCC_WARN_UNUSED_VARIABLE = YES;
197 | MACOSX_DEPLOYMENT_TARGET = 10.10;
198 | MTL_ENABLE_DEBUG_INFO = YES;
199 | ONLY_ACTIVE_ARCH = YES;
200 | OTHER_LDFLAGS = "-ObjC";
201 | SDKROOT = macosx;
202 | };
203 | name = Debug;
204 | };
205 | 5BDA3FBD1A0235F700B3F9E0 /* Release */ = {
206 | isa = XCBuildConfiguration;
207 | buildSettings = {
208 | ALWAYS_SEARCH_USER_PATHS = NO;
209 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
210 | CLANG_CXX_LIBRARY = "libc++";
211 | CLANG_ENABLE_MODULES = YES;
212 | CLANG_ENABLE_OBJC_ARC = YES;
213 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
214 | CLANG_WARN_BOOL_CONVERSION = YES;
215 | CLANG_WARN_COMMA = YES;
216 | CLANG_WARN_CONSTANT_CONVERSION = YES;
217 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
218 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
219 | CLANG_WARN_EMPTY_BODY = YES;
220 | CLANG_WARN_ENUM_CONVERSION = YES;
221 | CLANG_WARN_INFINITE_RECURSION = YES;
222 | CLANG_WARN_INT_CONVERSION = YES;
223 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
224 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
225 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
226 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
227 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
228 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
229 | CLANG_WARN_STRICT_PROTOTYPES = YES;
230 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
231 | CLANG_WARN_UNREACHABLE_CODE = YES;
232 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
233 | COPY_PHASE_STRIP = YES;
234 | DEAD_CODE_STRIPPING = YES;
235 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
236 | ENABLE_NS_ASSERTIONS = NO;
237 | ENABLE_STRICT_OBJC_MSGSEND = YES;
238 | ENABLE_USER_SCRIPT_SANDBOXING = YES;
239 | GCC_C_LANGUAGE_STANDARD = gnu99;
240 | GCC_NO_COMMON_BLOCKS = YES;
241 | GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
242 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
243 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
244 | GCC_WARN_UNDECLARED_SELECTOR = YES;
245 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
246 | GCC_WARN_UNUSED_FUNCTION = YES;
247 | GCC_WARN_UNUSED_VARIABLE = YES;
248 | MACOSX_DEPLOYMENT_TARGET = 10.10;
249 | MTL_ENABLE_DEBUG_INFO = NO;
250 | OTHER_LDFLAGS = "-ObjC";
251 | SDKROOT = macosx;
252 | };
253 | name = Release;
254 | };
255 | 5BDA3FD71A023EEB00B3F9E0 /* Debug */ = {
256 | isa = XCBuildConfiguration;
257 | buildSettings = {
258 | CODE_SIGN_IDENTITY = "-";
259 | DEAD_CODE_STRIPPING = YES;
260 | GCC_PREPROCESSOR_DEFINITIONS = (
261 | "DEBUG=1",
262 | "$(inherited)",
263 | );
264 | GCC_WARN_UNUSED_VARIABLE = NO;
265 | MACOSX_DEPLOYMENT_TARGET = 11.0;
266 | PRODUCT_NAME = "$(TARGET_NAME)";
267 | };
268 | name = Debug;
269 | };
270 | 5BDA3FD81A023EEB00B3F9E0 /* Release */ = {
271 | isa = XCBuildConfiguration;
272 | buildSettings = {
273 | CODE_SIGN_IDENTITY = "-";
274 | DEAD_CODE_STRIPPING = YES;
275 | GCC_WARN_UNUSED_VARIABLE = NO;
276 | MACOSX_DEPLOYMENT_TARGET = 11.0;
277 | PRODUCT_NAME = "$(TARGET_NAME)";
278 | };
279 | name = Release;
280 | };
281 | /* End XCBuildConfiguration section */
282 |
283 | /* Begin XCConfigurationList section */
284 | 5BDA3FA51A0235F600B3F9E0 /* Build configuration list for PBXProject "Typed" */ = {
285 | isa = XCConfigurationList;
286 | buildConfigurations = (
287 | 5BDA3FBC1A0235F700B3F9E0 /* Debug */,
288 | 5BDA3FBD1A0235F700B3F9E0 /* Release */,
289 | );
290 | defaultConfigurationIsVisible = 0;
291 | defaultConfigurationName = Release;
292 | };
293 | 5BDA3FD61A023EEB00B3F9E0 /* Build configuration list for PBXNativeTarget "Test" */ = {
294 | isa = XCConfigurationList;
295 | buildConfigurations = (
296 | 5BDA3FD71A023EEB00B3F9E0 /* Debug */,
297 | 5BDA3FD81A023EEB00B3F9E0 /* Release */,
298 | );
299 | defaultConfigurationIsVisible = 0;
300 | defaultConfigurationName = Release;
301 | };
302 | /* End XCConfigurationList section */
303 | };
304 | rootObject = 5BDA3FA21A0235F600B3F9E0 /* Project object */;
305 | }
306 |
--------------------------------------------------------------------------------