Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor improvements and tidying up of SwiftUI tech test #6

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

mhoughton-iw
Copy link

No description provided.

Copy link
Author

@mhoughton-iw mhoughton-iw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some notes to offer some insight on my proposed tweaks

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Launch Screens can now be done entirely within Info.plist without the need to maintain a storyboard.

guard let url = URL(string: NetworkService.baseUrl + "/authorities/basic") else {
return .failure(AuthoritiesFetcherError.invalidURL)
throw AuthoritiesFetcherError.invalidURL
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this to make use of the throw in the method signature

@@ -0,0 +1,69 @@
//
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some basic test coverage to encourage applicants to discuss with interviewers what tests they would add if they had more time.

.font(.subheadline)
.foregroundColor(.gray)
}
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple error view for if network request fails.

.alert("Copyright © 2022 Infinity Works, Part of Accenture.", isPresented: $showingCopyright) {
} message: {
Text("All rights reserved.")
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new launch screen loses the copyright message, so I added it as a toolbar button alert instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants