├── README.md
├── CoreApi
├── README.md
├── .gitignore
├── .swiftpm
│ └── xcode
│ │ ├── package.xcworkspace
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ └── xcschemes
│ │ └── CoreApi.xcscheme
├── Tests
│ └── CoreApiTests
│ │ └── CoreApiTests.swift
├── Package.resolved
├── Sources
│ └── CoreApi
│ │ ├── HttpMethod.swift
│ │ ├── Endpoint.swift
│ │ ├── ApiClientError.swift
│ │ └── NetworkManager.swift
└── Package.swift
├── MealApp
├── MealApp
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── HomeEndpointItem.swift
│ ├── ViewController.swift
│ ├── AppDelegate.swift
│ ├── Widget.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ ├── Info.plist
│ └── SceneDelegate.swift
├── MealApp.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── MealApp.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── project.pbxproj
├── MealApp.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── swiftpm
│ │ └── Package.resolved
├── MealAppTests
│ ├── Info.plist
│ └── MealAppTests.swift
└── MealAppUITests
│ ├── Info.plist
│ └── MealAppUITests.swift
├── LICENSE
└── .gitignore
/README.md:
--------------------------------------------------------------------------------
1 | # mealApp
--------------------------------------------------------------------------------
/CoreApi/README.md:
--------------------------------------------------------------------------------
1 | # CoreApi
2 |
3 | A description of this package.
4 |
--------------------------------------------------------------------------------
/MealApp/MealApp/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/CoreApi/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /.build
3 | /Packages
4 | /*.xcodeproj
5 | xcuserdata/
6 | DerivedData/
7 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
8 |
--------------------------------------------------------------------------------
/MealApp/MealApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MealApp/MealApp.xcodeproj/MealApp.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MealApp/MealApp/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 |
--------------------------------------------------------------------------------
/MealApp/MealApp.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/MealApp/MealApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CoreApi/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MealApp/MealApp.xcodeproj/MealApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MealApp/MealApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CoreApi/Tests/CoreApiTests/CoreApiTests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | @testable import CoreApi
3 |
4 | final class CoreApiTests: XCTestCase {
5 | func testExample() {
6 | // This is an example of a functional test case.
7 | // Use XCTAssert and related functions to verify your tests produce the correct
8 | // results.
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/CoreApi/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "object": {
3 | "pins": [
4 | {
5 | "package": "Alamofire",
6 | "repositoryURL": "https://github.com/Alamofire/Alamofire.git",
7 | "state": {
8 | "branch": null,
9 | "revision": "f96b619bcb2383b43d898402283924b80e2c4bae",
10 | "version": "5.4.3"
11 | }
12 | }
13 | ]
14 | },
15 | "version": 1
16 | }
17 |
--------------------------------------------------------------------------------
/MealApp/MealApp.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "object": {
3 | "pins": [
4 | {
5 | "package": "Alamofire",
6 | "repositoryURL": "https://github.com/Alamofire/Alamofire.git",
7 | "state": {
8 | "branch": null,
9 | "revision": "f96b619bcb2383b43d898402283924b80e2c4bae",
10 | "version": "5.4.3"
11 | }
12 | }
13 | ]
14 | },
15 | "version": 1
16 | }
17 |
--------------------------------------------------------------------------------
/CoreApi/Sources/CoreApi/HttpMethod.swift:
--------------------------------------------------------------------------------
1 | //
2 | // File.swift
3 | //
4 | //
5 | // Created by Anıl Taşkıran on 22.05.2021.
6 | //
7 |
8 | import Alamofire
9 |
10 | public typealias HTTPMethod = Alamofire.HTTPMethod
11 |
12 | public extension Endpoint {
13 | var encoding: ParameterEncoding {
14 | switch method {
15 | case .get: return URLEncoding.default
16 | default: return JSONEncoding.default
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CoreApi/Sources/CoreApi/Endpoint.swift:
--------------------------------------------------------------------------------
1 | //
2 | // File.swift
3 | //
4 | //
5 | // Created by Anıl Taşkıran on 22.05.2021.
6 | //
7 |
8 | public protocol Endpoint {
9 | var baseUrl: String { get }
10 | var path: String { get }
11 | var method: HTTPMethod { get }
12 | var parameters: [String: Any] { get }
13 | var headers: [String: String] { get}
14 | }
15 |
16 | public extension Endpoint {
17 | var headers: [String: String] { [:] }
18 | var parameters: [String: Any] { [:] }
19 | var url: String { "\(baseUrl)\(path)"}
20 | }
21 |
--------------------------------------------------------------------------------
/MealApp/MealApp/HomeEndpointItem.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HomeEndpointItem.swift
3 | // MealApp
4 | //
5 | // Created by Anıl Taşkıran on 22.05.2021.
6 | //
7 |
8 | import Foundation
9 | import CoreApi
10 |
11 | enum HomeEndpointItem: Endpoint {
12 | case homepage(query: String)
13 |
14 | var baseUrl: String { "https://us-central1-infumar.cloudfunctions.net/" }
15 | var path: String {
16 | switch self {
17 | case .homepage(let query): return "homepage?\(query)"
18 | }
19 | }
20 |
21 | var method: HTTPMethod {
22 | switch self {
23 | case .homepage: return .get
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MealApp/MealApp/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // MealApp
4 | //
5 | // Created by Anıl Taşkıran on 22.05.2021.
6 | //
7 |
8 | import UIKit
9 | import CoreApi
10 |
11 | class ViewController: UIViewController {
12 | let networkManager: NetworkManager = NetworkManager()
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 | networkManager.request(endpoint: .homepage(query: "page=1"), type: HomeResponse.self) { result in
17 | switch result {
18 | case .success(let response):
19 | print(response)
20 | break
21 | case .failure(let error):
22 | print(error)
23 | break
24 | }
25 | }
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/MealApp/MealAppTests/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 |
22 |
23 |
--------------------------------------------------------------------------------
/MealApp/MealAppUITests/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 |
22 |
23 |
--------------------------------------------------------------------------------
/MealApp/MealAppTests/MealAppTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MealAppTests.swift
3 | // MealAppTests
4 | //
5 | // Created by Anıl Taşkıran on 22.05.2021.
6 | //
7 |
8 | import XCTest
9 | @testable import MealApp
10 |
11 | class MealAppTests: XCTestCase {
12 |
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() throws {
27 | // This is an example of a performance test case.
28 | self.measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/CoreApi/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.3
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "CoreApi",
8 | platforms: [.iOS(.v11)],
9 | products: [
10 | // Products define the executables and libraries a package produces, and make them visible to other packages.
11 | .library(
12 | name: "CoreApi",
13 | targets: ["CoreApi"]),
14 | ],
15 | dependencies: [
16 | .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.2.0"))
17 | ],
18 | targets: [
19 | // Targets are the basic building blocks of a package. A target can define a module or a test suite.
20 | // Targets can depend on other targets in this package, and on products in packages this package depends on.
21 | .target(
22 | name: "CoreApi",
23 | dependencies: ["Alamofire"]),
24 | .testTarget(
25 | name: "CoreApiTests",
26 | dependencies: ["CoreApi"]),
27 | ]
28 | )
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Trendyol iOS Bootcamp
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 |
--------------------------------------------------------------------------------
/MealApp/MealApp/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // MealApp
4 | //
5 | // Created by Anıl Taşkıran on 22.05.2021.
6 | //
7 |
8 | import UIKit
9 |
10 | @main
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 |
14 |
15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
16 | // Override point for customization after application launch.
17 | return true
18 | }
19 |
20 | // MARK: UISceneSession Lifecycle
21 |
22 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
23 | // Called when a new scene session is being created.
24 | // Use this method to select a configuration to create the new scene with.
25 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
26 | }
27 |
28 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
29 | // Called when the user discards a scene session.
30 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
31 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
32 | }
33 |
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/MealApp/MealApp/Widget.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Widget.swift
3 | // MealApp
4 | //
5 | // Created by Anıl Taşkıran on 22.05.2021.
6 | //
7 |
8 | import Foundation
9 |
10 | // MARK: - Widget
11 | struct HomeResponse: Decodable {
12 | let widgets: [Widget]?
13 | let href: String?
14 | }
15 |
16 | // MARK: - Widget
17 | struct Widget: Decodable {
18 | let id: Int
19 | let type: WidgetType
20 | let displayType: WidgetDisplayType
21 | let restaurants: [Restaurant]?
22 | let displayCount: Int?
23 | let displayOptions: DisplayOptions?
24 | }
25 |
26 | // MARK: - DisplayOptions
27 | struct DisplayOptions: Decodable {
28 | let paddingTopBottom, paddingRightLeft: Int?
29 | }
30 |
31 | enum WidgetDisplayType: String, Decodable {
32 | case single = "SINGLE"
33 | }
34 |
35 | // MARK: - Restaurant
36 | struct Restaurant: Decodable {
37 | let id: Int?
38 | let imageUrl: String?
39 | let logoUrl: String?
40 | let deeplink, name: String?
41 | let averageDeliveryInterval: String?
42 | let minBasketPrice: Int?
43 | let kitchen: String?
44 | let rating: Double?
45 | let ratingText, campaignText: String?
46 | let ratingBackgroundColor: String?
47 | let isClosed: Bool?
48 | let deliveryTypeImage: String?
49 | let workingHours: String?
50 | let workingHoursInterval: [String]?
51 | let location: Location?
52 | let closed: Bool?
53 | }
54 |
55 | // MARK: - Location
56 | struct Location: Decodable {
57 | let neighborhoodName: String?
58 | }
59 |
60 | // MARK: - WidgetType
61 | enum WidgetType: String, Decodable {
62 | case restaurant = "RESTAURANT"
63 | }
64 |
--------------------------------------------------------------------------------
/MealApp/MealAppUITests/MealAppUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MealAppUITests.swift
3 | // MealAppUITests
4 | //
5 | // Created by Anıl Taşkıran on 22.05.2021.
6 | //
7 |
8 | import XCTest
9 |
10 | class MealAppUITests: XCTestCase {
11 |
12 | override func setUpWithError() throws {
13 | // Put setup code here. This method is called before the invocation of each test method in the class.
14 |
15 | // In UI tests it is usually best to stop immediately when a failure occurs.
16 | continueAfterFailure = false
17 |
18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
19 | }
20 |
21 | override func tearDownWithError() throws {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | func testExample() throws {
26 | // UI tests must launch the application that they test.
27 | let app = XCUIApplication()
28 | app.launch()
29 |
30 | // Use recording to get started writing UI tests.
31 | // Use XCTAssert and related functions to verify your tests produce the correct results.
32 | }
33 |
34 | func testLaunchPerformance() throws {
35 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
36 | // This measures how long it takes to launch your application.
37 | measure(metrics: [XCTApplicationLaunchMetric()]) {
38 | XCUIApplication().launch()
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/MealApp/MealApp/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 |
--------------------------------------------------------------------------------
/MealApp/MealApp/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 |
--------------------------------------------------------------------------------
/MealApp/MealApp/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 |
--------------------------------------------------------------------------------
/CoreApi/Sources/CoreApi/ApiClientError.swift:
--------------------------------------------------------------------------------
1 | //
2 | // File.swift
3 | //
4 | //
5 | // Created by Anıl Taşkıran on 22.05.2021.
6 | //
7 |
8 | import Foundation
9 |
10 | public protocol APIError: Decodable {
11 | var message: String { get }
12 | var debugMessage: String { get }
13 | var code: Int { get }
14 | var result: Bool { get }
15 | }
16 |
17 | struct ClientError: APIError {
18 | var message: String
19 | var debugMessage: String
20 | var code: Int
21 | var result: Bool
22 | }
23 |
24 | public enum APIClientError: Error {
25 | case handledError(error: APIError)
26 | case networkError
27 | case decoding(error: DecodingError?)
28 | case timeout
29 | case message(String)
30 |
31 | public var message: String {
32 | switch self {
33 | case .handledError(let error):
34 | return error.message
35 | case .decoding:
36 | return "Beklenmeyen bir hata oluştu"
37 | case .networkError:
38 | return "Beklenmeyen bir hata oluştu."
39 | case .timeout:
40 | return "İstek zaman aşımına uğradı, daha sonra tekrar deneyiniz."
41 | case .message(let message):
42 | return message
43 | }
44 | }
45 |
46 | public var title: String {
47 | switch self {
48 | case .handledError, .decoding, .networkError, .timeout, .message:
49 | return "Error"
50 | }
51 | }
52 |
53 | public var debugMessage: String {
54 | switch self {
55 | case .handledError(let error):
56 | return error.message
57 | case .decoding(let decodingError):
58 | guard let decodingError = decodingError else { return "Decoding Error" }
59 | return "\(decodingError)"
60 | case .networkError:
61 | return "Network error"
62 | case .timeout:
63 | return "Timeout"
64 | case .message(let message):
65 | return message
66 | }
67 | }
68 |
69 | public var code: Int {
70 | switch self {
71 | case .handledError(let error):
72 | return error.code
73 | default:
74 | return 500
75 | }
76 | }
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/MealApp/MealApp/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 | UISceneConfigurations
28 |
29 | UIWindowSceneSessionRoleApplication
30 |
31 |
32 | UISceneConfigurationName
33 | Default Configuration
34 | UISceneDelegateClassName
35 | $(PRODUCT_MODULE_NAME).SceneDelegate
36 | UISceneStoryboardFile
37 | Main
38 |
39 |
40 |
41 |
42 | UIApplicationSupportsIndirectInputEvents
43 |
44 | UILaunchStoryboardName
45 | LaunchScreen
46 | UIMainStoryboardFile
47 | Main
48 | UIRequiredDeviceCapabilities
49 |
50 | armv7
51 |
52 | UISupportedInterfaceOrientations
53 |
54 | UIInterfaceOrientationPortrait
55 | UIInterfaceOrientationLandscapeLeft
56 | UIInterfaceOrientationLandscapeRight
57 |
58 | UISupportedInterfaceOrientations~ipad
59 |
60 | UIInterfaceOrientationPortrait
61 | UIInterfaceOrientationPortraitUpsideDown
62 | UIInterfaceOrientationLandscapeLeft
63 | UIInterfaceOrientationLandscapeRight
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/MealApp/MealApp/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // MealApp
4 | //
5 | // Created by Anıl Taşkıran on 22.05.2021.
6 | //
7 |
8 | import UIKit
9 |
10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
11 |
12 | var window: UIWindow?
13 |
14 |
15 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
16 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
17 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
18 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
19 | guard let _ = (scene as? UIWindowScene) else { return }
20 | }
21 |
22 | func sceneDidDisconnect(_ scene: UIScene) {
23 | // Called as the scene is being released by the system.
24 | // This occurs shortly after the scene enters the background, or when its session is discarded.
25 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
26 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
27 | }
28 |
29 | func sceneDidBecomeActive(_ scene: UIScene) {
30 | // Called when the scene has moved from an inactive state to an active state.
31 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
32 | }
33 |
34 | func sceneWillResignActive(_ scene: UIScene) {
35 | // Called when the scene will move from an active state to an inactive state.
36 | // This may occur due to temporary interruptions (ex. an incoming phone call).
37 | }
38 |
39 | func sceneWillEnterForeground(_ scene: UIScene) {
40 | // Called as the scene transitions from the background to the foreground.
41 | // Use this method to undo the changes made on entering the background.
42 | }
43 |
44 | func sceneDidEnterBackground(_ scene: UIScene) {
45 | // Called as the scene transitions from the foreground to the background.
46 | // Use this method to save data, release shared resources, and store enough scene-specific state information
47 | // to restore the scene back to its current state.
48 | }
49 |
50 |
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## User settings
6 | xcuserdata/
7 |
8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
9 | *.xcscmblueprint
10 | *.xccheckout
11 |
12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
13 | build/
14 | DerivedData/
15 | *.moved-aside
16 | *.pbxuser
17 | !default.pbxuser
18 | *.mode1v3
19 | !default.mode1v3
20 | *.mode2v3
21 | !default.mode2v3
22 | *.perspectivev3
23 | !default.perspectivev3
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 |
28 | ## App packaging
29 | *.ipa
30 | *.dSYM.zip
31 | *.dSYM
32 |
33 | ## Playgrounds
34 | timeline.xctimeline
35 | playground.xcworkspace
36 |
37 | # Swift Package Manager
38 | #
39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
40 | # Packages/
41 | # Package.pins
42 | # Package.resolved
43 | # *.xcodeproj
44 | #
45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
46 | # hence it is not needed unless you have added a package configuration file to your project
47 | # .swiftpm
48 |
49 | .build/
50 |
51 | # CocoaPods
52 | #
53 | # We recommend against adding the Pods directory to your .gitignore. However
54 | # you should judge for yourself, the pros and cons are mentioned at:
55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
56 | #
57 | # Pods/
58 | #
59 | # Add this line if you want to avoid checking in source code from the Xcode workspace
60 | # *.xcworkspace
61 |
62 | # Carthage
63 | #
64 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
65 | # Carthage/Checkouts
66 |
67 | Carthage/Build/
68 |
69 | # Accio dependency management
70 | Dependencies/
71 | .accio/
72 |
73 | # fastlane
74 | #
75 | # It is recommended to not store the screenshots in the git repo.
76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed.
77 | # For more information about the recommended setup visit:
78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
79 |
80 | fastlane/report.xml
81 | fastlane/Preview.html
82 | fastlane/screenshots/**/*.png
83 | fastlane/test_output
84 |
85 | # Code Injection
86 | #
87 | # After new code Injection tools there's a generated folder /iOSInjectionProject
88 | # https://github.com/johnno1962/injectionforxcode
89 |
90 | iOSInjectionProject/
91 | .DS_Store
92 |
--------------------------------------------------------------------------------
/CoreApi/.swiftpm/xcode/xcshareddata/xcschemes/CoreApi.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
57 |
58 |
59 |
60 |
62 |
63 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/CoreApi/Sources/CoreApi/NetworkManager.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NetworkManager.swift
3 | //
4 | //
5 | // Created by Anıl Taşkıran on 22.05.2021.
6 | //
7 |
8 | import Alamofire
9 | import Foundation
10 |
11 | public typealias Completion = (Result) -> Void where T: Decodable
12 |
13 | public final class NetworkManager {
14 | public init() { }
15 |
16 | private var possibleEmptyResponseCodes: Set {
17 | var defaultSet = DataResponseSerializer.defaultEmptyResponseCodes
18 | defaultSet.insert(200)
19 | defaultSet.insert(201)
20 | return defaultSet
21 | }
22 |
23 | public func request (endpoint: EndpointItem, type: T.Type, completion: @escaping Completion) {
24 | AF.request(endpoint.url,
25 | method: endpoint.method,
26 | parameters: endpoint.parameters,
27 | encoding: endpoint.encoding,
28 | headers: HTTPHeaders(endpoint.headers))
29 | .validate()
30 | .response(responseSerializer: DataResponseSerializer(emptyResponseCodes: possibleEmptyResponseCodes), completionHandler: { response in
31 | switch response.result {
32 | case .success(let data):
33 | do {
34 | let decodedObject = try JSONDecoder().decode(type, from: data)
35 | completion(.success(decodedObject))
36 | } catch {
37 | let decodingError = APIClientError.decoding(error: error as? DecodingError)
38 | completion(.failure(decodingError))
39 | }
40 | case .failure(let error):
41 | if NSURLErrorTimedOut == (error as NSError).code {
42 | completion(.failure(.timeout))
43 | } else {
44 | guard let data = response.data else {
45 | completion(.failure(.networkError))
46 | return
47 | }
48 | do {
49 | let clientError = try JSONDecoder().decode(ClientError.self, from: data)
50 | completion(.failure(.handledError(error: clientError)))
51 | } catch {
52 | let decodingError = APIClientError.decoding(error: error as? DecodingError)
53 | completion(.failure(decodingError))
54 | }
55 | }
56 | }
57 | })
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/MealApp/MealApp.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 52;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | DC55B60A2658EC0B00C5D2FD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC55B6092658EC0B00C5D2FD /* AppDelegate.swift */; };
11 | DC55B60C2658EC0B00C5D2FD /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC55B60B2658EC0B00C5D2FD /* SceneDelegate.swift */; };
12 | DC55B60E2658EC0B00C5D2FD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC55B60D2658EC0B00C5D2FD /* ViewController.swift */; };
13 | DC55B6112658EC0B00C5D2FD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC55B60F2658EC0B00C5D2FD /* Main.storyboard */; };
14 | DC55B6132658EC0D00C5D2FD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DC55B6122658EC0D00C5D2FD /* Assets.xcassets */; };
15 | DC55B6162658EC0D00C5D2FD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC55B6142658EC0D00C5D2FD /* LaunchScreen.storyboard */; };
16 | DC55B6212658EC0D00C5D2FD /* MealAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC55B6202658EC0D00C5D2FD /* MealAppTests.swift */; };
17 | DC55B62C2658EC0D00C5D2FD /* MealAppUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC55B62B2658EC0D00C5D2FD /* MealAppUITests.swift */; };
18 | DC55B63B2658ED9700C5D2FD /* CoreApi in Frameworks */ = {isa = PBXBuildFile; productRef = DC55B63A2658ED9700C5D2FD /* CoreApi */; };
19 | DC55B63D2658F21100C5D2FD /* HomeEndpointItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC55B63C2658F21100C5D2FD /* HomeEndpointItem.swift */; };
20 | DC55B63F2658F5A800C5D2FD /* Widget.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC55B63E2658F5A800C5D2FD /* Widget.swift */; };
21 | /* End PBXBuildFile section */
22 |
23 | /* Begin PBXContainerItemProxy section */
24 | DC55B61D2658EC0D00C5D2FD /* PBXContainerItemProxy */ = {
25 | isa = PBXContainerItemProxy;
26 | containerPortal = DC55B5FE2658EC0B00C5D2FD /* Project object */;
27 | proxyType = 1;
28 | remoteGlobalIDString = DC55B6052658EC0B00C5D2FD;
29 | remoteInfo = MealApp;
30 | };
31 | DC55B6282658EC0D00C5D2FD /* PBXContainerItemProxy */ = {
32 | isa = PBXContainerItemProxy;
33 | containerPortal = DC55B5FE2658EC0B00C5D2FD /* Project object */;
34 | proxyType = 1;
35 | remoteGlobalIDString = DC55B6052658EC0B00C5D2FD;
36 | remoteInfo = MealApp;
37 | };
38 | /* End PBXContainerItemProxy section */
39 |
40 | /* Begin PBXFileReference section */
41 | DC55B6062658EC0B00C5D2FD /* MealApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MealApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
42 | DC55B6092658EC0B00C5D2FD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
43 | DC55B60B2658EC0B00C5D2FD /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; };
44 | DC55B60D2658EC0B00C5D2FD /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
45 | DC55B6102658EC0B00C5D2FD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
46 | DC55B6122658EC0D00C5D2FD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
47 | DC55B6152658EC0D00C5D2FD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
48 | DC55B6172658EC0D00C5D2FD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
49 | DC55B61C2658EC0D00C5D2FD /* MealAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MealAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
50 | DC55B6202658EC0D00C5D2FD /* MealAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MealAppTests.swift; sourceTree = ""; };
51 | DC55B6222658EC0D00C5D2FD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
52 | DC55B6272658EC0D00C5D2FD /* MealAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MealAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
53 | DC55B62B2658EC0D00C5D2FD /* MealAppUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MealAppUITests.swift; sourceTree = ""; };
54 | DC55B62D2658EC0D00C5D2FD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
55 | DC55B63C2658F21100C5D2FD /* HomeEndpointItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeEndpointItem.swift; sourceTree = ""; };
56 | DC55B63E2658F5A800C5D2FD /* Widget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Widget.swift; sourceTree = ""; };
57 | /* End PBXFileReference section */
58 |
59 | /* Begin PBXFrameworksBuildPhase section */
60 | DC55B6032658EC0B00C5D2FD /* Frameworks */ = {
61 | isa = PBXFrameworksBuildPhase;
62 | buildActionMask = 2147483647;
63 | files = (
64 | DC55B63B2658ED9700C5D2FD /* CoreApi in Frameworks */,
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | DC55B6192658EC0D00C5D2FD /* Frameworks */ = {
69 | isa = PBXFrameworksBuildPhase;
70 | buildActionMask = 2147483647;
71 | files = (
72 | );
73 | runOnlyForDeploymentPostprocessing = 0;
74 | };
75 | DC55B6242658EC0D00C5D2FD /* Frameworks */ = {
76 | isa = PBXFrameworksBuildPhase;
77 | buildActionMask = 2147483647;
78 | files = (
79 | );
80 | runOnlyForDeploymentPostprocessing = 0;
81 | };
82 | /* End PBXFrameworksBuildPhase section */
83 |
84 | /* Begin PBXGroup section */
85 | DC55B5FD2658EC0B00C5D2FD = {
86 | isa = PBXGroup;
87 | children = (
88 | DC55B6082658EC0B00C5D2FD /* MealApp */,
89 | DC55B61F2658EC0D00C5D2FD /* MealAppTests */,
90 | DC55B62A2658EC0D00C5D2FD /* MealAppUITests */,
91 | DC55B6072658EC0B00C5D2FD /* Products */,
92 | DC55B6392658ED9700C5D2FD /* Frameworks */,
93 | );
94 | sourceTree = "";
95 | };
96 | DC55B6072658EC0B00C5D2FD /* Products */ = {
97 | isa = PBXGroup;
98 | children = (
99 | DC55B6062658EC0B00C5D2FD /* MealApp.app */,
100 | DC55B61C2658EC0D00C5D2FD /* MealAppTests.xctest */,
101 | DC55B6272658EC0D00C5D2FD /* MealAppUITests.xctest */,
102 | );
103 | name = Products;
104 | sourceTree = "";
105 | };
106 | DC55B6082658EC0B00C5D2FD /* MealApp */ = {
107 | isa = PBXGroup;
108 | children = (
109 | DC55B6092658EC0B00C5D2FD /* AppDelegate.swift */,
110 | DC55B60B2658EC0B00C5D2FD /* SceneDelegate.swift */,
111 | DC55B60D2658EC0B00C5D2FD /* ViewController.swift */,
112 | DC55B63C2658F21100C5D2FD /* HomeEndpointItem.swift */,
113 | DC55B60F2658EC0B00C5D2FD /* Main.storyboard */,
114 | DC55B6122658EC0D00C5D2FD /* Assets.xcassets */,
115 | DC55B6142658EC0D00C5D2FD /* LaunchScreen.storyboard */,
116 | DC55B6172658EC0D00C5D2FD /* Info.plist */,
117 | DC55B63E2658F5A800C5D2FD /* Widget.swift */,
118 | );
119 | path = MealApp;
120 | sourceTree = "";
121 | };
122 | DC55B61F2658EC0D00C5D2FD /* MealAppTests */ = {
123 | isa = PBXGroup;
124 | children = (
125 | DC55B6202658EC0D00C5D2FD /* MealAppTests.swift */,
126 | DC55B6222658EC0D00C5D2FD /* Info.plist */,
127 | );
128 | path = MealAppTests;
129 | sourceTree = "";
130 | };
131 | DC55B62A2658EC0D00C5D2FD /* MealAppUITests */ = {
132 | isa = PBXGroup;
133 | children = (
134 | DC55B62B2658EC0D00C5D2FD /* MealAppUITests.swift */,
135 | DC55B62D2658EC0D00C5D2FD /* Info.plist */,
136 | );
137 | path = MealAppUITests;
138 | sourceTree = "";
139 | };
140 | DC55B6392658ED9700C5D2FD /* Frameworks */ = {
141 | isa = PBXGroup;
142 | children = (
143 | );
144 | name = Frameworks;
145 | sourceTree = "";
146 | };
147 | /* End PBXGroup section */
148 |
149 | /* Begin PBXNativeTarget section */
150 | DC55B6052658EC0B00C5D2FD /* MealApp */ = {
151 | isa = PBXNativeTarget;
152 | buildConfigurationList = DC55B6302658EC0D00C5D2FD /* Build configuration list for PBXNativeTarget "MealApp" */;
153 | buildPhases = (
154 | DC55B6022658EC0B00C5D2FD /* Sources */,
155 | DC55B6032658EC0B00C5D2FD /* Frameworks */,
156 | DC55B6042658EC0B00C5D2FD /* Resources */,
157 | );
158 | buildRules = (
159 | );
160 | dependencies = (
161 | );
162 | name = MealApp;
163 | packageProductDependencies = (
164 | DC55B63A2658ED9700C5D2FD /* CoreApi */,
165 | );
166 | productName = MealApp;
167 | productReference = DC55B6062658EC0B00C5D2FD /* MealApp.app */;
168 | productType = "com.apple.product-type.application";
169 | };
170 | DC55B61B2658EC0D00C5D2FD /* MealAppTests */ = {
171 | isa = PBXNativeTarget;
172 | buildConfigurationList = DC55B6332658EC0D00C5D2FD /* Build configuration list for PBXNativeTarget "MealAppTests" */;
173 | buildPhases = (
174 | DC55B6182658EC0D00C5D2FD /* Sources */,
175 | DC55B6192658EC0D00C5D2FD /* Frameworks */,
176 | DC55B61A2658EC0D00C5D2FD /* Resources */,
177 | );
178 | buildRules = (
179 | );
180 | dependencies = (
181 | DC55B61E2658EC0D00C5D2FD /* PBXTargetDependency */,
182 | );
183 | name = MealAppTests;
184 | productName = MealAppTests;
185 | productReference = DC55B61C2658EC0D00C5D2FD /* MealAppTests.xctest */;
186 | productType = "com.apple.product-type.bundle.unit-test";
187 | };
188 | DC55B6262658EC0D00C5D2FD /* MealAppUITests */ = {
189 | isa = PBXNativeTarget;
190 | buildConfigurationList = DC55B6362658EC0D00C5D2FD /* Build configuration list for PBXNativeTarget "MealAppUITests" */;
191 | buildPhases = (
192 | DC55B6232658EC0D00C5D2FD /* Sources */,
193 | DC55B6242658EC0D00C5D2FD /* Frameworks */,
194 | DC55B6252658EC0D00C5D2FD /* Resources */,
195 | );
196 | buildRules = (
197 | );
198 | dependencies = (
199 | DC55B6292658EC0D00C5D2FD /* PBXTargetDependency */,
200 | );
201 | name = MealAppUITests;
202 | productName = MealAppUITests;
203 | productReference = DC55B6272658EC0D00C5D2FD /* MealAppUITests.xctest */;
204 | productType = "com.apple.product-type.bundle.ui-testing";
205 | };
206 | /* End PBXNativeTarget section */
207 |
208 | /* Begin PBXProject section */
209 | DC55B5FE2658EC0B00C5D2FD /* Project object */ = {
210 | isa = PBXProject;
211 | attributes = {
212 | LastSwiftUpdateCheck = 1250;
213 | LastUpgradeCheck = 1250;
214 | TargetAttributes = {
215 | DC55B6052658EC0B00C5D2FD = {
216 | CreatedOnToolsVersion = 12.5;
217 | };
218 | DC55B61B2658EC0D00C5D2FD = {
219 | CreatedOnToolsVersion = 12.5;
220 | TestTargetID = DC55B6052658EC0B00C5D2FD;
221 | };
222 | DC55B6262658EC0D00C5D2FD = {
223 | CreatedOnToolsVersion = 12.5;
224 | TestTargetID = DC55B6052658EC0B00C5D2FD;
225 | };
226 | };
227 | };
228 | buildConfigurationList = DC55B6012658EC0B00C5D2FD /* Build configuration list for PBXProject "MealApp" */;
229 | compatibilityVersion = "Xcode 9.3";
230 | developmentRegion = en;
231 | hasScannedForEncodings = 0;
232 | knownRegions = (
233 | en,
234 | Base,
235 | );
236 | mainGroup = DC55B5FD2658EC0B00C5D2FD;
237 | productRefGroup = DC55B6072658EC0B00C5D2FD /* Products */;
238 | projectDirPath = "";
239 | projectRoot = "";
240 | targets = (
241 | DC55B6052658EC0B00C5D2FD /* MealApp */,
242 | DC55B61B2658EC0D00C5D2FD /* MealAppTests */,
243 | DC55B6262658EC0D00C5D2FD /* MealAppUITests */,
244 | );
245 | };
246 | /* End PBXProject section */
247 |
248 | /* Begin PBXResourcesBuildPhase section */
249 | DC55B6042658EC0B00C5D2FD /* Resources */ = {
250 | isa = PBXResourcesBuildPhase;
251 | buildActionMask = 2147483647;
252 | files = (
253 | DC55B6162658EC0D00C5D2FD /* LaunchScreen.storyboard in Resources */,
254 | DC55B6132658EC0D00C5D2FD /* Assets.xcassets in Resources */,
255 | DC55B6112658EC0B00C5D2FD /* Main.storyboard in Resources */,
256 | );
257 | runOnlyForDeploymentPostprocessing = 0;
258 | };
259 | DC55B61A2658EC0D00C5D2FD /* Resources */ = {
260 | isa = PBXResourcesBuildPhase;
261 | buildActionMask = 2147483647;
262 | files = (
263 | );
264 | runOnlyForDeploymentPostprocessing = 0;
265 | };
266 | DC55B6252658EC0D00C5D2FD /* Resources */ = {
267 | isa = PBXResourcesBuildPhase;
268 | buildActionMask = 2147483647;
269 | files = (
270 | );
271 | runOnlyForDeploymentPostprocessing = 0;
272 | };
273 | /* End PBXResourcesBuildPhase section */
274 |
275 | /* Begin PBXSourcesBuildPhase section */
276 | DC55B6022658EC0B00C5D2FD /* Sources */ = {
277 | isa = PBXSourcesBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | DC55B60E2658EC0B00C5D2FD /* ViewController.swift in Sources */,
281 | DC55B60A2658EC0B00C5D2FD /* AppDelegate.swift in Sources */,
282 | DC55B63F2658F5A800C5D2FD /* Widget.swift in Sources */,
283 | DC55B63D2658F21100C5D2FD /* HomeEndpointItem.swift in Sources */,
284 | DC55B60C2658EC0B00C5D2FD /* SceneDelegate.swift in Sources */,
285 | );
286 | runOnlyForDeploymentPostprocessing = 0;
287 | };
288 | DC55B6182658EC0D00C5D2FD /* Sources */ = {
289 | isa = PBXSourcesBuildPhase;
290 | buildActionMask = 2147483647;
291 | files = (
292 | DC55B6212658EC0D00C5D2FD /* MealAppTests.swift in Sources */,
293 | );
294 | runOnlyForDeploymentPostprocessing = 0;
295 | };
296 | DC55B6232658EC0D00C5D2FD /* Sources */ = {
297 | isa = PBXSourcesBuildPhase;
298 | buildActionMask = 2147483647;
299 | files = (
300 | DC55B62C2658EC0D00C5D2FD /* MealAppUITests.swift in Sources */,
301 | );
302 | runOnlyForDeploymentPostprocessing = 0;
303 | };
304 | /* End PBXSourcesBuildPhase section */
305 |
306 | /* Begin PBXTargetDependency section */
307 | DC55B61E2658EC0D00C5D2FD /* PBXTargetDependency */ = {
308 | isa = PBXTargetDependency;
309 | target = DC55B6052658EC0B00C5D2FD /* MealApp */;
310 | targetProxy = DC55B61D2658EC0D00C5D2FD /* PBXContainerItemProxy */;
311 | };
312 | DC55B6292658EC0D00C5D2FD /* PBXTargetDependency */ = {
313 | isa = PBXTargetDependency;
314 | target = DC55B6052658EC0B00C5D2FD /* MealApp */;
315 | targetProxy = DC55B6282658EC0D00C5D2FD /* PBXContainerItemProxy */;
316 | };
317 | /* End PBXTargetDependency section */
318 |
319 | /* Begin PBXVariantGroup section */
320 | DC55B60F2658EC0B00C5D2FD /* Main.storyboard */ = {
321 | isa = PBXVariantGroup;
322 | children = (
323 | DC55B6102658EC0B00C5D2FD /* Base */,
324 | );
325 | name = Main.storyboard;
326 | sourceTree = "";
327 | };
328 | DC55B6142658EC0D00C5D2FD /* LaunchScreen.storyboard */ = {
329 | isa = PBXVariantGroup;
330 | children = (
331 | DC55B6152658EC0D00C5D2FD /* Base */,
332 | );
333 | name = LaunchScreen.storyboard;
334 | sourceTree = "";
335 | };
336 | /* End PBXVariantGroup section */
337 |
338 | /* Begin XCBuildConfiguration section */
339 | DC55B62E2658EC0D00C5D2FD /* Debug */ = {
340 | isa = XCBuildConfiguration;
341 | buildSettings = {
342 | ALWAYS_SEARCH_USER_PATHS = NO;
343 | CLANG_ANALYZER_NONNULL = YES;
344 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
345 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
346 | CLANG_CXX_LIBRARY = "libc++";
347 | CLANG_ENABLE_MODULES = YES;
348 | CLANG_ENABLE_OBJC_ARC = YES;
349 | CLANG_ENABLE_OBJC_WEAK = YES;
350 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
351 | CLANG_WARN_BOOL_CONVERSION = YES;
352 | CLANG_WARN_COMMA = YES;
353 | CLANG_WARN_CONSTANT_CONVERSION = YES;
354 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
355 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
356 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
357 | CLANG_WARN_EMPTY_BODY = YES;
358 | CLANG_WARN_ENUM_CONVERSION = YES;
359 | CLANG_WARN_INFINITE_RECURSION = YES;
360 | CLANG_WARN_INT_CONVERSION = YES;
361 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
362 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
363 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
365 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
366 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
367 | CLANG_WARN_STRICT_PROTOTYPES = YES;
368 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
369 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
370 | CLANG_WARN_UNREACHABLE_CODE = YES;
371 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
372 | COPY_PHASE_STRIP = NO;
373 | DEBUG_INFORMATION_FORMAT = dwarf;
374 | ENABLE_STRICT_OBJC_MSGSEND = YES;
375 | ENABLE_TESTABILITY = YES;
376 | GCC_C_LANGUAGE_STANDARD = gnu11;
377 | GCC_DYNAMIC_NO_PIC = NO;
378 | GCC_NO_COMMON_BLOCKS = YES;
379 | GCC_OPTIMIZATION_LEVEL = 0;
380 | GCC_PREPROCESSOR_DEFINITIONS = (
381 | "DEBUG=1",
382 | "$(inherited)",
383 | );
384 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
385 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
386 | GCC_WARN_UNDECLARED_SELECTOR = YES;
387 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
388 | GCC_WARN_UNUSED_FUNCTION = YES;
389 | GCC_WARN_UNUSED_VARIABLE = YES;
390 | IPHONEOS_DEPLOYMENT_TARGET = 14.5;
391 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
392 | MTL_FAST_MATH = YES;
393 | ONLY_ACTIVE_ARCH = YES;
394 | SDKROOT = iphoneos;
395 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
396 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
397 | };
398 | name = Debug;
399 | };
400 | DC55B62F2658EC0D00C5D2FD /* Release */ = {
401 | isa = XCBuildConfiguration;
402 | buildSettings = {
403 | ALWAYS_SEARCH_USER_PATHS = NO;
404 | CLANG_ANALYZER_NONNULL = YES;
405 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
406 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
407 | CLANG_CXX_LIBRARY = "libc++";
408 | CLANG_ENABLE_MODULES = YES;
409 | CLANG_ENABLE_OBJC_ARC = YES;
410 | CLANG_ENABLE_OBJC_WEAK = YES;
411 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
412 | CLANG_WARN_BOOL_CONVERSION = YES;
413 | CLANG_WARN_COMMA = YES;
414 | CLANG_WARN_CONSTANT_CONVERSION = YES;
415 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
416 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
417 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
418 | CLANG_WARN_EMPTY_BODY = YES;
419 | CLANG_WARN_ENUM_CONVERSION = YES;
420 | CLANG_WARN_INFINITE_RECURSION = YES;
421 | CLANG_WARN_INT_CONVERSION = YES;
422 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
423 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
424 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
425 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
426 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
427 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
428 | CLANG_WARN_STRICT_PROTOTYPES = YES;
429 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
430 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
431 | CLANG_WARN_UNREACHABLE_CODE = YES;
432 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
433 | COPY_PHASE_STRIP = NO;
434 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
435 | ENABLE_NS_ASSERTIONS = NO;
436 | ENABLE_STRICT_OBJC_MSGSEND = YES;
437 | GCC_C_LANGUAGE_STANDARD = gnu11;
438 | GCC_NO_COMMON_BLOCKS = YES;
439 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
440 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
441 | GCC_WARN_UNDECLARED_SELECTOR = YES;
442 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
443 | GCC_WARN_UNUSED_FUNCTION = YES;
444 | GCC_WARN_UNUSED_VARIABLE = YES;
445 | IPHONEOS_DEPLOYMENT_TARGET = 14.5;
446 | MTL_ENABLE_DEBUG_INFO = NO;
447 | MTL_FAST_MATH = YES;
448 | SDKROOT = iphoneos;
449 | SWIFT_COMPILATION_MODE = wholemodule;
450 | SWIFT_OPTIMIZATION_LEVEL = "-O";
451 | VALIDATE_PRODUCT = YES;
452 | };
453 | name = Release;
454 | };
455 | DC55B6312658EC0D00C5D2FD /* Debug */ = {
456 | isa = XCBuildConfiguration;
457 | buildSettings = {
458 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
459 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
460 | CODE_SIGN_STYLE = Automatic;
461 | DEVELOPMENT_TEAM = 3CTUR53B57;
462 | INFOPLIST_FILE = MealApp/Info.plist;
463 | LD_RUNPATH_SEARCH_PATHS = (
464 | "$(inherited)",
465 | "@executable_path/Frameworks",
466 | );
467 | PRODUCT_BUNDLE_IDENTIFIER = com.aniltaskiran.MealApp;
468 | PRODUCT_NAME = "$(TARGET_NAME)";
469 | SWIFT_VERSION = 5.0;
470 | TARGETED_DEVICE_FAMILY = "1,2";
471 | };
472 | name = Debug;
473 | };
474 | DC55B6322658EC0D00C5D2FD /* Release */ = {
475 | isa = XCBuildConfiguration;
476 | buildSettings = {
477 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
478 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
479 | CODE_SIGN_STYLE = Automatic;
480 | DEVELOPMENT_TEAM = 3CTUR53B57;
481 | INFOPLIST_FILE = MealApp/Info.plist;
482 | LD_RUNPATH_SEARCH_PATHS = (
483 | "$(inherited)",
484 | "@executable_path/Frameworks",
485 | );
486 | PRODUCT_BUNDLE_IDENTIFIER = com.aniltaskiran.MealApp;
487 | PRODUCT_NAME = "$(TARGET_NAME)";
488 | SWIFT_VERSION = 5.0;
489 | TARGETED_DEVICE_FAMILY = "1,2";
490 | };
491 | name = Release;
492 | };
493 | DC55B6342658EC0D00C5D2FD /* Debug */ = {
494 | isa = XCBuildConfiguration;
495 | buildSettings = {
496 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
497 | BUNDLE_LOADER = "$(TEST_HOST)";
498 | CODE_SIGN_STYLE = Automatic;
499 | DEVELOPMENT_TEAM = 3CTUR53B57;
500 | INFOPLIST_FILE = MealAppTests/Info.plist;
501 | IPHONEOS_DEPLOYMENT_TARGET = 14.5;
502 | LD_RUNPATH_SEARCH_PATHS = (
503 | "$(inherited)",
504 | "@executable_path/Frameworks",
505 | "@loader_path/Frameworks",
506 | );
507 | PRODUCT_BUNDLE_IDENTIFIER = com.aniltaskiran.MealAppTests;
508 | PRODUCT_NAME = "$(TARGET_NAME)";
509 | SWIFT_VERSION = 5.0;
510 | TARGETED_DEVICE_FAMILY = "1,2";
511 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MealApp.app/MealApp";
512 | };
513 | name = Debug;
514 | };
515 | DC55B6352658EC0D00C5D2FD /* Release */ = {
516 | isa = XCBuildConfiguration;
517 | buildSettings = {
518 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
519 | BUNDLE_LOADER = "$(TEST_HOST)";
520 | CODE_SIGN_STYLE = Automatic;
521 | DEVELOPMENT_TEAM = 3CTUR53B57;
522 | INFOPLIST_FILE = MealAppTests/Info.plist;
523 | IPHONEOS_DEPLOYMENT_TARGET = 14.5;
524 | LD_RUNPATH_SEARCH_PATHS = (
525 | "$(inherited)",
526 | "@executable_path/Frameworks",
527 | "@loader_path/Frameworks",
528 | );
529 | PRODUCT_BUNDLE_IDENTIFIER = com.aniltaskiran.MealAppTests;
530 | PRODUCT_NAME = "$(TARGET_NAME)";
531 | SWIFT_VERSION = 5.0;
532 | TARGETED_DEVICE_FAMILY = "1,2";
533 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MealApp.app/MealApp";
534 | };
535 | name = Release;
536 | };
537 | DC55B6372658EC0D00C5D2FD /* Debug */ = {
538 | isa = XCBuildConfiguration;
539 | buildSettings = {
540 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
541 | CODE_SIGN_STYLE = Automatic;
542 | DEVELOPMENT_TEAM = 3CTUR53B57;
543 | INFOPLIST_FILE = MealAppUITests/Info.plist;
544 | LD_RUNPATH_SEARCH_PATHS = (
545 | "$(inherited)",
546 | "@executable_path/Frameworks",
547 | "@loader_path/Frameworks",
548 | );
549 | PRODUCT_BUNDLE_IDENTIFIER = com.aniltaskiran.MealAppUITests;
550 | PRODUCT_NAME = "$(TARGET_NAME)";
551 | SWIFT_VERSION = 5.0;
552 | TARGETED_DEVICE_FAMILY = "1,2";
553 | TEST_TARGET_NAME = MealApp;
554 | };
555 | name = Debug;
556 | };
557 | DC55B6382658EC0D00C5D2FD /* Release */ = {
558 | isa = XCBuildConfiguration;
559 | buildSettings = {
560 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
561 | CODE_SIGN_STYLE = Automatic;
562 | DEVELOPMENT_TEAM = 3CTUR53B57;
563 | INFOPLIST_FILE = MealAppUITests/Info.plist;
564 | LD_RUNPATH_SEARCH_PATHS = (
565 | "$(inherited)",
566 | "@executable_path/Frameworks",
567 | "@loader_path/Frameworks",
568 | );
569 | PRODUCT_BUNDLE_IDENTIFIER = com.aniltaskiran.MealAppUITests;
570 | PRODUCT_NAME = "$(TARGET_NAME)";
571 | SWIFT_VERSION = 5.0;
572 | TARGETED_DEVICE_FAMILY = "1,2";
573 | TEST_TARGET_NAME = MealApp;
574 | };
575 | name = Release;
576 | };
577 | /* End XCBuildConfiguration section */
578 |
579 | /* Begin XCConfigurationList section */
580 | DC55B6012658EC0B00C5D2FD /* Build configuration list for PBXProject "MealApp" */ = {
581 | isa = XCConfigurationList;
582 | buildConfigurations = (
583 | DC55B62E2658EC0D00C5D2FD /* Debug */,
584 | DC55B62F2658EC0D00C5D2FD /* Release */,
585 | );
586 | defaultConfigurationIsVisible = 0;
587 | defaultConfigurationName = Release;
588 | };
589 | DC55B6302658EC0D00C5D2FD /* Build configuration list for PBXNativeTarget "MealApp" */ = {
590 | isa = XCConfigurationList;
591 | buildConfigurations = (
592 | DC55B6312658EC0D00C5D2FD /* Debug */,
593 | DC55B6322658EC0D00C5D2FD /* Release */,
594 | );
595 | defaultConfigurationIsVisible = 0;
596 | defaultConfigurationName = Release;
597 | };
598 | DC55B6332658EC0D00C5D2FD /* Build configuration list for PBXNativeTarget "MealAppTests" */ = {
599 | isa = XCConfigurationList;
600 | buildConfigurations = (
601 | DC55B6342658EC0D00C5D2FD /* Debug */,
602 | DC55B6352658EC0D00C5D2FD /* Release */,
603 | );
604 | defaultConfigurationIsVisible = 0;
605 | defaultConfigurationName = Release;
606 | };
607 | DC55B6362658EC0D00C5D2FD /* Build configuration list for PBXNativeTarget "MealAppUITests" */ = {
608 | isa = XCConfigurationList;
609 | buildConfigurations = (
610 | DC55B6372658EC0D00C5D2FD /* Debug */,
611 | DC55B6382658EC0D00C5D2FD /* Release */,
612 | );
613 | defaultConfigurationIsVisible = 0;
614 | defaultConfigurationName = Release;
615 | };
616 | /* End XCConfigurationList section */
617 |
618 | /* Begin XCSwiftPackageProductDependency section */
619 | DC55B63A2658ED9700C5D2FD /* CoreApi */ = {
620 | isa = XCSwiftPackageProductDependency;
621 | productName = CoreApi;
622 | };
623 | /* End XCSwiftPackageProductDependency section */
624 | };
625 | rootObject = DC55B5FE2658EC0B00C5D2FD /* Project object */;
626 | }
627 |
--------------------------------------------------------------------------------