Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions AppExample/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
840CD68E2AC0E39D00C6AAD0 /* ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840CD68D2AC0E39D00C6AAD0 /* ExampleApp.swift */; };
840CD6902AC0E3A600C6AAD0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 840CD68F2AC0E3A600C6AAD0 /* Assets.xcassets */; };
840CD6932AC0E3A600C6AAD0 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 840CD6922AC0E3A600C6AAD0 /* Preview Assets.xcassets */; };
840CD6AF2AC0E44E00C6AAD0 /* Factory in Frameworks */ = {isa = PBXBuildFile; productRef = 840CD6AE2AC0E44E00C6AAD0 /* Factory */; };
840CD6B12AC0E6E200C6AAD0 /* Products.storekit in Resources */ = {isa = PBXBuildFile; fileRef = 840CD6B02AC0E6E200C6AAD0 /* Products.storekit */; };
84664C312BF9FD6400A24148 /* Example (watchOS) Watch App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 84664C302BF9FD6400A24148 /* Example (watchOS) Watch App.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
84664C362BF9FD6400A24148 /* Example__watchOS_App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84664C352BF9FD6400A24148 /* Example__watchOS_App.swift */; };
Expand All @@ -47,6 +46,7 @@
848479602BF9FFA4003FC3FC /* OversizeOnboardingKit in Frameworks */ = {isa = PBXBuildFile; productRef = 8484795F2BF9FFA4003FC3FC /* OversizeOnboardingKit */; };
848479622BF9FFA4003FC3FC /* OversizePhotoKit in Frameworks */ = {isa = PBXBuildFile; productRef = 848479612BF9FFA4003FC3FC /* OversizePhotoKit */; };
848479652BFA0E64003FC3FC /* TestView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848479642BFA0E64003FC3FC /* TestView.swift */; };
84A876512E129B0F00CC6DDA /* FactoryKit in Frameworks */ = {isa = PBXBuildFile; productRef = 84A876502E129B0F00CC6DDA /* FactoryKit */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -115,7 +115,7 @@
848479622BF9FFA4003FC3FC /* OversizePhotoKit in Frameworks */,
848479542BF9FFA4003FC3FC /* OversizeCalendarKit in Frameworks */,
8484795E2BF9FFA4003FC3FC /* OversizeNotificationKit in Frameworks */,
840CD6AF2AC0E44E00C6AAD0 /* Factory in Frameworks */,
84A876512E129B0F00CC6DDA /* FactoryKit in Frameworks */,
848479582BF9FFA4003FC3FC /* OversizeKit in Frameworks */,
8484795A2BF9FFA4003FC3FC /* OversizeLocationKit in Frameworks */,
8484795C2BF9FFA4003FC3FC /* OversizeNoticeKit in Frameworks */,
Expand Down Expand Up @@ -309,7 +309,6 @@
);
name = Example;
packageProductDependencies = (
840CD6AE2AC0E44E00C6AAD0 /* Factory */,
848479532BF9FFA4003FC3FC /* OversizeCalendarKit */,
848479552BF9FFA4003FC3FC /* OversizeContactsKit */,
848479572BF9FFA4003FC3FC /* OversizeKit */,
Expand All @@ -318,6 +317,7 @@
8484795D2BF9FFA4003FC3FC /* OversizeNotificationKit */,
8484795F2BF9FFA4003FC3FC /* OversizeOnboardingKit */,
848479612BF9FFA4003FC3FC /* OversizePhotoKit */,
84A876502E129B0F00CC6DDA /* FactoryKit */,
);
productName = Example;
productReference = 840CD6632AC0E39D00C6AAD0 /* Example.app */;
Expand Down Expand Up @@ -834,11 +834,6 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
840CD6AE2AC0E44E00C6AAD0 /* Factory */ = {
isa = XCSwiftPackageProductDependency;
package = 840CD6AD2AC0E44E00C6AAD0 /* XCRemoteSwiftPackageReference "Factory" */;
productName = Factory;
};
84664C462BF9FDC200A24148 /* Factory */ = {
isa = XCSwiftPackageProductDependency;
package = 840CD6AD2AC0E44E00C6AAD0 /* XCRemoteSwiftPackageReference "Factory" */;
Expand Down Expand Up @@ -908,6 +903,11 @@
isa = XCSwiftPackageProductDependency;
productName = OversizePhotoKit;
};
84A876502E129B0F00CC6DDA /* FactoryKit */ = {
isa = XCSwiftPackageProductDependency;
package = 840CD6AD2AC0E44E00C6AAD0 /* XCRemoteSwiftPackageReference "Factory" */;
productName = FactoryKit;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 840CD6592AC0E39D00C6AAD0 /* Project object */;
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion AppExample/Example/ExampleApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// ExampleApp.swift, created on 25.09.2023
//

import Factory
import FactoryKit
import OversizeKit
import OversizeServices
import OversizeUI
Expand Down
8 changes: 4 additions & 4 deletions AppExample/Example/Resources/AppConfig.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<string>romanov.cc</string>
<key>Email</key>
<string>[email protected]</string>
<key>Fecebook</key>
<key>Facebook</key>
<string></string>
<key>Telegram</key>
<string></string>
Expand Down Expand Up @@ -54,7 +54,7 @@
<dict>
<key>Onboarding</key>
<true/>
<key>Apperance</key>
<key>Appearance</key>
<true/>
<key>StoreKit</key>
<true/>
Expand All @@ -68,7 +68,7 @@
<false/>
<key>Notifications</key>
<false/>
<key>Lookscreen</key>
<key>Lockscreen</key>
<false/>
<key>Vibration</key>
<false/>
Expand All @@ -92,7 +92,7 @@
<dict>
<key>BlurMinimize</key>
<true/>
<key>Lookscreen</key>
<key>Lockscreen</key>
<true/>
</dict>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion AppExample/Example/Screens/Main/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// MainView.swift, created on 25.09.2023
//

import Factory
import FactoryKit
import OversizeKit
import OversizeLocalizable
import OversizeServices
Expand Down
2 changes: 1 addition & 1 deletion AppExample/Example/Screens/Onboarding/OnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// OnboardingView.swift, created on 25.09.2023
//

import Factory
import FactoryKit
import OversizeServices
import OversizeUI
import SwiftUI
Expand Down
19 changes: 11 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
import Foundation
import PackageDescription

let remoteDependencies: [PackageDescription.Package.Dependency] = [
let commonDependencies: [PackageDescription.Package.Dependency] = [
.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")),
.package(url: "https://github.com/hmlongco/Navigator.git", .upToNextMajor(from: "1.0.0")),
]

let remoteDependencies: [PackageDescription.Package.Dependency] = commonDependencies + [
.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")),
Expand All @@ -14,12 +20,10 @@ let remoteDependencies: [PackageDescription.Package.Dependency] = [
.package(url: "https://github.com/oversizedev/OversizeNetwork.git", .upToNextMajor(from: "1.0.0")),
.package(url: "https://github.com/oversizedev/OversizeModels.git", .upToNextMajor(from: "0.1.0")),
.package(url: "https://github.com/oversizedev/OversizeRouter.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/hmlongco/Navigator.git", .upToNextMajor(from: "1.0.0")),
.package(url: "https://github.com/oversizedev/OversizeNavigation.git", .upToNextMajor(from: "0.1.0")),
]

let localDependencies: [PackageDescription.Package.Dependency] = [
let localDependencies: [PackageDescription.Package.Dependency] = commonDependencies + [
.package(name: "OversizeUI", path: "../OversizeUI"),
.package(name: "OversizeServices", path: "../OversizeServices"),
.package(name: "OversizeLocalizable", path: "../OversizeLocalizable"),
Expand All @@ -29,9 +33,7 @@ let localDependencies: [PackageDescription.Package.Dependency] = [
.package(name: "OversizeNetwork", path: "../OversizeNetwork"),
.package(name: "OversizeModels", path: "../OversizeModels"),
.package(name: "OversizeRouter", path: "../OversizeRouter"),
.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")),
.package(url: "https://github.com/hmlongco/Navigator.git", .upToNextMajor(from: "1.0.0")),
.package(name: "OversizeNavigation", path: "../OversizeNavigation"),
]

let dependencies: [PackageDescription.Package.Dependency] = remoteDependencies
Expand Down Expand Up @@ -73,6 +75,7 @@ let package = Package(
.product(name: "FactoryKit", package: "Factory"),
.product(name: "CachedAsyncImage", package: "swiftui-cached-async-image"),
.product(name: "NavigatorUI", package: "Navigator"),
.product(name: "OversizeNavigation", package: "OversizeNavigation"),
]
),
.target(
Expand Down
121 changes: 119 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,120 @@
# OversizeModules
# OversizeKit

A description of this package.
[![Swift 6.0](https://img.shields.io/badge/Swift-6.0-orange.svg?style=flat)](https://swift.org)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/oversizedev/OversizeKit/blob/main/LICENSE)

**OversizeKit** is a comprehensive Swift package that provides a collection of high-level UI components, services, and utilities for building modern SwiftUI applications. It's designed to accelerate iOS, macOS, tvOS, and watchOS app development with pre-built, customizable components and powerful functionality.

## Features

- **Rich UI Components** - Pre-built SwiftUI components for rapid development
- **Modular Architecture** - Use only what you need with granular module imports
- **Multi-Platform Support** - iOS, macOS, tvOS, and watchOS compatibility
- **Powerful Services** - Network, storage, location, and notification services
- **Ready-to-Use Kits** - Calendar, contacts, photo, and onboarding functionality
- **Modern Swift** - Built with Swift 6.0 and latest SwiftUI features

## 🚀 Installation

### Swift Package Manager

Add OversizeKit to your project using Xcode or by adding it to your `Package.swift`:

```swift
dependencies: [
.package(url: "https://github.com/oversizedev/OversizeKit.git", .upToNextMajor(from: "2.4.2"))
]
```

Then add the specific modules you need to your target:

```swift
.target(
name: "YourApp",
dependencies: [
.product(name: "OversizeKit", package: "OversizeKit"),
.product(name: "OversizeCalendarKit", package: "OversizeKit"),
.product(name: "OversizeLocationKit", package: "OversizeKit"),
// Add other modules as needed
]
)
```

### Xcode Integration

1. Open your project in Xcode
2. Go to **File** → **Add Package Dependencies**
3. Enter the repository URL: `https://github.com/oversizedev/OversizeKit.git`
4. Select the modules you want to use
5. Click **Add Package**

## 🏃‍♂️ Quick Start

### Basic Setup

```swift
import SwiftUI
import OversizeKit

@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.appLaunch(onboarding: {
VStack {
Text("Welcome")
Button("Complete") {
appStateService.completedOnbarding()
}
}
})
}
}
}
```

## 🎯 Examples

### Example Application

Check out the complete example application in the [`AppExample`](./AppExample) directory. It demonstrates:

- Integration of multiple OversizeKit modules
- Best practices for app architecture
- Real-world usage scenarios
- Platform-specific implementations

## 📋 Requirements

### System Requirements

- **iOS**: 17.0+
- **macOS**: 14.0+
- **tvOS**: 17.0+
- **watchOS**: 10.0+

### Development Requirements

- **Xcode**: 16.4+
- **Swift**: 6.0+

### Dependencies

OversizeKit uses the following external dependencies:

- [Factory](https://github.com/hmlongco/Factory) - Dependency injection
- [Navigator](https://github.com/hmlongco/Navigator) - Advanced navigation
- [CachedAsyncImage](https://github.com/lorenzofiamingo/swiftui-cached-async-image) - Async image loading

## License

OversizeUI is released under the **MIT License**. See [LICENSE](LICENSE) for details.

---

<div align="center">

**Made with ❤️ by the Oversize**

</div>
4 changes: 2 additions & 2 deletions Sources/OversizeKit/AdsKit/AdView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public struct AdView: View {
public var body: some View {
switch viewModel.state {
case .initial:
VStack {}
EmptyView()
.task {
if !isPremium {
await viewModel.fetchAd()
Expand Down Expand Up @@ -86,7 +86,7 @@ public struct AdView: View {
.subheadline(.bold)
.onSurfacePrimaryForeground()

Bage(color: .warning) {
Badge(color: .warning) {
Text("Our app")
.bold()
}
Expand Down
81 changes: 81 additions & 0 deletions Sources/OversizeKit/DebugKit/DebugInfoView/DebugInfoView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
//
// Copyright © 2023 Alexander Romanov
// DebugInfoView.swift
//

import OversizeCore
import OversizeLocalizable
import OversizeNavigation
import OversizeServices
import OversizeUI
import SwiftUI

public struct DebugInfoView: View {
@StateObject private var viewModel = DebugInfoViewModel()

public init() {}

public var body: some View {
NavigationLayoutView("Information") {
contentView
} background: {
Color.backgroundSecondary
}
.toolbarTitleDisplayMode(.inline)
}

var contentView: some View {
LeadingVStack {
SectionView("App State") {
Row(
"App Run Count",
subtitle: "\(viewModel.appStateService.appRunCount) runs"
)
Separator()
Row(
"First Run Date",
subtitle: viewModel.appStateService.firstRunDate.formatted(date: .abbreviated, time: .standard)
)
Separator()
Row("Last Run Date",
subtitle: viewModel.appStateService.lastRunDate.formatted(date: .abbreviated, time: .standard))
Separator()
Row(
"App last Run Version",
subtitle: viewModel.appStateService.lastRunVersion
)
}
.sectionContentCompactRowMargins()
.rowContentMargins(.init(horizontal: .medium, vertical: .xxxSmall))

SectionView("Review") {
Row(
"App launches for review",
subtitle: "Current: \(viewModel.appStateService.appRunCount), next request after \(viewModel.nextLaunchReviewCount) launches"
)
Separator()
Row(
"Events to show review request count",
subtitle: "Current: \(viewModel.eventCount), next request after \(viewModel.nextEventReviewCount) events",
action: viewModel.onTapAddEvent
)
Separator()
Row(
"App Review banner closed date",
subtitle: viewModel.reviewBannerClosedDate.formatted(date: .abbreviated, time: .standard)
)
Separator()
Row(
"App Review estimate date",
subtitle: viewModel.reviewEstimateDate.formatted(date: .abbreviated, time: .standard)
)
}
.sectionContentCompactRowMargins()
.rowContentMargins(.init(horizontal: .medium, vertical: .xxxSmall))
}
}
}

#Preview {
DebugInfoView()
}
Loading