Skip to content

Commit

Permalink
Development to Main (#1)
Browse files Browse the repository at this point in the history
* Updates
- Adds some suggested changes
- Removes unnecessary comments
- Removes unnecessary import file on localization unit test
- Condenses/splits views into smaller chunks
- Updates Xcode version 14.0 to 15.3
- Adds english localization as they are not automatically generated
- Adds guard statement to prevent extra reloads on task modifiers
- Service and Network are now actors rather than classes

* Bug Fixes
- Fixes localization test not loading english localization file
- Fixes network server fail test by adding correct server response
- Fixes animation issue on main view by removing redundant state loading call in vm
- Fixes testMealFilter unit test by updating it's values
  • Loading branch information
NolanOfficial authored Jun 13, 2024
1 parent e633f63 commit e90e0b0
Show file tree
Hide file tree
Showing 26 changed files with 463 additions and 223 deletions.
6 changes: 3 additions & 3 deletions Cuisine.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objectVersion = 63;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -238,6 +238,7 @@
6A7D8CC42C138D91001764B9 /* Main */ = {
isa = PBXGroup;
children = (
6A7D8CC72C138DC9001764B9 /* View Model */,
6A8FFED02C13D12C00197258 /* Views */,
);
path = Main;
Expand Down Expand Up @@ -298,7 +299,6 @@
6A8FFED02C13D12C00197258 /* Views */ = {
isa = PBXGroup;
children = (
6A7D8CC72C138DC9001764B9 /* View Model */,
6AD4306A2C0F8080008BD892 /* MainView.swift */,
6A7D8CD32C13A08B001764B9 /* MealCategoryView.swift */,
6A7D8CD72C13A1F2001764B9 /* RecipeView.swift */,
Expand Down Expand Up @@ -513,7 +513,7 @@
};
};
buildConfigurationList = 6AD430602C0F8080008BD892 /* Build configuration list for PBXProject "Cuisine" */;
compatibilityVersion = "Xcode 14.0";
compatibilityVersion = "Xcode 15.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Expand Down
10 changes: 0 additions & 10 deletions Cuisine.xcodeproj/xcshareddata/xcschemes/Cuisine.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,6 @@
ReferencedContainer = "container:Cuisine.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "-AppleLanguages (en)"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-AppleLanguages (sv)"
isEnabled = "NO">
</CommandLineArgument>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
3 changes: 0 additions & 3 deletions Cuisine/Cache/ImageLoader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ class ImageLoader: ObservableObject {

private let imageCache = ImageCache()

/// Optional image to retrieve
@Published var image: UIImage?

/// Optional image error thrown
@Published var imageError: Error?

/// The URL to get or set
private var url: URL?

/// Initializes the cache retrieval from the given url
Expand Down
6 changes: 1 addition & 5 deletions Cuisine/Error Handling/MealError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@

import Foundation

/// Custom error for the Fetch API
/// Custom errors for the Fetch API
enum MealError: Error {

/// Invalid Url
case invalidUrl
/// Unknown error
case unknown

/// The title of the error
var title: String {
switch self {
case .invalidUrl:
Expand All @@ -25,7 +22,6 @@ enum MealError: Error {
}
}

/// A description of the error
var message: String {
switch self {
case .invalidUrl:
Expand Down
5 changes: 1 addition & 4 deletions Cuisine/Extensions/URLSession+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@ extension URLSession {
/// - Note: This could also be created within a custom network layer
/// (on top of the service layer)
static var cuisineConfiguration: URLSession {
// Custom url session config

let configuration = URLSessionConfiguration.default

// TCP
// (note: disabled since this needs to be enabled server side as well)
// configuration.multipathServiceType = .handover

// Wait for connectivity with timeout
configuration.waitsForConnectivity = true
configuration.timeoutIntervalForRequest = 15

// URL Cache
// Default capcity values but can increase
let memoryCapacity = 4 * 1024 * 1024 // 4 MB
let diskCapacity = 100 * 1024 * 1024 // 100 MB
Expand Down
Loading

0 comments on commit e90e0b0

Please sign in to comment.