diff --git a/.github/workflows/ci-pull-request.yml b/.github/workflows/ci-pull-request.yml index 9f95d31..a1b5635 100644 --- a/.github/workflows/ci-pull-request.yml +++ b/.github/workflows/ci-pull-request.yml @@ -25,8 +25,8 @@ jobs: app: Example secrets: inherit - tests: - name: Test - needs: build-example - uses: oversizedev/GithubWorkflows/.github/workflows/test.yml@main - secrets: inherit +# tests: +# name: Test +# needs: build-example +# uses: oversizedev/GithubWorkflows/.github/workflows/test.yml@main +# secrets: inherit diff --git a/.github/workflows/ci-push.yml b/.github/workflows/ci-push.yml index 6b87fe1..77334fe 100644 --- a/.github/workflows/ci-push.yml +++ b/.github/workflows/ci-push.yml @@ -7,17 +7,8 @@ on: jobs: - build-example: - name: Build Example - uses: oversizedev/GithubWorkflows/.github/workflows/build-ios-app.yml@main - with: - folder: AppExample - app: Example - secrets: inherit - build-swiftpm: name: Build SwiftPM - needs: build-example uses: oversizedev/GithubWorkflows/.github/workflows/build-swiftpm.yml@main strategy: matrix: @@ -25,16 +16,25 @@ jobs: with: package: ${{ matrix.packages }} secrets: inherit - - tests: - name: Test + + build-example: + name: Build Example needs: build-swiftpm - uses: oversizedev/GithubWorkflows/.github/workflows/test.yml@main + uses: oversizedev/GithubWorkflows/.github/workflows/build-ios-app.yml@main + with: + folder: AppExample + app: Example secrets: inherit + +# tests: +# name: Test +# needs: build-example +# uses: oversizedev/GithubWorkflows/.github/workflows/test.yml@main +# secrets: inherit bump: name: Bump version - needs: tests + needs: build-example uses: oversizedev/GithubWorkflows/.github/workflows/bump.yml@main secrets: inherit diff --git a/AppExample/Example/ExampleApp.swift b/AppExample/Example/ExampleApp.swift index 498cb60..0b518ba 100644 --- a/AppExample/Example/ExampleApp.swift +++ b/AppExample/Example/ExampleApp.swift @@ -1,7 +1,7 @@ // // Copyright © 2023 Alexander Romanov // ExampleApp.swift, created on 25.09.2023 -// +// import Factory import OversizeKit @@ -11,12 +11,11 @@ import SwiftUI @main struct ExampleApp: App { - @Injected(\.appStateService) var appStateService: AppStateService @ObservedObject private var router = Router() @StateObject private var appSettingsViewModel = AppSettingsViewModel() let pub = NotificationCenter.default.publisher(for: NSNotification.Name("Deeplink")) - + var body: some Scene { WindowGroup { TabView(selection: $router.tab) { diff --git a/AppExample/Example/Router/Alerts.swift b/AppExample/Example/Router/Alerts.swift index 7d97763..b216f7c 100644 --- a/AppExample/Example/Router/Alerts.swift +++ b/AppExample/Example/Router/Alerts.swift @@ -1,7 +1,7 @@ // // Copyright © 2023 Alexander Romanov // Alerts.swift, created on 25.09.2023 -// +// import OversizeLocalizable import OversizeServices diff --git a/AppExample/Example/Router/Router.swift b/AppExample/Example/Router/Router.swift index e359b20..3bbf5fd 100644 --- a/AppExample/Example/Router/Router.swift +++ b/AppExample/Example/Router/Router.swift @@ -1,13 +1,12 @@ // // Copyright © 2023 Alexander Romanov // Router.swift, created on 25.09.2023 -// +// import SwiftUI @MainActor final class Router: ObservableObject { - // Route and Tabs @Published var mainPath: [Screen] = [] @Published var secondaryPath: [Screen] = [] diff --git a/AppExample/Example/Router/Screens.swift b/AppExample/Example/Router/Screens.swift index db98182..0335d8d 100644 --- a/AppExample/Example/Router/Screens.swift +++ b/AppExample/Example/Router/Screens.swift @@ -1,7 +1,7 @@ // // Copyright © 2023 Alexander Romanov // Screens.swift, created on 25.09.2023 -// +// import OversizeComponents import OversizeKit diff --git a/AppExample/Example/Router/Tabs.swift b/AppExample/Example/Router/Tabs.swift index cadcacf..5ecbe73 100644 --- a/AppExample/Example/Router/Tabs.swift +++ b/AppExample/Example/Router/Tabs.swift @@ -1,7 +1,7 @@ // // Copyright © 2023 Alexander Romanov // Tabs.swift, created on 25.09.2023 -// +// import SwiftUI @@ -41,7 +41,7 @@ public enum RootTab: String { return "Settings" } } - + var image: Image { switch self { case .main: diff --git a/AppExample/Example/Screens/AppSettings/AppSettingsPageView.swift b/AppExample/Example/Screens/AppSettings/AppSettingsPageView.swift index f5d6dfe..f6cb489 100644 --- a/AppExample/Example/Screens/AppSettings/AppSettingsPageView.swift +++ b/AppExample/Example/Screens/AppSettings/AppSettingsPageView.swift @@ -1,7 +1,7 @@ // // Copyright © 2023 Alexander Romanov // AppSettingsPageView.swift, created on 25.09.2023 -// +// import OversizeUI import SwiftUI diff --git a/AppExample/Example/Screens/AppSettings/AppSettingsPageViewModel.swift b/AppExample/Example/Screens/AppSettings/AppSettingsPageViewModel.swift index 820bc81..4608fb6 100644 --- a/AppExample/Example/Screens/AppSettings/AppSettingsPageViewModel.swift +++ b/AppExample/Example/Screens/AppSettings/AppSettingsPageViewModel.swift @@ -1,7 +1,7 @@ // // Copyright © 2023 Alexander Romanov // AppSettingsPageViewModel.swift, created on 25.09.2023 -// +// import SwiftUI diff --git a/AppExample/Example/Screens/AppSettings/AppSettingsView.swift b/AppExample/Example/Screens/AppSettings/AppSettingsView.swift index 679db07..625e930 100644 --- a/AppExample/Example/Screens/AppSettings/AppSettingsView.swift +++ b/AppExample/Example/Screens/AppSettings/AppSettingsView.swift @@ -1,7 +1,7 @@ // // Copyright © 2023 Alexander Romanov // AppSettingsView.swift, created on 25.09.2023 -// +// import OversizeUI import SwiftUI diff --git a/AppExample/Example/Screens/AppSettings/AppSettingsViewModel.swift b/AppExample/Example/Screens/AppSettings/AppSettingsViewModel.swift index 64065f9..783d4ec 100644 --- a/AppExample/Example/Screens/AppSettings/AppSettingsViewModel.swift +++ b/AppExample/Example/Screens/AppSettings/AppSettingsViewModel.swift @@ -1,7 +1,7 @@ // // Copyright © 2023 Alexander Romanov // AppSettingsViewModel.swift, created on 25.09.2023 -// +// import Foundation import SwiftUI diff --git a/AppExample/Example/Screens/Main/MainView.swift b/AppExample/Example/Screens/Main/MainView.swift index 835ffad..38db6a3 100644 --- a/AppExample/Example/Screens/Main/MainView.swift +++ b/AppExample/Example/Screens/Main/MainView.swift @@ -1,7 +1,7 @@ // // Copyright © 2023 Alexander Romanov // MainView.swift, created on 25.09.2023 -// +// import Factory import OversizeKit @@ -11,7 +11,6 @@ import OversizeUI import SwiftUI struct MainView: View { - @Injected(\.appStateService) var appStateService: AppStateService @Environment(\.screenSize) var screenSize @EnvironmentObject var router: Router @@ -25,7 +24,6 @@ struct MainView: View { var body: some View { Text("Hello, Oversize Kit!") } - } struct MainView_Previews: PreviewProvider { diff --git a/AppExample/Example/Screens/Main/MainViewModel.swift b/AppExample/Example/Screens/Main/MainViewModel.swift index dee89aa..f59a613 100644 --- a/AppExample/Example/Screens/Main/MainViewModel.swift +++ b/AppExample/Example/Screens/Main/MainViewModel.swift @@ -1,11 +1,9 @@ // // Copyright © 2023 Alexander Romanov // MainViewModel.swift, created on 25.09.2023 -// +// import SwiftUI @MainActor -class MainViewModel: ObservableObject { - -} +class MainViewModel: ObservableObject {} diff --git a/AppExample/Example/Screens/Onboarding/OnboardingView.swift b/AppExample/Example/Screens/Onboarding/OnboardingView.swift index 3767f1d..c3b89b6 100644 --- a/AppExample/Example/Screens/Onboarding/OnboardingView.swift +++ b/AppExample/Example/Screens/Onboarding/OnboardingView.swift @@ -1,12 +1,12 @@ // // Copyright © 2023 Alexander Romanov // OnboardingView.swift, created on 25.09.2023 -// +// +import Factory import OversizeServices import OversizeUI import SwiftUI -import Factory struct OnboardingView: View { @Injected(\.appStateService) var appStateService: AppStateService diff --git a/Package.swift b/Package.swift index 0b2cac8..be0790f 100644 --- a/Package.swift +++ b/Package.swift @@ -3,19 +3,20 @@ import PackageDescription -let productionDependencies: [PackageDescription.Package.Dependency] = { [ +let productionDependencies: [PackageDescription.Package.Dependency] = [ .package(url: "https://github.com/oversizedev/OversizeUI.git", .upToNextMajor(from: "3.0.2")), .package(url: "https://github.com/oversizedev/OversizeCore.git", .upToNextMajor(from: "1.3.0")), .package(url: "https://github.com/oversizedev/OversizeServices.git", .upToNextMajor(from: "1.4.0")), .package(url: "https://github.com/oversizedev/OversizeLocalizable.git", .upToNextMajor(from: "1.4.0")), .package(url: "https://github.com/oversizedev/OversizeComponents.git", .upToNextMajor(from: "1.2.0")), .package(url: "https://github.com/oversizedev/OversizeResources.git", .upToNextMajor(from: "2.0.0")), + .package(url: "https://github.com/oversizedev/OversizeNetwork.git", .upToNextMajor(from: "0.4.0")), + .package(url: "https://github.com/oversizedev/OversizeModels.git", .upToNextMajor(from: "0.1.0")), .package(url: "https://github.com/hmlongco/Factory.git", .upToNextMajor(from: "2.1.3")), .package(url: "https://github.com/lorenzofiamingo/swiftui-cached-async-image.git", .upToNextMajor(from: "2.1.1")), - .package(url: "https://github.com/oversizedev/OversizeNetwork.git", .upToNextMajor(from: "0.4.0")) -] }() +] -let developmentDependencies: [PackageDescription.Package.Dependency] = { [ +let developmentDependencies: [PackageDescription.Package.Dependency] = [ .package(name: "OversizeUI", path: "../OversizeUI"), .package(name: "OversizeServices", path: "../OversizeServices"), .package(name: "OversizeLocalizable", path: "../OversizeLocalizable"), @@ -23,15 +24,16 @@ let developmentDependencies: [PackageDescription.Package.Dependency] = { [ .package(name: "OversizeComponents", path: "../OversizeComponents"), .package(name: "OversizeResources", path: "../OversizeResources"), .package(name: "OversizeNetwork", path: "../OversizeNetwork"), + .package(name: "OversizeModels", path: "../OversizeModels"), .package(url: "https://github.com/lorenzofiamingo/swiftui-cached-async-image.git", .upToNextMajor(from: "2.1.1")), .package(url: "https://github.com/hmlongco/Factory.git", .upToNextMajor(from: "2.1.3")), -] }() +] let package = Package( name: "OversizeKit", platforms: [ .iOS(.v15), - .macOS(.v12), + .macOS(.v13), .tvOS(.v15), .watchOS(.v9), ], @@ -59,6 +61,7 @@ let package = Package( .product(name: "OversizeLocalizable", package: "OversizeLocalizable"), .product(name: "OversizeResources", package: "OversizeResources"), .product(name: "OversizeNotificationService", package: "OversizeServices"), + .product(name: "OversizeModels", package: "OversizeModels"), .product(name: "OversizeNetwork", package: "OversizeNetwork"), .product(name: "Factory", package: "Factory"), .product(name: "CachedAsyncImage", package: "swiftui-cached-async-image"), @@ -74,6 +77,7 @@ let package = Package( .product(name: "CachedAsyncImage", package: "swiftui-cached-async-image"), .product(name: "OversizeCore", package: "OversizeCore"), .product(name: "OversizeNetwork", package: "OversizeNetwork"), + .product(name: "OversizeModels", package: "OversizeModels"), ] ), .target( @@ -86,6 +90,7 @@ let package = Package( .product(name: "OversizeCalendarService", package: "OversizeServices"), .product(name: "OversizeLocationService", package: "OversizeServices"), .product(name: "Factory", package: "Factory"), + .product(name: "OversizeModels", package: "OversizeModels"), ] ), .target( @@ -97,15 +102,16 @@ let package = Package( .product(name: "OversizeContactsService", package: "OversizeServices"), .product(name: "OversizeCalendarService", package: "OversizeServices"), .product(name: "Factory", package: "Factory"), + .product(name: "OversizeModels", package: "OversizeModels"), ] ), .target( name: "OversizeLocationKit", dependencies: [ .product(name: "OversizeUI", package: "OversizeUI"), - .product(name: "OversizeServices", package: "OversizeServices"), .product(name: "OversizeLocationService", package: "OversizeServices"), .product(name: "Factory", package: "Factory"), + .product(name: "OversizeModels", package: "OversizeModels"), ] ), .target( @@ -130,7 +136,7 @@ let package = Package( dependencies: [ "OversizeKit", .product(name: "OversizeUI", package: "OversizeUI"), - .product(name: "OversizeServices", package: "OversizeServices"), + .product(name: "OversizeModels", package: "OversizeModels"), .product(name: "OversizeNotificationService", package: "OversizeServices"), .product(name: "Factory", package: "Factory"), ] diff --git a/Sources/OversizeAdsKit/AdView.swift b/Sources/OversizeAdsKit/AdView.swift index 4a41716..8417c99 100644 --- a/Sources/OversizeAdsKit/AdView.swift +++ b/Sources/OversizeAdsKit/AdView.swift @@ -6,6 +6,7 @@ import CachedAsyncImage import OversizeCore import OversizeKit +import OversizeModels import OversizeNetwork import OversizeServices import OversizeUI @@ -30,7 +31,7 @@ public struct AdView: View { await viewModel.fetchAd() } } - case let .result(appAd) : + case let .result(appAd): #if os(iOS) Surface { isShowProduct.toggle() diff --git a/Sources/OversizeAdsKit/AdViewModel.swift b/Sources/OversizeAdsKit/AdViewModel.swift index 5beacfe..a17cbf0 100644 --- a/Sources/OversizeAdsKit/AdViewModel.swift +++ b/Sources/OversizeAdsKit/AdViewModel.swift @@ -4,6 +4,7 @@ // import Factory +import OversizeModels import OversizeNetwork import OversizeServices import SwiftUI diff --git a/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventView.swift b/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventView.swift index b8bd69b..a4937e5 100644 --- a/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventView.swift +++ b/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventView.swift @@ -9,7 +9,7 @@ import OversizeCalendarService import OversizeComponents import OversizeCore import OversizeLocalizable -import OversizeServices +import OversizeModels import OversizeUI import SwiftUI diff --git a/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewModel.swift b/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewModel.swift index 96b5472..a7f3335 100644 --- a/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewModel.swift +++ b/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewModel.swift @@ -8,7 +8,7 @@ import Factory import OversizeCalendarService import OversizeCore import OversizeLocationService -import OversizeServices +import OversizeModels import SwiftUI public enum CreateEventType: Equatable { diff --git a/Sources/OversizeContactsKit/AttendeesList/AttendeesView.swift b/Sources/OversizeContactsKit/AttendeesList/AttendeesView.swift index 6b88b86..3125879 100644 --- a/Sources/OversizeContactsKit/AttendeesList/AttendeesView.swift +++ b/Sources/OversizeContactsKit/AttendeesList/AttendeesView.swift @@ -10,7 +10,6 @@ import OversizeContactsService import OversizeCore import OversizeKit import OversizeLocalizable -import OversizeServices import OversizeUI import SwiftUI diff --git a/Sources/OversizeContactsKit/AttendeesList/AttendeesViewModel.swift b/Sources/OversizeContactsKit/AttendeesList/AttendeesViewModel.swift index 4b9fc71..3b06806 100644 --- a/Sources/OversizeContactsKit/AttendeesList/AttendeesViewModel.swift +++ b/Sources/OversizeContactsKit/AttendeesList/AttendeesViewModel.swift @@ -8,7 +8,7 @@ import EventKit import Factory import OversizeContactsService import OversizeCore -import OversizeServices +import OversizeModels import SwiftUI @MainActor diff --git a/Sources/OversizeContactsKit/ContactsLists/ContactsListsView.swift b/Sources/OversizeContactsKit/ContactsLists/ContactsListsView.swift index ed8e600..b8c79a9 100644 --- a/Sources/OversizeContactsKit/ContactsLists/ContactsListsView.swift +++ b/Sources/OversizeContactsKit/ContactsLists/ContactsListsView.swift @@ -8,7 +8,6 @@ import OversizeComponents import OversizeCore import OversizeKit import OversizeLocalizable -import OversizeServices import OversizeUI import SwiftUI diff --git a/Sources/OversizeContactsKit/ContactsLists/ContactsListsViewModel.swift b/Sources/OversizeContactsKit/ContactsLists/ContactsListsViewModel.swift index f1cac90..bed0d93 100644 --- a/Sources/OversizeContactsKit/ContactsLists/ContactsListsViewModel.swift +++ b/Sources/OversizeContactsKit/ContactsLists/ContactsListsViewModel.swift @@ -7,7 +7,7 @@ import Contacts import Factory import OversizeContactsService import OversizeCore -import OversizeServices +import OversizeModels import SwiftUI @MainActor diff --git a/Sources/OversizeContactsKit/ContactsPicker/EmailPickerView.swift b/Sources/OversizeContactsKit/ContactsPicker/EmailPickerView.swift index 971c271..b06c7ca 100644 --- a/Sources/OversizeContactsKit/ContactsPicker/EmailPickerView.swift +++ b/Sources/OversizeContactsKit/ContactsPicker/EmailPickerView.swift @@ -6,7 +6,6 @@ import Contacts import OversizeKit import OversizeLocalizable -import OversizeServices import OversizeUI import SwiftUI diff --git a/Sources/OversizeContactsKit/ContactsPicker/EmailPickerViewModel.swift b/Sources/OversizeContactsKit/ContactsPicker/EmailPickerViewModel.swift index b4241e4..8bbe16b 100644 --- a/Sources/OversizeContactsKit/ContactsPicker/EmailPickerViewModel.swift +++ b/Sources/OversizeContactsKit/ContactsPicker/EmailPickerViewModel.swift @@ -7,7 +7,7 @@ import Contacts import Factory import OversizeContactsService import OversizeCore -import OversizeServices +import OversizeModels import SwiftUI @MainActor diff --git a/Sources/OversizeKit/LauncherKit/Launcher.swift b/Sources/OversizeKit/LauncherKit/Launcher.swift index f2bfced..3b87866 100644 --- a/Sources/OversizeKit/LauncherKit/Launcher.swift +++ b/Sources/OversizeKit/LauncherKit/Launcher.swift @@ -7,7 +7,6 @@ import OversizeCore import OversizeLocalizable import OversizeServices import OversizeUI -// import SDWebImageSVGCoder import SwiftUI public struct Launcher: View { @@ -37,7 +36,7 @@ public struct Launcher: View { .task { await viewModel.checkPremium() } - .fullScreenCover(item: $viewModel.activeFullScreenSheet) { + .appLaunchCover(item: $viewModel.activeFullScreenSheet) { fullScreenCover(sheet: $0) .systemServices() } @@ -138,6 +137,19 @@ public extension View { } } +private extension View { + func appLaunchCover( + item: Binding, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> some View + ) -> some View where Item: Identifiable { + #if os(macOS) + interactiveDismissDisabled() + .sheet(item: item, onDismiss: onDismiss, content: content) + #else + fullScreenCover(item: item, onDismiss: onDismiss, content: content) + #endif + } +} + struct LockscreenView_Previews: PreviewProvider { static var previews: some View { Launcher { diff --git a/Sources/OversizeKit/SettingsKit/Views/About/About/AboutView.swift b/Sources/OversizeKit/SettingsKit/Views/About/About/AboutView.swift index bf4b853..d506acc 100644 --- a/Sources/OversizeKit/SettingsKit/Views/About/About/AboutView.swift +++ b/Sources/OversizeKit/SettingsKit/Views/About/About/AboutView.swift @@ -21,7 +21,7 @@ import SwiftUI @Environment(\.presentationMode) var presentationMode @Environment(\.screenSize) var screenSize @Environment(\.iconStyle) var iconStyle: IconStyle - + @StateObject var viewModel: AboutViewModel public init() { @@ -94,16 +94,16 @@ import SwiftUI } private func appLinks() -> some View { - return ScrollView(.horizontal, showsIndicators: false) { + ScrollView(.horizontal, showsIndicators: false) { HStack(alignment: .top, spacing: Space.small) { switch viewModel.state { case .initial, .loading: - ForEach(0...6, id: \.self) { _ in + ForEach(0 ... 6, id: \.self) { _ in RoundedRectangle(cornerRadius: .large, style: .continuous) .fillSurfaceSecondary() .frame(width: 74, height: 74) } - case .result(let apps, _): + case let .result(apps, _): ForEach(apps, id: \.appStoreId) { app in Button { isPresentStoreProduct = true @@ -118,16 +118,16 @@ import SwiftUI .overlay( RoundedRectangle(cornerRadius: 16, style: .continuous) - .stroke(lineWidth: 1) - .opacity(0.15) + .stroke(lineWidth: 1) + .opacity(0.15) ) - + }, placeholder: { RoundedRectangle(cornerRadius: .large, style: .continuous) .fillSurfaceSecondary() .frame(width: 74, height: 74) }) - + Text(app.name) .caption(.medium) .multilineTextAlignment(.center) @@ -141,8 +141,7 @@ import SwiftUI case .error: EmptyView() } - - + if let authorAllApps = Info.url.developerAllApps { VStack(spacing: .xSmall) { Link(destination: authorAllApps) { @@ -150,11 +149,11 @@ import SwiftUI RoundedRectangle(cornerRadius: 16, style: .continuous) .foregroundColor(.surfaceSecondary) .frame(width: 74, height: 74) - + IconDeprecated(.externalLink) } } - + Text("All apps") .caption(.medium) .multilineTextAlignment(.center) @@ -162,12 +161,12 @@ import SwiftUI .frame(width: 74) } } - + }.padding(.horizontal, .medium) } .padding(.bottom, 16) } - + var list: some View { VStack(spacing: .zero) { image @@ -328,7 +327,7 @@ import SwiftUI // Link(destination: linkUrl) { // HStack { // Spacer() -// +// // CachedAsyncImage(url: iconUrl, urlCache: .imageCache, scale: scale) { // $0 // .resizable() @@ -340,7 +339,7 @@ import SwiftUI // .frame(width: 24, height: 24) // } // .offset(y: -(offset * -0.04)) -// +// // Spacer() // } // } @@ -349,9 +348,7 @@ import SwiftUI // case .error: // EmptyView() // } - - - + if let facebook = Info.url.companyFacebook { Link(destination: facebook) { // Surface { diff --git a/Sources/OversizeKit/SettingsKit/Views/About/About/AboutViewModel.swift b/Sources/OversizeKit/SettingsKit/Views/About/About/AboutViewModel.swift index ee5ec3c..00b9693 100644 --- a/Sources/OversizeKit/SettingsKit/Views/About/About/AboutViewModel.swift +++ b/Sources/OversizeKit/SettingsKit/Views/About/About/AboutViewModel.swift @@ -4,13 +4,13 @@ // import Factory +import OversizeModels import OversizeNetwork import OversizeServices import SwiftUI @MainActor public class AboutViewModel: ObservableObject { - @Injected(\.networkService) var networkService @Published var state: AboutViewModel.State = State.initial @@ -22,7 +22,7 @@ public class AboutViewModel: ObservableObject { async let resultInfo = networkService.fetchInfo() if case let .success(apps) = await resultApps, case let .success(info) = await resultInfo { state = .result(apps.filter { $0.appStoreId != Info.app.appStoreID }, info) - + } else { state = .error(.network(type: .noResponse)) } diff --git a/Sources/OversizeKit/StoreKit/StoreScreen/ViewModel/StoreViewModel.swift b/Sources/OversizeKit/StoreKit/StoreScreen/ViewModel/StoreViewModel.swift index ff710d3..00dddcb 100644 --- a/Sources/OversizeKit/StoreKit/StoreScreen/ViewModel/StoreViewModel.swift +++ b/Sources/OversizeKit/StoreKit/StoreScreen/ViewModel/StoreViewModel.swift @@ -6,6 +6,7 @@ import Factory import OversizeCore import OversizeLocalizable +import OversizeModels import OversizeNotificationService import OversizeServices import OversizeStoreService diff --git a/Sources/OversizeKit/StoreKit/Views/StoreFeatureDetailView.swift b/Sources/OversizeKit/StoreKit/Views/StoreFeatureDetailView.swift index 19f18cd..d0ff026 100644 --- a/Sources/OversizeKit/StoreKit/Views/StoreFeatureDetailView.swift +++ b/Sources/OversizeKit/StoreKit/Views/StoreFeatureDetailView.swift @@ -6,22 +6,23 @@ import CachedAsyncImage import OversizeComponents import OversizeCore +import OversizeModels import OversizeServices import OversizeUI import SwiftUI -struct StoreFeatureDetailView: View { +public struct StoreFeatureDetailView: View { @EnvironmentObject var viewModel: StoreViewModel @State var selection: PlistConfiguration.Store.StoreFeature @Environment(\.screenSize) var screenSize @Environment(\.dismiss) var dismiss @Environment(\.isPremium) var isPremium - init(selection: PlistConfiguration.Store.StoreFeature) { + public init(selection: PlistConfiguration.Store.StoreFeature) { _selection = State(initialValue: selection) } - var body: some View { + public var body: some View { GeometryReader { geometry in #if os(iOS) VStack(spacing: .zero) { diff --git a/Sources/OversizeKit/StoreKit/Views/StoreFeaturesLargeView.swift b/Sources/OversizeKit/StoreKit/Views/StoreFeaturesLargeView.swift index 58a4b53..0668344 100644 --- a/Sources/OversizeKit/StoreKit/Views/StoreFeaturesLargeView.swift +++ b/Sources/OversizeKit/StoreKit/Views/StoreFeaturesLargeView.swift @@ -5,6 +5,7 @@ import CachedAsyncImage import OversizeComponents +import OversizeModels import OversizeServices import OversizeUI import SwiftUI diff --git a/Sources/OversizeKit/StoreKit/Views/StoreFeaturesView.swift b/Sources/OversizeKit/StoreKit/Views/StoreFeaturesView.swift index a8abf62..a0c895b 100644 --- a/Sources/OversizeKit/StoreKit/Views/StoreFeaturesView.swift +++ b/Sources/OversizeKit/StoreKit/Views/StoreFeaturesView.swift @@ -4,6 +4,7 @@ // import OversizeCore +import OversizeModels import OversizeServices import OversizeUI import SwiftUI diff --git a/Sources/OversizeKit/SystemKit/ErrorView/ErrorView.swift b/Sources/OversizeKit/SystemKit/ErrorView/ErrorView.swift index 10b3274..b7d6082 100644 --- a/Sources/OversizeKit/SystemKit/ErrorView/ErrorView.swift +++ b/Sources/OversizeKit/SystemKit/ErrorView/ErrorView.swift @@ -4,7 +4,7 @@ // import OversizeLocalizable -import OversizeServices +import OversizeModels import OversizeUI import SwiftUI diff --git a/Sources/OversizeLocationKit/AddressPicker/AddressPickerViewModel.swift b/Sources/OversizeLocationKit/AddressPicker/AddressPickerViewModel.swift index 239478c..92e6fd5 100644 --- a/Sources/OversizeLocationKit/AddressPicker/AddressPickerViewModel.swift +++ b/Sources/OversizeLocationKit/AddressPicker/AddressPickerViewModel.swift @@ -8,7 +8,7 @@ import CoreLocation import Factory import MapKit import OversizeLocationService -import OversizeServices +import OversizeModels import SwiftUI @MainActor diff --git a/Sources/OversizeNotificationKit/LocalNotificationSetScreenViewModel.swift b/Sources/OversizeNotificationKit/LocalNotificationSetScreenViewModel.swift index b78293a..be6e46c 100644 --- a/Sources/OversizeNotificationKit/LocalNotificationSetScreenViewModel.swift +++ b/Sources/OversizeNotificationKit/LocalNotificationSetScreenViewModel.swift @@ -5,8 +5,8 @@ import Factory import OversizeCore +import OversizeModels import OversizeNotificationService -import OversizeServices import SwiftUI @MainActor