WIP
This commit is contained in:
@@ -33,7 +33,7 @@ struct ExerciseExercise: Codable, Hashable, Identifiable {
|
|||||||
let id: Int
|
let id: Int
|
||||||
let muscles: [ExerciseMuscle]
|
let muscles: [ExerciseMuscle]
|
||||||
let equipment: [ExerciseEquipment]
|
let equipment: [ExerciseEquipment]
|
||||||
let audioURL, videoURL, createdAt, updatedAt: String
|
let audioURL, videoURL, createdAt, updatedAt, nsfwVideoURL: String
|
||||||
let name, description, side: String
|
let name, description, side: String
|
||||||
let isTwoDumbbells, isTrackableDistance, isAlternating, isWeight: Bool
|
let isTwoDumbbells, isTrackableDistance, isAlternating, isWeight: Bool
|
||||||
let isDistance, isDuration, isReps: Bool
|
let isDistance, isDuration, isReps: Bool
|
||||||
@@ -59,5 +59,6 @@ struct ExerciseExercise: Codable, Hashable, Identifiable {
|
|||||||
case equipmentRequired = "equipment_required"
|
case equipmentRequired = "equipment_required"
|
||||||
case muscleGroups = "muscle_groups"
|
case muscleGroups = "muscle_groups"
|
||||||
case synonyms
|
case synonyms
|
||||||
|
case nsfwVideoURL = "nsfw_video_url"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import WatchConnectivity
|
import WatchConnectivity
|
||||||
|
import AVFoundation
|
||||||
|
|
||||||
enum WatchActions: Codable {
|
enum WatchActions: Codable {
|
||||||
case nextExercise
|
case nextExercise
|
||||||
@@ -125,6 +126,14 @@ class BridgeModule: NSObject, ObservableObject {
|
|||||||
let watchModel = WatchPackageModel(currentExerciseName: currentExercise?.exercise.name ?? "-", currentTimeLeft: currentExerciseTimeLeft, workoutStartDate: workoutStartDate ?? Date())
|
let watchModel = WatchPackageModel(currentExerciseName: currentExercise?.exercise.name ?? "-", currentTimeLeft: currentExerciseTimeLeft, workoutStartDate: workoutStartDate ?? Date())
|
||||||
let data = try! JSONEncoder().encode(watchModel)
|
let data = try! JSONEncoder().encode(watchModel)
|
||||||
send(data)
|
send(data)
|
||||||
|
|
||||||
|
if currentExerciseTimeLeft == 0 {
|
||||||
|
playFinished()
|
||||||
|
} else {
|
||||||
|
if currentExerciseTimeLeft < 4 {
|
||||||
|
playBeep()
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
nextExercise()
|
nextExercise()
|
||||||
}
|
}
|
||||||
@@ -166,6 +175,18 @@ class BridgeModule: NSObject, ObservableObject {
|
|||||||
completedWorkout?()
|
completedWorkout?()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func playBeep() {
|
||||||
|
#if os(iOS)
|
||||||
|
AudioServicesPlaySystemSound(SystemSoundID(1052))
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
func playFinished() {
|
||||||
|
#if os(iOS)
|
||||||
|
AudioServicesPlaySystemSound(SystemSoundID(1070))
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension BridgeModule: WCSessionDelegate {
|
extension BridgeModule: WCSessionDelegate {
|
||||||
|
|||||||
@@ -7,6 +7,6 @@
|
|||||||
workout history view
|
workout history view
|
||||||
-calorie upload
|
-calorie upload
|
||||||
|
|
||||||
video view on iphone during workout
|
-video view on iphone during workout
|
||||||
|
|
||||||
edit weights on workouts
|
edit weights on workouts
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ struct AccountView: View {
|
|||||||
@State var completedWorkouts: [CompletedWorkout]?
|
@State var completedWorkouts: [CompletedWorkout]?
|
||||||
@ObservedObject var userStore = UserStore.shared
|
@ObservedObject var userStore = UserStore.shared
|
||||||
@State var showCompletedWorkouts: Bool = false
|
@State var showCompletedWorkouts: Bool = false
|
||||||
|
@AppStorage("showNSFWVideos") private var showNSFWVideos = false
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
@@ -60,6 +61,8 @@ struct AccountView: View {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Divider()
|
||||||
|
Toggle("Show NSFW Videos", isOn: $showNSFWVideos)
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
Button("Logout", action: {
|
Button("Logout", action: {
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ import AVKit
|
|||||||
struct ExternalWorkoutDetailView: View {
|
struct ExternalWorkoutDetailView: View {
|
||||||
@StateObject var bridgeModule = BridgeModule.shared
|
@StateObject var bridgeModule = BridgeModule.shared
|
||||||
@State var avPlayer = AVPlayer(url: URL(string: "https://dev.werkout.fitness/media/exercise_videos/2_Dumbbell_Lateral_Lunges.mp4")!)
|
@State var avPlayer = AVPlayer(url: URL(string: "https://dev.werkout.fitness/media/exercise_videos/2_Dumbbell_Lateral_Lunges.mp4")!)
|
||||||
|
@AppStorage("showNSFWVideos") private var showNSFWVideos = false
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
if let workout = bridgeModule.currentWorkout {
|
if let workout = bridgeModule.currentWorkout {
|
||||||
@@ -23,7 +24,7 @@ struct ExternalWorkoutDetailView: View {
|
|||||||
|
|
||||||
ExtExerciseList(workout: workout,
|
ExtExerciseList(workout: workout,
|
||||||
currentExerciseIdx: bridgeModule.currentExerciseIdx)
|
currentExerciseIdx: bridgeModule.currentExerciseIdx)
|
||||||
.frame(width: metrics.size.width * 0.4, height: metrics.size.height * 0.8)
|
.frame(width: metrics.size.width * 0.3, height: metrics.size.height * 0.8)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,9 +39,16 @@ struct ExternalWorkoutDetailView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onChange(of: bridgeModule.currentExercise, perform: { newValue in
|
.onChange(of: bridgeModule.currentExercise, perform: { newValue in
|
||||||
if let viddd = newValue?.exercise.videoURL,
|
if showNSFWVideos {
|
||||||
let url = URL(string: BaseURLs.currentBaseURL + viddd) {
|
if let viddd = newValue?.exercise.nsfwVideoURL,
|
||||||
avPlayer = AVPlayer(url: url)
|
let url = URL(string: BaseURLs.currentBaseURL + viddd) {
|
||||||
|
avPlayer = AVPlayer(url: url)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if let viddd = newValue?.exercise.videoURL,
|
||||||
|
let url = URL(string: BaseURLs.currentBaseURL + viddd) {
|
||||||
|
avPlayer = AVPlayer(url: url)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
@@ -74,21 +82,35 @@ struct ExtExerciseList: View {
|
|||||||
var currentExerciseIdx: Int
|
var currentExerciseIdx: Int
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
List() {
|
ScrollViewReader { proxy in
|
||||||
ForEach(workout.exercisesSortedByCreated_at.indices, id: \.self) { i in
|
List() {
|
||||||
let obj = workout.exercisesSortedByCreated_at[i]
|
ForEach(workout.exercisesSortedByCreated_at.indices, id: \.self) { i in
|
||||||
HStack {
|
let obj = workout.exercisesSortedByCreated_at[i]
|
||||||
if i == currentExerciseIdx {
|
HStack {
|
||||||
Image(systemName: "checkmark")
|
if i == currentExerciseIdx {
|
||||||
|
Image(systemName: "checkmark")
|
||||||
|
.font(Font.system(size: 75))
|
||||||
|
.scaledToFit()
|
||||||
|
.minimumScaleFactor(0.01)
|
||||||
|
.lineLimit(1)
|
||||||
|
.foregroundColor(.green)
|
||||||
|
}
|
||||||
|
|
||||||
|
Text(obj.exercise.name)
|
||||||
.font(Font.system(size: 75))
|
.font(Font.system(size: 75))
|
||||||
.foregroundColor(.green)
|
.scaledToFit()
|
||||||
|
.minimumScaleFactor(0.01)
|
||||||
|
.lineLimit(1)
|
||||||
|
.padding()
|
||||||
|
.id(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
Text(obj.exercise.name)
|
|
||||||
.font(Font.system(size: 75))
|
|
||||||
.padding()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onChange(of: currentExerciseIdx, perform: { newValue in
|
||||||
|
withAnimation {
|
||||||
|
proxy.scrollTo(newValue, anchor: .top)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,32 +119,49 @@ struct ExtCountdownView: View {
|
|||||||
@StateObject var bridgeModule = BridgeModule.shared
|
@StateObject var bridgeModule = BridgeModule.shared
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
GeometryReader { metrics in
|
||||||
if let currenExercise = bridgeModule.currentExercise {
|
VStack {
|
||||||
HStack {
|
if let currenExercise = bridgeModule.currentExercise {
|
||||||
Text(currenExercise.exercise.name)
|
HStack {
|
||||||
.font(Font.system(size: 100))
|
Text(currenExercise.exercise.name)
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.font(.system(size: 200))
|
||||||
|
.scaledToFit()
|
||||||
|
.minimumScaleFactor(0.01)
|
||||||
|
.lineLimit(1)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
|
if bridgeModule.currentWorkoutRunTimeInSeconds > -1 {
|
||||||
|
Text("\(bridgeModule.currentWorkoutRunTimeInSeconds)")
|
||||||
|
.font(Font.system(size: 100))
|
||||||
|
.scaledToFit()
|
||||||
|
.minimumScaleFactor(0.01)
|
||||||
|
.lineLimit(1)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||||
|
.padding(.trailing, 100)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.frame(height: metrics.size.height * 0.5)
|
||||||
|
|
||||||
if bridgeModule.currentWorkoutRunTimeInSeconds > -1 {
|
HStack {
|
||||||
Text("\(bridgeModule.currentWorkoutRunTimeInSeconds)")
|
if let duration = currenExercise.duration {
|
||||||
.font(Font.system(size: 100))
|
ProgressView(value: Float(bridgeModule.currentExerciseTimeLeft), total: Float(duration))
|
||||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
.scaleEffect(x: 1, y: 6, anchor: .center)
|
||||||
.padding(.trailing, 100)
|
Text("\(bridgeModule.currentExerciseTimeLeft)")
|
||||||
}
|
.font(Font.system(size: 75))
|
||||||
}
|
.scaledToFit()
|
||||||
HStack {
|
.minimumScaleFactor(0.01)
|
||||||
if let duration = currenExercise.duration {
|
.lineLimit(1)
|
||||||
ProgressView(value: Float(bridgeModule.currentExerciseTimeLeft), total: Float(duration))
|
.padding([.leading, .trailing])
|
||||||
.scaleEffect(x: 1, y: 6, anchor: .center)
|
} else if let reps = currenExercise.reps {
|
||||||
Text("\(bridgeModule.currentExerciseTimeLeft)")
|
Text("\(reps)")
|
||||||
.font(Font.system(size: 75))
|
.font(Font.system(size: 75))
|
||||||
.padding([.leading, .trailing])
|
.scaledToFit()
|
||||||
} else if let reps = currenExercise.reps {
|
.minimumScaleFactor(0.01)
|
||||||
Text("\(reps)")
|
.lineLimit(1)
|
||||||
.font(Font.system(size: 75))
|
.padding([.leading, .trailing])
|
||||||
.padding([.leading, .trailing])
|
}
|
||||||
}
|
}
|
||||||
|
.frame(height: metrics.size.height * 0.5)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ struct VideoPlayerView: View {
|
|||||||
|
|
||||||
VideoPlayer(player: avPlayer)
|
VideoPlayer(player: avPlayer)
|
||||||
.onAppear{
|
.onAppear{
|
||||||
|
_ = try? AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback, mode: .default, options: .mixWithOthers)
|
||||||
|
|
||||||
avPlayer.play()
|
avPlayer.play()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,8 +40,13 @@ struct VideoPlayerView: View {
|
|||||||
.onReceive(pub) { (output) in
|
.onReceive(pub) { (output) in
|
||||||
avPlayer.pause()
|
avPlayer.pause()
|
||||||
avPlayer.seek(to: .zero)
|
avPlayer.seek(to: .zero)
|
||||||
|
_ = try? AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback, mode: .default, options: .mixWithOthers)
|
||||||
|
|
||||||
avPlayer.play()
|
avPlayer.play()
|
||||||
}
|
}
|
||||||
|
.onChange(of: avPlayer, perform: { newValue in
|
||||||
|
avPlayer.play()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,15 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import AVKit
|
||||||
|
|
||||||
struct WorkoutDetailView: View {
|
struct WorkoutDetailView: View {
|
||||||
@StateObject var viewModel: WorkoutDetailViewModel
|
@StateObject var viewModel: WorkoutDetailViewModel
|
||||||
var bridgeModule = BridgeModule.shared
|
@State var avPlayer = AVPlayer(url: URL(string: "https://dev.werkout.fitness/media/exercise_videos/2_Dumbbell_Lateral_Lunges.mp4")!)
|
||||||
|
|
||||||
|
@StateObject var bridgeModule = BridgeModule.shared
|
||||||
@Environment(\.dismiss) var dismiss
|
@Environment(\.dismiss) var dismiss
|
||||||
|
@AppStorage("showNSFWVideos") private var showNSFWVideos = false
|
||||||
|
|
||||||
enum Sheet: Identifiable {
|
enum Sheet: Identifiable {
|
||||||
case completedWorkout([String: Any])
|
case completedWorkout([String: Any])
|
||||||
@@ -28,11 +32,21 @@ struct WorkoutDetailView: View {
|
|||||||
Text("Loading")
|
Text("Loading")
|
||||||
case .showWorkout(let workout):
|
case .showWorkout(let workout):
|
||||||
VStack {
|
VStack {
|
||||||
|
if bridgeModule.isInWorkout {
|
||||||
|
HStack {
|
||||||
|
CurrentWorkoutElapsedTimeView()
|
||||||
|
CountdownView()
|
||||||
|
}
|
||||||
|
.padding()
|
||||||
|
|
||||||
|
GeometryReader { metrics in
|
||||||
|
WorkoutDetailVideoPlayerView(avPlayer: $avPlayer)
|
||||||
|
.frame(width: metrics.size.width * 1, height: metrics.size.height * 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
InfoView(workout: workout)
|
InfoView(workout: workout)
|
||||||
Divider()
|
Divider()
|
||||||
CurrentWorkoutElapsedTimeView()
|
.padding([.leading, .trailing])
|
||||||
.padding(.top)
|
|
||||||
CountdownView()
|
|
||||||
ExerciseListView(workout: workout)
|
ExerciseListView(workout: workout)
|
||||||
ActionsView(completedWorkout: {
|
ActionsView(completedWorkout: {
|
||||||
bridgeModule.completeWorkout()
|
bridgeModule.completeWorkout()
|
||||||
@@ -60,6 +74,19 @@ struct WorkoutDetailView: View {
|
|||||||
.interactiveDismissDisabled()
|
.interactiveDismissDisabled()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onChange(of: bridgeModule.currentExercise, perform: { newValue in
|
||||||
|
if showNSFWVideos {
|
||||||
|
if let viddd = newValue?.exercise.nsfwVideoURL,
|
||||||
|
let url = URL(string: BaseURLs.currentBaseURL + viddd) {
|
||||||
|
avPlayer = AVPlayer(url: url)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if let viddd = newValue?.exercise.videoURL,
|
||||||
|
let url = URL(string: BaseURLs.currentBaseURL + viddd) {
|
||||||
|
avPlayer = AVPlayer(url: url)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
.onAppear{
|
.onAppear{
|
||||||
bridgeModule.completedWorkout = {
|
bridgeModule.completedWorkout = {
|
||||||
if let workoutData = createWorkoutData() {
|
if let workoutData = createWorkoutData() {
|
||||||
@@ -68,6 +95,7 @@ struct WorkoutDetailView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func createWorkoutData() -> [String:Any]? {
|
func createWorkoutData() -> [String:Any]? {
|
||||||
@@ -90,6 +118,15 @@ struct WorkoutDetailView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct WorkoutDetailVideoPlayerView: View {
|
||||||
|
@ObservedObject var bridgeModule = BridgeModule.shared
|
||||||
|
@Binding var avPlayer: AVPlayer
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
VideoPlayerView(avPlayer: $avPlayer, showDoneButton: false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
struct InfoView: View {
|
struct InfoView: View {
|
||||||
@ObservedObject var bridgeModule = BridgeModule.shared
|
@ObservedObject var bridgeModule = BridgeModule.shared
|
||||||
var workout: Workout
|
var workout: Workout
|
||||||
@@ -209,43 +246,44 @@ struct ExerciseListView: View {
|
|||||||
@ObservedObject var bridgeModule = BridgeModule.shared
|
@ObservedObject var bridgeModule = BridgeModule.shared
|
||||||
var workout: Workout
|
var workout: Workout
|
||||||
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
List() {
|
List() {
|
||||||
ForEach(workout.exercisesSortedByCreated_at.indices, id: \.self) { i in
|
ForEach(workout.exercisesSortedByCreated_at.indices, id: \.self) { i in
|
||||||
let obj = workout.exercisesSortedByCreated_at[i]
|
let obj = workout.exercisesSortedByCreated_at[i]
|
||||||
VStack {
|
VStack {
|
||||||
HStack {
|
|
||||||
if i == bridgeModule.currentExerciseIdx {
|
|
||||||
Image(systemName: "checkmark")
|
|
||||||
.foregroundColor(.green)
|
|
||||||
}
|
|
||||||
|
|
||||||
Text(obj.exercise.name)
|
|
||||||
.onTapGesture {
|
|
||||||
bridgeModule.goToExerciseAt(index: i)
|
|
||||||
}
|
|
||||||
|
|
||||||
Spacer()
|
|
||||||
}
|
|
||||||
if i == bridgeModule.currentExerciseIdx {
|
|
||||||
HStack {
|
HStack {
|
||||||
if obj.exercise.isReps {
|
if i == bridgeModule.currentExerciseIdx {
|
||||||
Text("is reps")
|
Image(systemName: "checkmark")
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.foregroundColor(.green)
|
||||||
}
|
}
|
||||||
if obj.exercise.isWeight {
|
|
||||||
Text("is weight")
|
Text(obj.exercise.name)
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.onTapGesture {
|
||||||
}
|
bridgeModule.goToExerciseAt(index: i)
|
||||||
if obj.exercise.isDuration {
|
}
|
||||||
Text("is duration")
|
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
Spacer()
|
||||||
|
}
|
||||||
|
if i == bridgeModule.currentExerciseIdx {
|
||||||
|
HStack {
|
||||||
|
if obj.exercise.isReps {
|
||||||
|
Text("is reps")
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
}
|
||||||
|
if obj.exercise.isWeight {
|
||||||
|
Text("is weight")
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
}
|
||||||
|
if obj.exercise.isDuration {
|
||||||
|
Text("is duration")
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,12 +291,11 @@ struct CountdownView: View {
|
|||||||
@StateObject var bridgeModule = BridgeModule.shared
|
@StateObject var bridgeModule = BridgeModule.shared
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
if let duration = bridgeModule.currentExercise?.duration {
|
||||||
if let duration = bridgeModule.currentExercise?.duration {
|
HStack {
|
||||||
HStack {
|
ProgressView(value: Float(bridgeModule.currentExerciseTimeLeft), total: Float(duration))
|
||||||
ProgressView(value: Float(bridgeModule.currentExerciseTimeLeft), total: Float(duration))
|
Text("\(bridgeModule.currentExerciseTimeLeft)")
|
||||||
Text("\(bridgeModule.currentExerciseTimeLeft)")
|
.font(.body)
|
||||||
}.padding(16)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import Combine
|
import Combine
|
||||||
|
import AVKit
|
||||||
|
|
||||||
@main
|
@main
|
||||||
struct Werkout_iosApp: App {
|
struct Werkout_iosApp: App {
|
||||||
@@ -62,6 +63,7 @@ struct Werkout_iosApp: App {
|
|||||||
.tag(3)
|
.tag(3)
|
||||||
}
|
}
|
||||||
.onAppear{
|
.onAppear{
|
||||||
|
_ = try? AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback, mode: .default, options: .mixWithOthers)
|
||||||
// UserStore.shared.logout()
|
// UserStore.shared.logout()
|
||||||
}
|
}
|
||||||
.onReceive(pub) { (output) in
|
.onReceive(pub) { (output) in
|
||||||
|
|||||||
Reference in New Issue
Block a user