Skip to content

Commit

Permalink
alow older version of watchOS
Browse files Browse the repository at this point in the history
  • Loading branch information
bwees committed Oct 2, 2024
1 parent 212b070 commit 8a94183
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
23 changes: 17 additions & 6 deletions targets/watch/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,24 @@ import SwiftUI
struct ContentView: View {
@StateObject var apiManager: APIManager = APIManager()
var body: some View {
NavigationStack {
RouteList()
if #available(watchOS 9, *) {
NavigationStack {
RouteList()
}
.onAppear(perform: {
apiManager.fetchData()
})
.environmentObject(apiManager)
} else {
NavigationView {
RouteList()
}
.navigationViewStyle(.stack)
.onAppear(perform: {
apiManager.fetchData()
})
.environmentObject(apiManager)
}
.onAppear(perform: {
apiManager.fetchData()
})
.environmentObject(apiManager)
}
}

2 changes: 1 addition & 1 deletion targets/watch/expo-target.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
type: "watch",
name: "Maroon Rides Watch App",
identifier: "com.bwees.reveille-rides.watch",
deploymentTarget: "9.0",
deploymentTarget: "8.7",
icon: "../../assets/icon.png",
frameworks: [
"SwiftUI"
Expand Down

0 comments on commit 8a94183

Please sign in to comment.