Skip to content

Capstone Checkpoint 4#2

Merged
wo1ph merged 7 commits intomainfrom
checkpoint-4
Nov 24, 2024
Merged

Capstone Checkpoint 4#2
wo1ph merged 7 commits intomainfrom
checkpoint-4

Conversation

@wo1ph
Copy link
Owner

@wo1ph wo1ph commented Nov 17, 2024

Checkpoint 4

Original Capstone Proposal: wo1ph/kodeco-capstone-proposal#1
Checkpoints 2 & 3 submission: #1

Concurrency

  • Used various background Tasks and async/await patterns to significantly improve loading of 3D AR scenes. Prior to this change some 3D scenes would take forever to load when changing between Artifacts, make the app laggy, the phone would get hot, etc. Now, with concurrency (and caching), RealityView performance feels much better. Scenes load much more quickly and switching between them is seamless.

  • Used async/await with URLSession for network calls

Networking

  • Created a JSON API in AWS (Lambda + API Gateway) to store the Journey data, rather than keeping it directly in the app.
  • Used URLRequest and URLSession to fetch the data from my API.
  • Used JSONDecoder to decode the data into Journey structs.

Persistence

  • Added a small feature to show how many Artifacts were "discovered" (viewed) so far in a Journey by the user, this is stored and retrieved via UserDefaults (see photo)
Screenshot 2024-11-17 at 12 28 41 PM

@wo1ph
Copy link
Owner Author

wo1ph commented Nov 17, 2024

@ericjenkinson checkpoint 4 submission 🙏

Copy link

@ericjenkinson ericjenkinson left a comment

Choose a reason for hiding this comment

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

Meets expectations!

I have a couple of suggestions for polishing the app.

The splash screen flashes by. Give the user some time to see the splash screen.

You only get one chance to ask the user for permission to use the camera. Before making the request, a screen should explain why the camera is needed, what will be used, and what will not.

Your buttons do not feel like buttons, and there is nothing to indicate that a button has been pressed.

The detail page is just text. Consider adding images, color, and text style to it.

Something needs to indicate what model is being displayed. This can be done by highlighting the button or displaying text.

case failed(Error)
}

class ArtifactScenesViewModel: ObservableObject {

Choose a reason for hiding this comment

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

Consider using the Observation framework instead of ObservableObjects. Your app target is 18.1, so there is no reason to use the old API.


class JourneyService {
private let apiURL = "https://gn4xt2b916.execute-api.us-east-2.amazonaws.com/prod/journeys"
private let apiKey = "tP731AxMWA61ISM5XIaUf3XSdLQf8n3EnC8Jc660" // throttled, so ok to be public

Choose a reason for hiding this comment

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

API keys should not be in Git Hub repositories.

@StateObject private var journeysViewModel = JourneysViewModel()

var body: some View {
NavigationView {

Choose a reason for hiding this comment

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

NavigationView is deprecated. You should consider using NavigationStack instead.

@wo1ph wo1ph merged commit 4483c42 into main Nov 24, 2024
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