├── Rest API ├── Rest API │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── ratedStar.imageset │ │ │ ├── ratedStar.png │ │ │ └── Contents.json │ │ ├── noImageAvailable.imageset │ │ │ ├── noImageAvailable.jpg │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Model │ │ └── Model.swift │ ├── ViewModel │ │ └── MovieViewModel.swift │ ├── Controller │ │ └── MovieViewController.swift │ ├── Info.plist │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── Networking │ │ └── ApiService.swift │ ├── AppDelegate.swift │ └── View │ │ ├── MovieTableViewCell.swift │ │ └── Base.lproj │ │ └── Main.storyboard ├── Rest API.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcuserdata │ │ │ └── nisoFolder.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcuserdata │ │ └── nisoFolder.xcuserdatad │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── project.pbxproj ├── Rest APITests │ ├── Info.plist │ └── Rest_APITests.swift └── Rest APIUITests │ ├── Info.plist │ └── Rest_APIUITests.swift └── README.md /Rest API/Rest API/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Rest API/Rest API/Assets.xcassets/ratedStar.imageset/ratedStar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftCodeSnippets/REST-API-how-to-fetch-data-from-the-server/HEAD/Rest API/Rest API/Assets.xcassets/ratedStar.imageset/ratedStar.png -------------------------------------------------------------------------------- /Rest API/Rest API.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Rest API/Rest API/Assets.xcassets/noImageAvailable.imageset/noImageAvailable.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftCodeSnippets/REST-API-how-to-fetch-data-from-the-server/HEAD/Rest API/Rest API/Assets.xcassets/noImageAvailable.imageset/noImageAvailable.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # REST-API-how-to-fetch-data-from-the-server 2 | How to fetch data from the server and present it in a tableview. 3 | 4 | If you want to see how I built this from scratch, you can check my YouTube channel Swift Code Snippets: https://www.youtube.com/channel/UCENwGAGUfEL1-MWAQt7-Acg/featured 5 | -------------------------------------------------------------------------------- /Rest API/Rest API.xcodeproj/project.xcworkspace/xcuserdata/nisoFolder.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftCodeSnippets/REST-API-how-to-fetch-data-from-the-server/HEAD/Rest API/Rest API.xcodeproj/project.xcworkspace/xcuserdata/nisoFolder.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Rest API/Rest API.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Rest API/Rest API/Assets.xcassets/ratedStar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "ratedStar.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Rest API/Rest API/Assets.xcassets/noImageAvailable.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "noImageAvailable.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Rest API/Rest API.xcodeproj/xcuserdata/nisoFolder.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Rest API.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Rest API/Rest API/Model/Model.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Model.swift 3 | // Rest API 4 | // 5 | // Created by Niso on 4/29/20. 6 | // Copyright © 2020 Niso. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct MoviesData: Decodable { 12 | let movies: [Movie] 13 | 14 | private enum CodingKeys: String, CodingKey { 15 | case movies = "results" 16 | } 17 | } 18 | 19 | struct Movie: Decodable { 20 | 21 | let title: String? 22 | let year: String? 23 | let rate: Double? 24 | let posterImage: String? 25 | let overview: String? 26 | 27 | private enum CodingKeys: String, CodingKey { 28 | case title, overview 29 | case year = "release_date" 30 | case rate = "vote_average" 31 | case posterImage = "poster_path" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Rest API/Rest APITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Rest API/Rest APIUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Rest API/Rest APITests/Rest_APITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Rest_APITests.swift 3 | // Rest APITests 4 | // 5 | // Created by Niso on 4/29/20. 6 | // Copyright © 2020 Niso. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Rest_API 11 | 12 | class Rest_APITests: XCTestCase { 13 | 14 | override func setUp() { 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | } 21 | 22 | func testExample() { 23 | // This is an example of a functional test case. 24 | // Use XCTAssert and related functions to verify your tests produce the correct results. 25 | } 26 | 27 | func testPerformanceExample() { 28 | // This is an example of a performance test case. 29 | self.measure { 30 | // Put the code you want to measure the time of here. 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Rest API/Rest API/ViewModel/MovieViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MovieViewModel.swift 3 | // Rest API 4 | // 5 | // Created by Niso on 4/29/20. 6 | // Copyright © 2020 Niso. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class MovieViewModel { 12 | 13 | private var apiService = ApiService() 14 | private var popularMovies = [Movie]() 15 | 16 | func fetchPopularMoviesData(completion: @escaping () -> ()) { 17 | 18 | // weak self - prevent retain cycles 19 | apiService.getPopularMoviesData { [weak self] (result) in 20 | 21 | switch result { 22 | case .success(let listOf): 23 | self?.popularMovies = listOf.movies 24 | completion() 25 | case .failure(let error): 26 | // Something is wrong with the JSON file or the model 27 | print("Error processing json data: \(error)") 28 | } 29 | } 30 | } 31 | 32 | func numberOfRowsInSection(section: Int) -> Int { 33 | if popularMovies.count != 0 { 34 | return popularMovies.count 35 | } 36 | return 0 37 | } 38 | 39 | func cellForRowAt (indexPath: IndexPath) -> Movie { 40 | return popularMovies[indexPath.row] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Rest API/Rest APIUITests/Rest_APIUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Rest_APIUITests.swift 3 | // Rest APIUITests 4 | // 5 | // Created by Niso on 4/29/20. 6 | // Copyright © 2020 Niso. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class Rest_APIUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | // Put setup code here. This method is called before the invocation of each test method in the class. 15 | 16 | // In UI tests it is usually best to stop immediately when a failure occurs. 17 | continueAfterFailure = false 18 | 19 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 20 | XCUIApplication().launch() 21 | 22 | // 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. 23 | } 24 | 25 | override func tearDown() { 26 | // Put teardown code here. This method is called after the invocation of each test method in the class. 27 | } 28 | 29 | func testExample() { 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 | } 35 | -------------------------------------------------------------------------------- /Rest API/Rest API/Controller/MovieViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Rest API 4 | // 5 | // Created by Niso on 4/29/20. 6 | // Copyright © 2020 Niso. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MovieViewController: UIViewController { 12 | 13 | @IBOutlet weak var tableView: UITableView! 14 | 15 | private var viewModel = MovieViewModel() 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | // Do any additional setup after loading the view. 20 | loadPopularMoviesData() 21 | } 22 | 23 | private func loadPopularMoviesData() { 24 | viewModel.fetchPopularMoviesData { [weak self] in 25 | self?.tableView.dataSource = self 26 | self?.tableView.reloadData() 27 | } 28 | } 29 | } 30 | 31 | // MARK: - TableView 32 | extension MovieViewController: UITableViewDataSource { 33 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 34 | return viewModel.numberOfRowsInSection(section: section) 35 | } 36 | 37 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 38 | let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! MovieTableViewCell 39 | 40 | let movie = viewModel.cellForRowAt(indexPath: indexPath) 41 | cell.setCellWithValuesOf(movie) 42 | 43 | return cell 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Rest API/Rest API/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Rest API/Rest API/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 | -------------------------------------------------------------------------------- /Rest API/Rest API/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Rest API/Rest API/Networking/ApiService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ApiService.swift 3 | // Rest API 4 | // 5 | // Created by Niso on 4/29/20. 6 | // Copyright © 2020 Niso. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class ApiService { 12 | 13 | private var dataTask: URLSessionDataTask? 14 | 15 | func getPopularMoviesData(completion: @escaping (Result) -> Void) { 16 | 17 | let popularMoviesURL = "https://api.themoviedb.org/3/movie/popular?api_key=4e0be2c22f7268edffde97481d49064a&language=en-US&page=1" 18 | 19 | guard let url = URL(string: popularMoviesURL) else {return} 20 | 21 | // Create URL Session - work on the background 22 | dataTask = URLSession.shared.dataTask(with: url) { (data, response, error) in 23 | 24 | // Handle Error 25 | if let error = error { 26 | completion(.failure(error)) 27 | print("DataTask error: \(error.localizedDescription)") 28 | return 29 | } 30 | 31 | guard let response = response as? HTTPURLResponse else { 32 | // Handle Empty Response 33 | print("Empty Response") 34 | return 35 | } 36 | print("Response status code: \(response.statusCode)") 37 | 38 | guard let data = data else { 39 | // Handle Empty Data 40 | print("Empty Data") 41 | return 42 | } 43 | 44 | do { 45 | // Parse the data 46 | let decoder = JSONDecoder() 47 | let jsonData = try decoder.decode(MoviesData.self, from: data) 48 | 49 | // Back to the main thread 50 | DispatchQueue.main.async { 51 | completion(.success(jsonData)) 52 | } 53 | } catch let error { 54 | completion(.failure(error)) 55 | } 56 | 57 | } 58 | dataTask?.resume() 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Rest API/Rest API/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Rest API 4 | // 5 | // Created by Niso on 4/29/20. 6 | // Copyright © 2020 Niso. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Rest API/Rest API/View/MovieTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MovieTableViewCell.swift 3 | // Rest API 4 | // 5 | // Created by Niso on 4/29/20. 6 | // Copyright © 2020 Niso. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MovieTableViewCell: UITableViewCell { 12 | 13 | @IBOutlet weak var moviePoster: UIImageView! 14 | @IBOutlet weak var movieTitle: UILabel! 15 | @IBOutlet weak var movieYear: UILabel! 16 | @IBOutlet weak var movieOverview: UILabel! 17 | @IBOutlet weak var movieRate: UILabel! 18 | 19 | private var urlString: String = "" 20 | 21 | // Setup movies values 22 | func setCellWithValuesOf(_ movie:Movie) { 23 | updateUI(title: movie.title, releaseDate: movie.year, rating: movie.rate, overview: movie.overview, poster: movie.posterImage) 24 | } 25 | 26 | // Update the UI Views 27 | private func updateUI(title: String?, releaseDate: String?, rating: Double?, overview: String?, poster: String?) { 28 | 29 | self.movieTitle.text = title 30 | self.movieYear.text = convertDateFormater(releaseDate) 31 | guard let rate = rating else {return} 32 | self.movieRate.text = String(rate) 33 | self.movieOverview.text = overview 34 | 35 | guard let posterString = poster else {return} 36 | urlString = "https://image.tmdb.org/t/p/w300" + posterString 37 | 38 | guard let posterImageURL = URL(string: urlString) else { 39 | self.moviePoster.image = UIImage(named: "noImageAvailable") 40 | return 41 | } 42 | 43 | // Before we download the image we clear out the old one 44 | self.moviePoster.image = nil 45 | 46 | getImageDataFrom(url: posterImageURL) 47 | 48 | } 49 | 50 | // MARK: - Get image data 51 | private func getImageDataFrom(url: URL) { 52 | URLSession.shared.dataTask(with: url) { (data, response, error) in 53 | // Handle Error 54 | if let error = error { 55 | print("DataTask error: \(error.localizedDescription)") 56 | return 57 | } 58 | 59 | guard let data = data else { 60 | // Handle Empty Data 61 | print("Empty Data") 62 | return 63 | } 64 | 65 | DispatchQueue.main.async { 66 | if let image = UIImage(data: data) { 67 | self.moviePoster.image = image 68 | } 69 | } 70 | }.resume() 71 | } 72 | 73 | // MARK: - Convert date format 74 | func convertDateFormater(_ date: String?) -> String { 75 | var fixDate = "" 76 | let dateFormatter = DateFormatter() 77 | dateFormatter.dateFormat = "yyyy-MM-dd" 78 | if let originalDate = date { 79 | if let newDate = dateFormatter.date(from: originalDate) { 80 | dateFormatter.dateFormat = "dd.MM.yyyy" 81 | fixDate = dateFormatter.string(from: newDate) 82 | } 83 | } 84 | return fixDate 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Rest API/Rest API/View/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 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 62 | 68 | 74 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /Rest API/Rest API.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F38FA9F62459C47100599E54 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38FA9F52459C47100599E54 /* AppDelegate.swift */; }; 11 | F38FA9F82459C47100599E54 /* MovieViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38FA9F72459C47100599E54 /* MovieViewController.swift */; }; 12 | F38FA9FB2459C47100599E54 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F38FA9F92459C47100599E54 /* Main.storyboard */; }; 13 | F38FA9FD2459C47300599E54 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F38FA9FC2459C47300599E54 /* Assets.xcassets */; }; 14 | F38FAA002459C47300599E54 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F38FA9FE2459C47300599E54 /* LaunchScreen.storyboard */; }; 15 | F38FAA0B2459C47300599E54 /* Rest_APITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38FAA0A2459C47300599E54 /* Rest_APITests.swift */; }; 16 | F38FAA162459C47300599E54 /* Rest_APIUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38FAA152459C47300599E54 /* Rest_APIUITests.swift */; }; 17 | F38FAA242459C48700599E54 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38FAA232459C48700599E54 /* Model.swift */; }; 18 | F38FAA262459C68300599E54 /* ApiService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38FAA252459C68300599E54 /* ApiService.swift */; }; 19 | F38FAA282459CB8E00599E54 /* MovieViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38FAA272459CB8E00599E54 /* MovieViewModel.swift */; }; 20 | F38FAA2A2459D6B600599E54 /* MovieTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38FAA292459D6B600599E54 /* MovieTableViewCell.swift */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | F38FAA072459C47300599E54 /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = F38FA9EA2459C47100599E54 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = F38FA9F12459C47100599E54; 29 | remoteInfo = "Rest API"; 30 | }; 31 | F38FAA122459C47300599E54 /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = F38FA9EA2459C47100599E54 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = F38FA9F12459C47100599E54; 36 | remoteInfo = "Rest API"; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | F38FA9F22459C47100599E54 /* Rest API.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Rest API.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | F38FA9F52459C47100599E54 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 43 | F38FA9F72459C47100599E54 /* MovieViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieViewController.swift; sourceTree = ""; }; 44 | F38FA9FA2459C47100599E54 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | F38FA9FC2459C47300599E54 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46 | F38FA9FF2459C47300599E54 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 47 | F38FAA012459C47300599E54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | F38FAA062459C47300599E54 /* Rest APITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Rest APITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | F38FAA0A2459C47300599E54 /* Rest_APITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Rest_APITests.swift; sourceTree = ""; }; 50 | F38FAA0C2459C47300599E54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | F38FAA112459C47300599E54 /* Rest APIUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Rest APIUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | F38FAA152459C47300599E54 /* Rest_APIUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Rest_APIUITests.swift; sourceTree = ""; }; 53 | F38FAA172459C47300599E54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | F38FAA232459C48700599E54 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = ""; }; 55 | F38FAA252459C68300599E54 /* ApiService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiService.swift; sourceTree = ""; }; 56 | F38FAA272459CB8E00599E54 /* MovieViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieViewModel.swift; sourceTree = ""; }; 57 | F38FAA292459D6B600599E54 /* MovieTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieTableViewCell.swift; sourceTree = ""; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | F38FA9EF2459C47100599E54 /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | F38FAA032459C47300599E54 /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | F38FAA0E2459C47300599E54 /* Frameworks */ = { 76 | isa = PBXFrameworksBuildPhase; 77 | buildActionMask = 2147483647; 78 | files = ( 79 | ); 80 | runOnlyForDeploymentPostprocessing = 0; 81 | }; 82 | /* End PBXFrameworksBuildPhase section */ 83 | 84 | /* Begin PBXGroup section */ 85 | F38FA9E92459C47100599E54 = { 86 | isa = PBXGroup; 87 | children = ( 88 | F38FA9F42459C47100599E54 /* Rest API */, 89 | F38FAA092459C47300599E54 /* Rest APITests */, 90 | F38FAA142459C47300599E54 /* Rest APIUITests */, 91 | F38FA9F32459C47100599E54 /* Products */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | F38FA9F32459C47100599E54 /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | F38FA9F22459C47100599E54 /* Rest API.app */, 99 | F38FAA062459C47300599E54 /* Rest APITests.xctest */, 100 | F38FAA112459C47300599E54 /* Rest APIUITests.xctest */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | F38FA9F42459C47100599E54 /* Rest API */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | F38FAA2F2459DCE000599E54 /* Model */, 109 | F38FAA2E2459DCD700599E54 /* View */, 110 | F38FAA2D2459DCC800599E54 /* ViewModel */, 111 | F38FAA2C2459DCB700599E54 /* Controller */, 112 | F38FAA2B2459DCA100599E54 /* Networking */, 113 | F38FA9F52459C47100599E54 /* AppDelegate.swift */, 114 | F38FA9FC2459C47300599E54 /* Assets.xcassets */, 115 | F38FA9FE2459C47300599E54 /* LaunchScreen.storyboard */, 116 | F38FAA012459C47300599E54 /* Info.plist */, 117 | ); 118 | path = "Rest API"; 119 | sourceTree = ""; 120 | }; 121 | F38FAA092459C47300599E54 /* Rest APITests */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | F38FAA0A2459C47300599E54 /* Rest_APITests.swift */, 125 | F38FAA0C2459C47300599E54 /* Info.plist */, 126 | ); 127 | path = "Rest APITests"; 128 | sourceTree = ""; 129 | }; 130 | F38FAA142459C47300599E54 /* Rest APIUITests */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | F38FAA152459C47300599E54 /* Rest_APIUITests.swift */, 134 | F38FAA172459C47300599E54 /* Info.plist */, 135 | ); 136 | path = "Rest APIUITests"; 137 | sourceTree = ""; 138 | }; 139 | F38FAA2B2459DCA100599E54 /* Networking */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | F38FAA252459C68300599E54 /* ApiService.swift */, 143 | ); 144 | path = Networking; 145 | sourceTree = ""; 146 | }; 147 | F38FAA2C2459DCB700599E54 /* Controller */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | F38FA9F72459C47100599E54 /* MovieViewController.swift */, 151 | ); 152 | path = Controller; 153 | sourceTree = ""; 154 | }; 155 | F38FAA2D2459DCC800599E54 /* ViewModel */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | F38FAA272459CB8E00599E54 /* MovieViewModel.swift */, 159 | ); 160 | path = ViewModel; 161 | sourceTree = ""; 162 | }; 163 | F38FAA2E2459DCD700599E54 /* View */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | F38FA9F92459C47100599E54 /* Main.storyboard */, 167 | F38FAA292459D6B600599E54 /* MovieTableViewCell.swift */, 168 | ); 169 | path = View; 170 | sourceTree = ""; 171 | }; 172 | F38FAA2F2459DCE000599E54 /* Model */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | F38FAA232459C48700599E54 /* Model.swift */, 176 | ); 177 | path = Model; 178 | sourceTree = ""; 179 | }; 180 | /* End PBXGroup section */ 181 | 182 | /* Begin PBXNativeTarget section */ 183 | F38FA9F12459C47100599E54 /* Rest API */ = { 184 | isa = PBXNativeTarget; 185 | buildConfigurationList = F38FAA1A2459C47300599E54 /* Build configuration list for PBXNativeTarget "Rest API" */; 186 | buildPhases = ( 187 | F38FA9EE2459C47100599E54 /* Sources */, 188 | F38FA9EF2459C47100599E54 /* Frameworks */, 189 | F38FA9F02459C47100599E54 /* Resources */, 190 | ); 191 | buildRules = ( 192 | ); 193 | dependencies = ( 194 | ); 195 | name = "Rest API"; 196 | productName = "Rest API"; 197 | productReference = F38FA9F22459C47100599E54 /* Rest API.app */; 198 | productType = "com.apple.product-type.application"; 199 | }; 200 | F38FAA052459C47300599E54 /* Rest APITests */ = { 201 | isa = PBXNativeTarget; 202 | buildConfigurationList = F38FAA1D2459C47300599E54 /* Build configuration list for PBXNativeTarget "Rest APITests" */; 203 | buildPhases = ( 204 | F38FAA022459C47300599E54 /* Sources */, 205 | F38FAA032459C47300599E54 /* Frameworks */, 206 | F38FAA042459C47300599E54 /* Resources */, 207 | ); 208 | buildRules = ( 209 | ); 210 | dependencies = ( 211 | F38FAA082459C47300599E54 /* PBXTargetDependency */, 212 | ); 213 | name = "Rest APITests"; 214 | productName = "Rest APITests"; 215 | productReference = F38FAA062459C47300599E54 /* Rest APITests.xctest */; 216 | productType = "com.apple.product-type.bundle.unit-test"; 217 | }; 218 | F38FAA102459C47300599E54 /* Rest APIUITests */ = { 219 | isa = PBXNativeTarget; 220 | buildConfigurationList = F38FAA202459C47300599E54 /* Build configuration list for PBXNativeTarget "Rest APIUITests" */; 221 | buildPhases = ( 222 | F38FAA0D2459C47300599E54 /* Sources */, 223 | F38FAA0E2459C47300599E54 /* Frameworks */, 224 | F38FAA0F2459C47300599E54 /* Resources */, 225 | ); 226 | buildRules = ( 227 | ); 228 | dependencies = ( 229 | F38FAA132459C47300599E54 /* PBXTargetDependency */, 230 | ); 231 | name = "Rest APIUITests"; 232 | productName = "Rest APIUITests"; 233 | productReference = F38FAA112459C47300599E54 /* Rest APIUITests.xctest */; 234 | productType = "com.apple.product-type.bundle.ui-testing"; 235 | }; 236 | /* End PBXNativeTarget section */ 237 | 238 | /* Begin PBXProject section */ 239 | F38FA9EA2459C47100599E54 /* Project object */ = { 240 | isa = PBXProject; 241 | attributes = { 242 | LastSwiftUpdateCheck = 1020; 243 | LastUpgradeCheck = 1020; 244 | ORGANIZATIONNAME = Niso; 245 | TargetAttributes = { 246 | F38FA9F12459C47100599E54 = { 247 | CreatedOnToolsVersion = 10.2.1; 248 | }; 249 | F38FAA052459C47300599E54 = { 250 | CreatedOnToolsVersion = 10.2.1; 251 | TestTargetID = F38FA9F12459C47100599E54; 252 | }; 253 | F38FAA102459C47300599E54 = { 254 | CreatedOnToolsVersion = 10.2.1; 255 | TestTargetID = F38FA9F12459C47100599E54; 256 | }; 257 | }; 258 | }; 259 | buildConfigurationList = F38FA9ED2459C47100599E54 /* Build configuration list for PBXProject "Rest API" */; 260 | compatibilityVersion = "Xcode 9.3"; 261 | developmentRegion = en; 262 | hasScannedForEncodings = 0; 263 | knownRegions = ( 264 | en, 265 | Base, 266 | ); 267 | mainGroup = F38FA9E92459C47100599E54; 268 | productRefGroup = F38FA9F32459C47100599E54 /* Products */; 269 | projectDirPath = ""; 270 | projectRoot = ""; 271 | targets = ( 272 | F38FA9F12459C47100599E54 /* Rest API */, 273 | F38FAA052459C47300599E54 /* Rest APITests */, 274 | F38FAA102459C47300599E54 /* Rest APIUITests */, 275 | ); 276 | }; 277 | /* End PBXProject section */ 278 | 279 | /* Begin PBXResourcesBuildPhase section */ 280 | F38FA9F02459C47100599E54 /* Resources */ = { 281 | isa = PBXResourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | F38FAA002459C47300599E54 /* LaunchScreen.storyboard in Resources */, 285 | F38FA9FD2459C47300599E54 /* Assets.xcassets in Resources */, 286 | F38FA9FB2459C47100599E54 /* Main.storyboard in Resources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | F38FAA042459C47300599E54 /* Resources */ = { 291 | isa = PBXResourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | ); 295 | runOnlyForDeploymentPostprocessing = 0; 296 | }; 297 | F38FAA0F2459C47300599E54 /* Resources */ = { 298 | isa = PBXResourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | ); 302 | runOnlyForDeploymentPostprocessing = 0; 303 | }; 304 | /* End PBXResourcesBuildPhase section */ 305 | 306 | /* Begin PBXSourcesBuildPhase section */ 307 | F38FA9EE2459C47100599E54 /* Sources */ = { 308 | isa = PBXSourcesBuildPhase; 309 | buildActionMask = 2147483647; 310 | files = ( 311 | F38FAA242459C48700599E54 /* Model.swift in Sources */, 312 | F38FAA282459CB8E00599E54 /* MovieViewModel.swift in Sources */, 313 | F38FAA2A2459D6B600599E54 /* MovieTableViewCell.swift in Sources */, 314 | F38FA9F82459C47100599E54 /* MovieViewController.swift in Sources */, 315 | F38FAA262459C68300599E54 /* ApiService.swift in Sources */, 316 | F38FA9F62459C47100599E54 /* AppDelegate.swift in Sources */, 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | }; 320 | F38FAA022459C47300599E54 /* Sources */ = { 321 | isa = PBXSourcesBuildPhase; 322 | buildActionMask = 2147483647; 323 | files = ( 324 | F38FAA0B2459C47300599E54 /* Rest_APITests.swift in Sources */, 325 | ); 326 | runOnlyForDeploymentPostprocessing = 0; 327 | }; 328 | F38FAA0D2459C47300599E54 /* Sources */ = { 329 | isa = PBXSourcesBuildPhase; 330 | buildActionMask = 2147483647; 331 | files = ( 332 | F38FAA162459C47300599E54 /* Rest_APIUITests.swift in Sources */, 333 | ); 334 | runOnlyForDeploymentPostprocessing = 0; 335 | }; 336 | /* End PBXSourcesBuildPhase section */ 337 | 338 | /* Begin PBXTargetDependency section */ 339 | F38FAA082459C47300599E54 /* PBXTargetDependency */ = { 340 | isa = PBXTargetDependency; 341 | target = F38FA9F12459C47100599E54 /* Rest API */; 342 | targetProxy = F38FAA072459C47300599E54 /* PBXContainerItemProxy */; 343 | }; 344 | F38FAA132459C47300599E54 /* PBXTargetDependency */ = { 345 | isa = PBXTargetDependency; 346 | target = F38FA9F12459C47100599E54 /* Rest API */; 347 | targetProxy = F38FAA122459C47300599E54 /* PBXContainerItemProxy */; 348 | }; 349 | /* End PBXTargetDependency section */ 350 | 351 | /* Begin PBXVariantGroup section */ 352 | F38FA9F92459C47100599E54 /* Main.storyboard */ = { 353 | isa = PBXVariantGroup; 354 | children = ( 355 | F38FA9FA2459C47100599E54 /* Base */, 356 | ); 357 | name = Main.storyboard; 358 | sourceTree = ""; 359 | }; 360 | F38FA9FE2459C47300599E54 /* LaunchScreen.storyboard */ = { 361 | isa = PBXVariantGroup; 362 | children = ( 363 | F38FA9FF2459C47300599E54 /* Base */, 364 | ); 365 | name = LaunchScreen.storyboard; 366 | sourceTree = ""; 367 | }; 368 | /* End PBXVariantGroup section */ 369 | 370 | /* Begin XCBuildConfiguration section */ 371 | F38FAA182459C47300599E54 /* Debug */ = { 372 | isa = XCBuildConfiguration; 373 | buildSettings = { 374 | ALWAYS_SEARCH_USER_PATHS = NO; 375 | CLANG_ANALYZER_NONNULL = YES; 376 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 377 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 378 | CLANG_CXX_LIBRARY = "libc++"; 379 | CLANG_ENABLE_MODULES = YES; 380 | CLANG_ENABLE_OBJC_ARC = YES; 381 | CLANG_ENABLE_OBJC_WEAK = YES; 382 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 383 | CLANG_WARN_BOOL_CONVERSION = YES; 384 | CLANG_WARN_COMMA = YES; 385 | CLANG_WARN_CONSTANT_CONVERSION = YES; 386 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 387 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 388 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 389 | CLANG_WARN_EMPTY_BODY = YES; 390 | CLANG_WARN_ENUM_CONVERSION = YES; 391 | CLANG_WARN_INFINITE_RECURSION = YES; 392 | CLANG_WARN_INT_CONVERSION = YES; 393 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 394 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 395 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 396 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 397 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 398 | CLANG_WARN_STRICT_PROTOTYPES = YES; 399 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 400 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 401 | CLANG_WARN_UNREACHABLE_CODE = YES; 402 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 403 | CODE_SIGN_IDENTITY = "iPhone Developer"; 404 | COPY_PHASE_STRIP = NO; 405 | DEBUG_INFORMATION_FORMAT = dwarf; 406 | ENABLE_STRICT_OBJC_MSGSEND = YES; 407 | ENABLE_TESTABILITY = YES; 408 | GCC_C_LANGUAGE_STANDARD = gnu11; 409 | GCC_DYNAMIC_NO_PIC = NO; 410 | GCC_NO_COMMON_BLOCKS = YES; 411 | GCC_OPTIMIZATION_LEVEL = 0; 412 | GCC_PREPROCESSOR_DEFINITIONS = ( 413 | "DEBUG=1", 414 | "$(inherited)", 415 | ); 416 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 417 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 418 | GCC_WARN_UNDECLARED_SELECTOR = YES; 419 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 420 | GCC_WARN_UNUSED_FUNCTION = YES; 421 | GCC_WARN_UNUSED_VARIABLE = YES; 422 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 423 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 424 | MTL_FAST_MATH = YES; 425 | ONLY_ACTIVE_ARCH = YES; 426 | SDKROOT = iphoneos; 427 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 428 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 429 | }; 430 | name = Debug; 431 | }; 432 | F38FAA192459C47300599E54 /* Release */ = { 433 | isa = XCBuildConfiguration; 434 | buildSettings = { 435 | ALWAYS_SEARCH_USER_PATHS = NO; 436 | CLANG_ANALYZER_NONNULL = YES; 437 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 438 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 439 | CLANG_CXX_LIBRARY = "libc++"; 440 | CLANG_ENABLE_MODULES = YES; 441 | CLANG_ENABLE_OBJC_ARC = YES; 442 | CLANG_ENABLE_OBJC_WEAK = YES; 443 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 444 | CLANG_WARN_BOOL_CONVERSION = YES; 445 | CLANG_WARN_COMMA = YES; 446 | CLANG_WARN_CONSTANT_CONVERSION = YES; 447 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 448 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 449 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 450 | CLANG_WARN_EMPTY_BODY = YES; 451 | CLANG_WARN_ENUM_CONVERSION = YES; 452 | CLANG_WARN_INFINITE_RECURSION = YES; 453 | CLANG_WARN_INT_CONVERSION = YES; 454 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 455 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 456 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 457 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 458 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 459 | CLANG_WARN_STRICT_PROTOTYPES = YES; 460 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 461 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 462 | CLANG_WARN_UNREACHABLE_CODE = YES; 463 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 464 | CODE_SIGN_IDENTITY = "iPhone Developer"; 465 | COPY_PHASE_STRIP = NO; 466 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 467 | ENABLE_NS_ASSERTIONS = NO; 468 | ENABLE_STRICT_OBJC_MSGSEND = YES; 469 | GCC_C_LANGUAGE_STANDARD = gnu11; 470 | GCC_NO_COMMON_BLOCKS = YES; 471 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 472 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 473 | GCC_WARN_UNDECLARED_SELECTOR = YES; 474 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 475 | GCC_WARN_UNUSED_FUNCTION = YES; 476 | GCC_WARN_UNUSED_VARIABLE = YES; 477 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 478 | MTL_ENABLE_DEBUG_INFO = NO; 479 | MTL_FAST_MATH = YES; 480 | SDKROOT = iphoneos; 481 | SWIFT_COMPILATION_MODE = wholemodule; 482 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 483 | VALIDATE_PRODUCT = YES; 484 | }; 485 | name = Release; 486 | }; 487 | F38FAA1B2459C47300599E54 /* Debug */ = { 488 | isa = XCBuildConfiguration; 489 | buildSettings = { 490 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 491 | CODE_SIGN_STYLE = Automatic; 492 | INFOPLIST_FILE = "Rest API/Info.plist"; 493 | LD_RUNPATH_SEARCH_PATHS = ( 494 | "$(inherited)", 495 | "@executable_path/Frameworks", 496 | ); 497 | PRODUCT_BUNDLE_IDENTIFIER = "PancakesAtBreakfast.Rest-API"; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | SWIFT_VERSION = 5.0; 500 | TARGETED_DEVICE_FAMILY = "1,2"; 501 | }; 502 | name = Debug; 503 | }; 504 | F38FAA1C2459C47300599E54 /* Release */ = { 505 | isa = XCBuildConfiguration; 506 | buildSettings = { 507 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 508 | CODE_SIGN_STYLE = Automatic; 509 | INFOPLIST_FILE = "Rest API/Info.plist"; 510 | LD_RUNPATH_SEARCH_PATHS = ( 511 | "$(inherited)", 512 | "@executable_path/Frameworks", 513 | ); 514 | PRODUCT_BUNDLE_IDENTIFIER = "PancakesAtBreakfast.Rest-API"; 515 | PRODUCT_NAME = "$(TARGET_NAME)"; 516 | SWIFT_VERSION = 5.0; 517 | TARGETED_DEVICE_FAMILY = "1,2"; 518 | }; 519 | name = Release; 520 | }; 521 | F38FAA1E2459C47300599E54 /* Debug */ = { 522 | isa = XCBuildConfiguration; 523 | buildSettings = { 524 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 525 | BUNDLE_LOADER = "$(TEST_HOST)"; 526 | CODE_SIGN_STYLE = Automatic; 527 | INFOPLIST_FILE = "Rest APITests/Info.plist"; 528 | LD_RUNPATH_SEARCH_PATHS = ( 529 | "$(inherited)", 530 | "@executable_path/Frameworks", 531 | "@loader_path/Frameworks", 532 | ); 533 | PRODUCT_BUNDLE_IDENTIFIER = "PancakesAtBreakfast.Rest-APITests"; 534 | PRODUCT_NAME = "$(TARGET_NAME)"; 535 | SWIFT_VERSION = 5.0; 536 | TARGETED_DEVICE_FAMILY = "1,2"; 537 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Rest API.app/Rest API"; 538 | }; 539 | name = Debug; 540 | }; 541 | F38FAA1F2459C47300599E54 /* Release */ = { 542 | isa = XCBuildConfiguration; 543 | buildSettings = { 544 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 545 | BUNDLE_LOADER = "$(TEST_HOST)"; 546 | CODE_SIGN_STYLE = Automatic; 547 | INFOPLIST_FILE = "Rest APITests/Info.plist"; 548 | LD_RUNPATH_SEARCH_PATHS = ( 549 | "$(inherited)", 550 | "@executable_path/Frameworks", 551 | "@loader_path/Frameworks", 552 | ); 553 | PRODUCT_BUNDLE_IDENTIFIER = "PancakesAtBreakfast.Rest-APITests"; 554 | PRODUCT_NAME = "$(TARGET_NAME)"; 555 | SWIFT_VERSION = 5.0; 556 | TARGETED_DEVICE_FAMILY = "1,2"; 557 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Rest API.app/Rest API"; 558 | }; 559 | name = Release; 560 | }; 561 | F38FAA212459C47300599E54 /* Debug */ = { 562 | isa = XCBuildConfiguration; 563 | buildSettings = { 564 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 565 | CODE_SIGN_STYLE = Automatic; 566 | INFOPLIST_FILE = "Rest APIUITests/Info.plist"; 567 | LD_RUNPATH_SEARCH_PATHS = ( 568 | "$(inherited)", 569 | "@executable_path/Frameworks", 570 | "@loader_path/Frameworks", 571 | ); 572 | PRODUCT_BUNDLE_IDENTIFIER = "PancakesAtBreakfast.Rest-APIUITests"; 573 | PRODUCT_NAME = "$(TARGET_NAME)"; 574 | SWIFT_VERSION = 5.0; 575 | TARGETED_DEVICE_FAMILY = "1,2"; 576 | TEST_TARGET_NAME = "Rest API"; 577 | }; 578 | name = Debug; 579 | }; 580 | F38FAA222459C47300599E54 /* Release */ = { 581 | isa = XCBuildConfiguration; 582 | buildSettings = { 583 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 584 | CODE_SIGN_STYLE = Automatic; 585 | INFOPLIST_FILE = "Rest APIUITests/Info.plist"; 586 | LD_RUNPATH_SEARCH_PATHS = ( 587 | "$(inherited)", 588 | "@executable_path/Frameworks", 589 | "@loader_path/Frameworks", 590 | ); 591 | PRODUCT_BUNDLE_IDENTIFIER = "PancakesAtBreakfast.Rest-APIUITests"; 592 | PRODUCT_NAME = "$(TARGET_NAME)"; 593 | SWIFT_VERSION = 5.0; 594 | TARGETED_DEVICE_FAMILY = "1,2"; 595 | TEST_TARGET_NAME = "Rest API"; 596 | }; 597 | name = Release; 598 | }; 599 | /* End XCBuildConfiguration section */ 600 | 601 | /* Begin XCConfigurationList section */ 602 | F38FA9ED2459C47100599E54 /* Build configuration list for PBXProject "Rest API" */ = { 603 | isa = XCConfigurationList; 604 | buildConfigurations = ( 605 | F38FAA182459C47300599E54 /* Debug */, 606 | F38FAA192459C47300599E54 /* Release */, 607 | ); 608 | defaultConfigurationIsVisible = 0; 609 | defaultConfigurationName = Release; 610 | }; 611 | F38FAA1A2459C47300599E54 /* Build configuration list for PBXNativeTarget "Rest API" */ = { 612 | isa = XCConfigurationList; 613 | buildConfigurations = ( 614 | F38FAA1B2459C47300599E54 /* Debug */, 615 | F38FAA1C2459C47300599E54 /* Release */, 616 | ); 617 | defaultConfigurationIsVisible = 0; 618 | defaultConfigurationName = Release; 619 | }; 620 | F38FAA1D2459C47300599E54 /* Build configuration list for PBXNativeTarget "Rest APITests" */ = { 621 | isa = XCConfigurationList; 622 | buildConfigurations = ( 623 | F38FAA1E2459C47300599E54 /* Debug */, 624 | F38FAA1F2459C47300599E54 /* Release */, 625 | ); 626 | defaultConfigurationIsVisible = 0; 627 | defaultConfigurationName = Release; 628 | }; 629 | F38FAA202459C47300599E54 /* Build configuration list for PBXNativeTarget "Rest APIUITests" */ = { 630 | isa = XCConfigurationList; 631 | buildConfigurations = ( 632 | F38FAA212459C47300599E54 /* Debug */, 633 | F38FAA222459C47300599E54 /* Release */, 634 | ); 635 | defaultConfigurationIsVisible = 0; 636 | defaultConfigurationName = Release; 637 | }; 638 | /* End XCConfigurationList section */ 639 | }; 640 | rootObject = F38FA9EA2459C47100599E54 /* Project object */; 641 | } 642 | --------------------------------------------------------------------------------