├── calculator.png
├── Calculator
├── Assets.xcassets
│ ├── Contents.json
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
├── CalculatorApp.swift
├── Info.plist
└── ContentView.swift
├── README.md
└── Calculator.xcodeproj
├── project.xcworkspace
├── contents.xcworkspacedata
└── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── xcuserdata
└── afrazsiddiqui.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
└── project.pbxproj
/calculator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AfrazCodes/SwiftUI-Calculator/HEAD/calculator.png
--------------------------------------------------------------------------------
/Calculator/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Calculator/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SwiftUI Calculator
2 |
3 | Basic calculator written in SwiftUI.
4 |
5 | 
6 |
--------------------------------------------------------------------------------
/Calculator.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Calculator/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Calculator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Calculator/CalculatorApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CalculatorApp.swift
3 | // Calculator
4 | //
5 | // Created by Afraz Siddiqui on 3/5/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | @main
11 | struct CalculatorApp: App {
12 | var body: some Scene {
13 | WindowGroup {
14 | ContentView()
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Calculator.xcodeproj/xcuserdata/afrazsiddiqui.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Calculator.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Calculator/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UIApplicationSceneManifest
24 |
25 | UIApplicationSupportsMultipleScenes
26 |
27 |
28 | UIApplicationSupportsIndirectInputEvents
29 |
30 | UILaunchScreen
31 |
32 | UIRequiredDeviceCapabilities
33 |
34 | armv7
35 |
36 | UISupportedInterfaceOrientations
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationPortraitUpsideDown
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/Calculator/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "1x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "76x76"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "scale" : "2x",
86 | "size" : "83.5x83.5"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "scale" : "1x",
91 | "size" : "1024x1024"
92 | }
93 | ],
94 | "info" : {
95 | "author" : "xcode",
96 | "version" : 1
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/Calculator/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // Calculator
4 | //
5 | // Created by Afraz Siddiqui on 3/5/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | enum CalcButton: String {
11 | case one = "1"
12 | case two = "2"
13 | case three = "3"
14 | case four = "4"
15 | case five = "5"
16 | case six = "6"
17 | case seven = "7"
18 | case eight = "8"
19 | case nine = "9"
20 | case zero = "0"
21 | case add = "+"
22 | case subtract = "-"
23 | case divide = "÷"
24 | case mutliply = "x"
25 | case equal = "="
26 | case clear = "AC"
27 | case decimal = "."
28 | case percent = "%"
29 | case negative = "-/+"
30 |
31 | var buttonColor: Color {
32 | switch self {
33 | case .add, .subtract, .mutliply, .divide, .equal:
34 | return .orange
35 | case .clear, .negative, .percent:
36 | return Color(.lightGray)
37 | default:
38 | return Color(UIColor(red: 55/255.0, green: 55/255.0, blue: 55/255.0, alpha: 1))
39 | }
40 | }
41 | }
42 |
43 | enum Operation {
44 | case add, subtract, multiply, divide, none
45 | }
46 |
47 | struct ContentView: View {
48 |
49 | @State var value = "0"
50 | @State var runningNumber = 0
51 | @State var currentOperation: Operation = .none
52 |
53 | let buttons: [[CalcButton]] = [
54 | [.clear, .negative, .percent, .divide],
55 | [.seven, .eight, .nine, .mutliply],
56 | [.four, .five, .six, .subtract],
57 | [.one, .two, .three, .add],
58 | [.zero, .decimal, .equal],
59 | ]
60 |
61 | var body: some View {
62 | ZStack {
63 | Color.black.edgesIgnoringSafeArea(.all)
64 |
65 | VStack {
66 | Spacer()
67 |
68 | // Text display
69 | HStack {
70 | Spacer()
71 | Text(value)
72 | .bold()
73 | .font(.system(size: 100))
74 | .foregroundColor(.white)
75 | }
76 | .padding()
77 |
78 | // Our buttons
79 | ForEach(buttons, id: \.self) { row in
80 | HStack(spacing: 12) {
81 | ForEach(row, id: \.self) { item in
82 | Button(action: {
83 | self.didTap(button: item)
84 | }, label: {
85 | Text(item.rawValue)
86 | .font(.system(size: 32))
87 | .frame(
88 | width: self.buttonWidth(item: item),
89 | height: self.buttonHeight()
90 | )
91 | .background(item.buttonColor)
92 | .foregroundColor(.white)
93 | .cornerRadius(self.buttonWidth(item: item)/2)
94 | })
95 | }
96 | }
97 | .padding(.bottom, 3)
98 | }
99 | }
100 | }
101 | }
102 |
103 | func didTap(button: CalcButton) {
104 | switch button {
105 | case .add, .subtract, .mutliply, .divide, .equal:
106 | if button == .add {
107 | self.currentOperation = .add
108 | self.runningNumber = Int(self.value) ?? 0
109 | }
110 | else if button == .subtract {
111 | self.currentOperation = .subtract
112 | self.runningNumber = Int(self.value) ?? 0
113 | }
114 | else if button == .mutliply {
115 | self.currentOperation = .multiply
116 | self.runningNumber = Int(self.value) ?? 0
117 | }
118 | else if button == .divide {
119 | self.currentOperation = .divide
120 | self.runningNumber = Int(self.value) ?? 0
121 | }
122 | else if button == .equal {
123 | let runningValue = self.runningNumber
124 | let currentValue = Int(self.value) ?? 0
125 | switch self.currentOperation {
126 | case .add: self.value = "\(runningValue + currentValue)"
127 | case .subtract: self.value = "\(runningValue - currentValue)"
128 | case .multiply: self.value = "\(runningValue * currentValue)"
129 | case .divide: self.value = "\(runningValue / currentValue)"
130 | case .none:
131 | break
132 | }
133 | }
134 |
135 | if button != .equal {
136 | self.value = "0"
137 | }
138 | case .clear:
139 | self.value = "0"
140 | case .decimal, .negative, .percent:
141 | break
142 | default:
143 | let number = button.rawValue
144 | if self.value == "0" {
145 | value = number
146 | }
147 | else {
148 | self.value = "\(self.value)\(number)"
149 | }
150 | }
151 | }
152 |
153 | func buttonWidth(item: CalcButton) -> CGFloat {
154 | if item == .zero {
155 | return ((UIScreen.main.bounds.width - (4*12)) / 4) * 2
156 | }
157 | return (UIScreen.main.bounds.width - (5*12)) / 4
158 | }
159 |
160 | func buttonHeight() -> CGFloat {
161 | return (UIScreen.main.bounds.width - (5*12)) / 4
162 | }
163 | }
164 |
165 | struct ContentView_Previews: PreviewProvider {
166 | static var previews: some View {
167 | ContentView()
168 | }
169 | }
170 |
--------------------------------------------------------------------------------
/Calculator.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 83EE677A25F2771500FEBACA /* CalculatorApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83EE677925F2771500FEBACA /* CalculatorApp.swift */; };
11 | 83EE677C25F2771500FEBACA /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83EE677B25F2771500FEBACA /* ContentView.swift */; };
12 | 83EE677E25F2771700FEBACA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 83EE677D25F2771700FEBACA /* Assets.xcassets */; };
13 | 83EE678125F2771700FEBACA /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 83EE678025F2771700FEBACA /* Preview Assets.xcassets */; };
14 | /* End PBXBuildFile section */
15 |
16 | /* Begin PBXFileReference section */
17 | 83EE677625F2771500FEBACA /* Calculator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Calculator.app; sourceTree = BUILT_PRODUCTS_DIR; };
18 | 83EE677925F2771500FEBACA /* CalculatorApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalculatorApp.swift; sourceTree = ""; };
19 | 83EE677B25F2771500FEBACA /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
20 | 83EE677D25F2771700FEBACA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
21 | 83EE678025F2771700FEBACA /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
22 | 83EE678225F2771700FEBACA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
23 | /* End PBXFileReference section */
24 |
25 | /* Begin PBXFrameworksBuildPhase section */
26 | 83EE677325F2771500FEBACA /* Frameworks */ = {
27 | isa = PBXFrameworksBuildPhase;
28 | buildActionMask = 2147483647;
29 | files = (
30 | );
31 | runOnlyForDeploymentPostprocessing = 0;
32 | };
33 | /* End PBXFrameworksBuildPhase section */
34 |
35 | /* Begin PBXGroup section */
36 | 83EE676D25F2771500FEBACA = {
37 | isa = PBXGroup;
38 | children = (
39 | 83EE677825F2771500FEBACA /* Calculator */,
40 | 83EE677725F2771500FEBACA /* Products */,
41 | );
42 | sourceTree = "";
43 | };
44 | 83EE677725F2771500FEBACA /* Products */ = {
45 | isa = PBXGroup;
46 | children = (
47 | 83EE677625F2771500FEBACA /* Calculator.app */,
48 | );
49 | name = Products;
50 | sourceTree = "";
51 | };
52 | 83EE677825F2771500FEBACA /* Calculator */ = {
53 | isa = PBXGroup;
54 | children = (
55 | 83EE677925F2771500FEBACA /* CalculatorApp.swift */,
56 | 83EE677B25F2771500FEBACA /* ContentView.swift */,
57 | 83EE677D25F2771700FEBACA /* Assets.xcassets */,
58 | 83EE678225F2771700FEBACA /* Info.plist */,
59 | 83EE677F25F2771700FEBACA /* Preview Content */,
60 | );
61 | path = Calculator;
62 | sourceTree = "";
63 | };
64 | 83EE677F25F2771700FEBACA /* Preview Content */ = {
65 | isa = PBXGroup;
66 | children = (
67 | 83EE678025F2771700FEBACA /* Preview Assets.xcassets */,
68 | );
69 | path = "Preview Content";
70 | sourceTree = "";
71 | };
72 | /* End PBXGroup section */
73 |
74 | /* Begin PBXNativeTarget section */
75 | 83EE677525F2771500FEBACA /* Calculator */ = {
76 | isa = PBXNativeTarget;
77 | buildConfigurationList = 83EE678525F2771700FEBACA /* Build configuration list for PBXNativeTarget "Calculator" */;
78 | buildPhases = (
79 | 83EE677225F2771500FEBACA /* Sources */,
80 | 83EE677325F2771500FEBACA /* Frameworks */,
81 | 83EE677425F2771500FEBACA /* Resources */,
82 | );
83 | buildRules = (
84 | );
85 | dependencies = (
86 | );
87 | name = Calculator;
88 | productName = Calculator;
89 | productReference = 83EE677625F2771500FEBACA /* Calculator.app */;
90 | productType = "com.apple.product-type.application";
91 | };
92 | /* End PBXNativeTarget section */
93 |
94 | /* Begin PBXProject section */
95 | 83EE676E25F2771500FEBACA /* Project object */ = {
96 | isa = PBXProject;
97 | attributes = {
98 | LastSwiftUpdateCheck = 1240;
99 | LastUpgradeCheck = 1240;
100 | TargetAttributes = {
101 | 83EE677525F2771500FEBACA = {
102 | CreatedOnToolsVersion = 12.4;
103 | };
104 | };
105 | };
106 | buildConfigurationList = 83EE677125F2771500FEBACA /* Build configuration list for PBXProject "Calculator" */;
107 | compatibilityVersion = "Xcode 9.3";
108 | developmentRegion = en;
109 | hasScannedForEncodings = 0;
110 | knownRegions = (
111 | en,
112 | Base,
113 | );
114 | mainGroup = 83EE676D25F2771500FEBACA;
115 | productRefGroup = 83EE677725F2771500FEBACA /* Products */;
116 | projectDirPath = "";
117 | projectRoot = "";
118 | targets = (
119 | 83EE677525F2771500FEBACA /* Calculator */,
120 | );
121 | };
122 | /* End PBXProject section */
123 |
124 | /* Begin PBXResourcesBuildPhase section */
125 | 83EE677425F2771500FEBACA /* Resources */ = {
126 | isa = PBXResourcesBuildPhase;
127 | buildActionMask = 2147483647;
128 | files = (
129 | 83EE678125F2771700FEBACA /* Preview Assets.xcassets in Resources */,
130 | 83EE677E25F2771700FEBACA /* Assets.xcassets in Resources */,
131 | );
132 | runOnlyForDeploymentPostprocessing = 0;
133 | };
134 | /* End PBXResourcesBuildPhase section */
135 |
136 | /* Begin PBXSourcesBuildPhase section */
137 | 83EE677225F2771500FEBACA /* Sources */ = {
138 | isa = PBXSourcesBuildPhase;
139 | buildActionMask = 2147483647;
140 | files = (
141 | 83EE677C25F2771500FEBACA /* ContentView.swift in Sources */,
142 | 83EE677A25F2771500FEBACA /* CalculatorApp.swift in Sources */,
143 | );
144 | runOnlyForDeploymentPostprocessing = 0;
145 | };
146 | /* End PBXSourcesBuildPhase section */
147 |
148 | /* Begin XCBuildConfiguration section */
149 | 83EE678325F2771700FEBACA /* Debug */ = {
150 | isa = XCBuildConfiguration;
151 | buildSettings = {
152 | ALWAYS_SEARCH_USER_PATHS = NO;
153 | CLANG_ANALYZER_NONNULL = YES;
154 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
155 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
156 | CLANG_CXX_LIBRARY = "libc++";
157 | CLANG_ENABLE_MODULES = YES;
158 | CLANG_ENABLE_OBJC_ARC = YES;
159 | CLANG_ENABLE_OBJC_WEAK = YES;
160 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
161 | CLANG_WARN_BOOL_CONVERSION = YES;
162 | CLANG_WARN_COMMA = YES;
163 | CLANG_WARN_CONSTANT_CONVERSION = YES;
164 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
165 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
166 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
167 | CLANG_WARN_EMPTY_BODY = YES;
168 | CLANG_WARN_ENUM_CONVERSION = YES;
169 | CLANG_WARN_INFINITE_RECURSION = YES;
170 | CLANG_WARN_INT_CONVERSION = YES;
171 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
172 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
173 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
174 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
175 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
176 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
177 | CLANG_WARN_STRICT_PROTOTYPES = YES;
178 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
179 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
180 | CLANG_WARN_UNREACHABLE_CODE = YES;
181 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
182 | COPY_PHASE_STRIP = NO;
183 | DEBUG_INFORMATION_FORMAT = dwarf;
184 | ENABLE_STRICT_OBJC_MSGSEND = YES;
185 | ENABLE_TESTABILITY = YES;
186 | GCC_C_LANGUAGE_STANDARD = gnu11;
187 | GCC_DYNAMIC_NO_PIC = NO;
188 | GCC_NO_COMMON_BLOCKS = YES;
189 | GCC_OPTIMIZATION_LEVEL = 0;
190 | GCC_PREPROCESSOR_DEFINITIONS = (
191 | "DEBUG=1",
192 | "$(inherited)",
193 | );
194 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
195 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
196 | GCC_WARN_UNDECLARED_SELECTOR = YES;
197 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
198 | GCC_WARN_UNUSED_FUNCTION = YES;
199 | GCC_WARN_UNUSED_VARIABLE = YES;
200 | IPHONEOS_DEPLOYMENT_TARGET = 14.4;
201 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
202 | MTL_FAST_MATH = YES;
203 | ONLY_ACTIVE_ARCH = YES;
204 | SDKROOT = iphoneos;
205 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
206 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
207 | };
208 | name = Debug;
209 | };
210 | 83EE678425F2771700FEBACA /* Release */ = {
211 | isa = XCBuildConfiguration;
212 | buildSettings = {
213 | ALWAYS_SEARCH_USER_PATHS = NO;
214 | CLANG_ANALYZER_NONNULL = YES;
215 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
216 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
217 | CLANG_CXX_LIBRARY = "libc++";
218 | CLANG_ENABLE_MODULES = YES;
219 | CLANG_ENABLE_OBJC_ARC = YES;
220 | CLANG_ENABLE_OBJC_WEAK = YES;
221 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
222 | CLANG_WARN_BOOL_CONVERSION = YES;
223 | CLANG_WARN_COMMA = YES;
224 | CLANG_WARN_CONSTANT_CONVERSION = YES;
225 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
226 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
227 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
228 | CLANG_WARN_EMPTY_BODY = YES;
229 | CLANG_WARN_ENUM_CONVERSION = YES;
230 | CLANG_WARN_INFINITE_RECURSION = YES;
231 | CLANG_WARN_INT_CONVERSION = YES;
232 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
233 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
234 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
235 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
236 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
237 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
238 | CLANG_WARN_STRICT_PROTOTYPES = YES;
239 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
240 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
241 | CLANG_WARN_UNREACHABLE_CODE = YES;
242 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
243 | COPY_PHASE_STRIP = NO;
244 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
245 | ENABLE_NS_ASSERTIONS = NO;
246 | ENABLE_STRICT_OBJC_MSGSEND = YES;
247 | GCC_C_LANGUAGE_STANDARD = gnu11;
248 | GCC_NO_COMMON_BLOCKS = YES;
249 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
250 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
251 | GCC_WARN_UNDECLARED_SELECTOR = YES;
252 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
253 | GCC_WARN_UNUSED_FUNCTION = YES;
254 | GCC_WARN_UNUSED_VARIABLE = YES;
255 | IPHONEOS_DEPLOYMENT_TARGET = 14.4;
256 | MTL_ENABLE_DEBUG_INFO = NO;
257 | MTL_FAST_MATH = YES;
258 | SDKROOT = iphoneos;
259 | SWIFT_COMPILATION_MODE = wholemodule;
260 | SWIFT_OPTIMIZATION_LEVEL = "-O";
261 | VALIDATE_PRODUCT = YES;
262 | };
263 | name = Release;
264 | };
265 | 83EE678625F2771700FEBACA /* Debug */ = {
266 | isa = XCBuildConfiguration;
267 | buildSettings = {
268 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
269 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
270 | CODE_SIGN_STYLE = Automatic;
271 | DEVELOPMENT_ASSET_PATHS = "\"Calculator/Preview Content\"";
272 | DEVELOPMENT_TEAM = 3798Z36XLV;
273 | ENABLE_PREVIEWS = YES;
274 | INFOPLIST_FILE = Calculator/Info.plist;
275 | IPHONEOS_DEPLOYMENT_TARGET = 14.0;
276 | LD_RUNPATH_SEARCH_PATHS = (
277 | "$(inherited)",
278 | "@executable_path/Frameworks",
279 | );
280 | PRODUCT_BUNDLE_IDENTIFIER = io.iosacademy.Calculator;
281 | PRODUCT_NAME = "$(TARGET_NAME)";
282 | SWIFT_VERSION = 5.0;
283 | TARGETED_DEVICE_FAMILY = "1,2";
284 | };
285 | name = Debug;
286 | };
287 | 83EE678725F2771700FEBACA /* Release */ = {
288 | isa = XCBuildConfiguration;
289 | buildSettings = {
290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
291 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
292 | CODE_SIGN_STYLE = Automatic;
293 | DEVELOPMENT_ASSET_PATHS = "\"Calculator/Preview Content\"";
294 | DEVELOPMENT_TEAM = 3798Z36XLV;
295 | ENABLE_PREVIEWS = YES;
296 | INFOPLIST_FILE = Calculator/Info.plist;
297 | IPHONEOS_DEPLOYMENT_TARGET = 14.0;
298 | LD_RUNPATH_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "@executable_path/Frameworks",
301 | );
302 | PRODUCT_BUNDLE_IDENTIFIER = io.iosacademy.Calculator;
303 | PRODUCT_NAME = "$(TARGET_NAME)";
304 | SWIFT_VERSION = 5.0;
305 | TARGETED_DEVICE_FAMILY = "1,2";
306 | };
307 | name = Release;
308 | };
309 | /* End XCBuildConfiguration section */
310 |
311 | /* Begin XCConfigurationList section */
312 | 83EE677125F2771500FEBACA /* Build configuration list for PBXProject "Calculator" */ = {
313 | isa = XCConfigurationList;
314 | buildConfigurations = (
315 | 83EE678325F2771700FEBACA /* Debug */,
316 | 83EE678425F2771700FEBACA /* Release */,
317 | );
318 | defaultConfigurationIsVisible = 0;
319 | defaultConfigurationName = Release;
320 | };
321 | 83EE678525F2771700FEBACA /* Build configuration list for PBXNativeTarget "Calculator" */ = {
322 | isa = XCConfigurationList;
323 | buildConfigurations = (
324 | 83EE678625F2771700FEBACA /* Debug */,
325 | 83EE678725F2771700FEBACA /* Release */,
326 | );
327 | defaultConfigurationIsVisible = 0;
328 | defaultConfigurationName = Release;
329 | };
330 | /* End XCConfigurationList section */
331 | };
332 | rootObject = 83EE676E25F2771500FEBACA /* Project object */;
333 | }
334 |
--------------------------------------------------------------------------------