NEW: Start my new Ultimate Portfolio App course with a free Hacking with Swift+ trial! >>

Hacking with watchOS: SwiftUI Edition Project 4

Forums > Books

@clc80  

I was following the book and then ran into a bit of an issue during the selecting favorite currencies part. The book says to open Project4App.swift and make changes except my files don't have anything that looks like the code in the book. I have something similar named HostingController.swift but the code looks like this

import WatchKit
import Foundation
import SwiftUI

class HostingController: WKHostingController<ContentView> {
    override var body: ContentView {
        return ContentView()
    }
}

where the book has

@main
struct Project4RemakeApp: App {
    var body: some Scene {
        WindowGroup {
            NavigationView {
                ContentView()
            }
        }
    }
}

Is this where I should make the changes on what file to be the first one that gets opened up when the program launches?

   

Hacking with Swift is sponsored by RevenueCat

SPONSORED Building and maintaining in-app subscription infrastructure is hard. Luckily there's a better way. With RevenueCat, you can implement subscriptions for your app in hours, not months, so you can get back to building your app.

Try it for free

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.