Skip to content

Commit

Permalink
Update components
Browse files Browse the repository at this point in the history
# Conflicts:
#	.swiftpm/xcode/package.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
#	.swiftpm/xcode/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist
  • Loading branch information
aromanov91 committed Mar 15, 2024
1 parent 25945a1 commit d030d6b
Show file tree
Hide file tree
Showing 38 changed files with 683 additions and 262 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
branches:
- 'main'
workflow_dispatch:

jobs:

build-swiftpm:
name: Build SwiftPM
uses: oversizedev/GithubWorkflows/.github/workflows/build-swiftpm.yml@main
Expand All @@ -19,10 +19,14 @@ jobs:
build-example:
name: Build Example
needs: build-swiftpm
uses: oversizedev/GithubWorkflows/.github/workflows/build-ios-app.yml@main
uses: oversizedev/GithubWorkflows/.github/workflows/build-app.yml@main
strategy:
matrix:
destination: ['platform=iOS Simulator,name=iPhone 15 Pro,OS=17.2', 'platform=iOS Simulator,name=iPad Pro (12.9-inch) (6th generation),OS=17.2']
with:
folder: AppExample
app: Example
path: AppExample/Example
scheme: Example
destination: ${{ matrix.destination }}
secrets: inherit

# tests:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/ci-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ jobs:
build-example:
name: Build Example
needs: build-swiftpm
uses: oversizedev/GithubWorkflows/.github/workflows/build-ios-app.yml@main
uses: oversizedev/GithubWorkflows/.github/workflows/build-app.yml@main
strategy:
matrix:
destination: ['platform=iOS Simulator,name=iPhone 15 Pro,OS=17.2', 'platform=iOS Simulator,name=iPad Pro (12.9-inch) (6th generation),OS=17.2']
with:
folder: AppExample
app: Example
path: AppExample/Example
scheme: Example
destination: ${{ matrix.destination }}
secrets: inherit

# tests:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
Package.resolved
.swiftpm
xcuserdata/
DerivedData/
/.swiftpm
DerivedData/
/AppExample/Example.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>OversizeAdsKit.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>OversizeKit-Package.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
</dict>
<key>OversizeKitTests.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>13</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>OversizeAdsKit</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>OversizeCalendarKit</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>OversizeContactsKit</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>OversizeKit</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>OversizeKitTests</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>OversizeLocationKit</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>OversizeNoticeKit</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>OversizeNotificationKit</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>OversizeOnboardingKit</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>OversizePhotoKit</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
24 changes: 17 additions & 7 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 */; };
840CD69C2AC0E43000C6AAD0 /* OversizeAdsKit in Frameworks */ = {isa = PBXBuildFile; productRef = 840CD69B2AC0E43000C6AAD0 /* OversizeAdsKit */; };
840CD69E2AC0E43000C6AAD0 /* OversizeCalendarKit in Frameworks */ = {isa = PBXBuildFile; productRef = 840CD69D2AC0E43000C6AAD0 /* OversizeCalendarKit */; };
840CD6A02AC0E43000C6AAD0 /* OversizeContactsKit in Frameworks */ = {isa = PBXBuildFile; productRef = 840CD69F2AC0E43000C6AAD0 /* OversizeContactsKit */; };
840CD6A22AC0E43000C6AAD0 /* OversizeKit in Frameworks */ = {isa = PBXBuildFile; productRef = 840CD6A12AC0E43000C6AAD0 /* OversizeKit */; };
Expand All @@ -33,6 +32,7 @@
840CD6AC2AC0E43000C6AAD0 /* OversizePhotoKit in Frameworks */ = {isa = PBXBuildFile; productRef = 840CD6AB2AC0E43000C6AAD0 /* OversizePhotoKit */; };
840CD6AF2AC0E44E00C6AAD0 /* Factory in Frameworks */ = {isa = PBXBuildFile; productRef = 840CD6AE2AC0E44E00C6AAD0 /* Factory */; };
840CD6B12AC0E6E200C6AAD0 /* Products.storekit in Resources */ = {isa = PBXBuildFile; fileRef = 840CD6B02AC0E6E200C6AAD0 /* Products.storekit */; };
845A59332BA4FD2B00988D52 /* OversizeModels in Frameworks */ = {isa = PBXBuildFile; productRef = 845A59322BA4FD2B00988D52 /* OversizeModels */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -69,10 +69,10 @@
840CD6AF2AC0E44E00C6AAD0 /* Factory in Frameworks */,
840CD69E2AC0E43000C6AAD0 /* OversizeCalendarKit in Frameworks */,
840CD6A82AC0E43000C6AAD0 /* OversizeNotificationKit in Frameworks */,
840CD69C2AC0E43000C6AAD0 /* OversizeAdsKit in Frameworks */,
840CD6A22AC0E43000C6AAD0 /* OversizeKit in Frameworks */,
840CD6A42AC0E43000C6AAD0 /* OversizeLocationKit in Frameworks */,
840CD6A62AC0E43000C6AAD0 /* OversizeNoticeKit in Frameworks */,
845A59332BA4FD2B00988D52 /* OversizeModels in Frameworks */,
840CD6A02AC0E43000C6AAD0 /* OversizeContactsKit in Frameworks */,
840CD6AA2AC0E43000C6AAD0 /* OversizeOnboardingKit in Frameworks */,
);
Expand Down Expand Up @@ -206,7 +206,6 @@
);
name = Example;
packageProductDependencies = (
840CD69B2AC0E43000C6AAD0 /* OversizeAdsKit */,
840CD69D2AC0E43000C6AAD0 /* OversizeCalendarKit */,
840CD69F2AC0E43000C6AAD0 /* OversizeContactsKit */,
840CD6A12AC0E43000C6AAD0 /* OversizeKit */,
Expand All @@ -216,6 +215,7 @@
840CD6A92AC0E43000C6AAD0 /* OversizeOnboardingKit */,
840CD6AB2AC0E43000C6AAD0 /* OversizePhotoKit */,
840CD6AE2AC0E44E00C6AAD0 /* Factory */,
845A59322BA4FD2B00988D52 /* OversizeModels */,
);
productName = Example;
productReference = 840CD6632AC0E39D00C6AAD0 /* Example.app */;
Expand Down Expand Up @@ -248,6 +248,7 @@
packageReferences = (
840CD69A2AC0E43000C6AAD0 /* XCLocalSwiftPackageReference ".." */,
840CD6AD2AC0E44E00C6AAD0 /* XCRemoteSwiftPackageReference "Factory" */,
845A59312BA4FD2B00988D52 /* XCRemoteSwiftPackageReference "OversizeModels" */,
);
productRefGroup = 840CD6642AC0E39D00C6AAD0 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -515,13 +516,17 @@
minimumVersion = 2.2.0;
};
};
845A59312BA4FD2B00988D52 /* XCRemoteSwiftPackageReference "OversizeModels" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/oversizedev/OversizeModels.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.1.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
840CD69B2AC0E43000C6AAD0 /* OversizeAdsKit */ = {
isa = XCSwiftPackageProductDependency;
productName = OversizeAdsKit;
};
840CD69D2AC0E43000C6AAD0 /* OversizeCalendarKit */ = {
isa = XCSwiftPackageProductDependency;
productName = OversizeCalendarKit;
Expand Down Expand Up @@ -559,6 +564,11 @@
package = 840CD6AD2AC0E44E00C6AAD0 /* XCRemoteSwiftPackageReference "Factory" */;
productName = Factory;
};
845A59322BA4FD2B00988D52 /* OversizeModels */ = {
isa = XCSwiftPackageProductDependency;
package = 845A59312BA4FD2B00988D52 /* XCRemoteSwiftPackageReference "OversizeModels" */;
productName = OversizeModels;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 840CD6592AC0E39D00C6AAD0 /* Project object */;
Expand Down
Binary file not shown.
2 changes: 2 additions & 0 deletions AppExample/Example/Resources/Products.storekit
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
],
"settings" : {
"_failTransactionsEnabled" : false,
"_locale" : "en_US",
"_storefront" : "USA",
"_storeKitErrors" : [
{
"current" : null,
Expand Down
1 change: 1 addition & 0 deletions AppExample/Example/Router/Alerts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import OversizeLocalizable
import OversizeServices
import SwiftUI
import OversizeModels

enum RootAlert: Identifiable {
case dismiss(_ action: () -> Void)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ struct AppSettingsView: View {
Image(systemName: "")
}
.rowArrow()

.multilineTextAlignment(.leading)
}
.buttonStyle(.row)
Expand Down
22 changes: 7 additions & 15 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// swift-tools-version: 5.7
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import Foundation
import PackageDescription

let productionDependencies: [PackageDescription.Package.Dependency] = [
Expand All @@ -14,6 +15,7 @@ let productionDependencies: [PackageDescription.Package.Dependency] = [
.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/GetStream/effects-library.git", .upToNextMajor(from: "1.0.0")),
]

let developmentDependencies: [PackageDescription.Package.Dependency] = [
Expand All @@ -27,8 +29,11 @@ let developmentDependencies: [PackageDescription.Package.Dependency] = [
.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")),
.package(url: "https://github.com/GetStream/effects-library.git", .upToNextMajor(from: "1.0.0")),
]

let isProductionDependencies = ProcessInfo.processInfo.environment["RELEASE_DEPENDENCIES"] == "TRUE"

let package = Package(
name: "OversizeKit",
platforms: [
Expand All @@ -39,7 +44,6 @@ let package = Package(
],
products: [
.library(name: "OversizeKit", targets: ["OversizeKit"]),
.library(name: "OversizeAdsKit", targets: ["OversizeAdsKit"]),
.library(name: "OversizeOnboardingKit", targets: ["OversizeOnboardingKit"]),
.library(name: "OversizeNoticeKit", targets: ["OversizeNoticeKit"]),
.library(name: "OversizeCalendarKit", targets: ["OversizeCalendarKit"]),
Expand All @@ -65,19 +69,7 @@ let package = Package(
.product(name: "OversizeNetwork", package: "OversizeNetwork"),
.product(name: "Factory", package: "Factory"),
.product(name: "CachedAsyncImage", package: "swiftui-cached-async-image"),
]
),
.target(
name: "OversizeAdsKit",
dependencies: [
"OversizeKit",
.product(name: "Factory", package: "Factory"),
.product(name: "OversizeUI", package: "OversizeUI"),
.product(name: "OversizeServices", package: "OversizeServices"),
.product(name: "CachedAsyncImage", package: "swiftui-cached-async-image"),
.product(name: "OversizeCore", package: "OversizeCore"),
.product(name: "OversizeNetwork", package: "OversizeNetwork"),
.product(name: "OversizeModels", package: "OversizeModels"),
.product(name: "EffectsLibrary", package: "effects-library"),
]
),
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeCalendarKit/Pickers/AlertPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public struct AlarmPicker: View {
}
}
}
.surfaceContentRowInsets()
.surfaceContentRowMargins()
}
.backgroundSecondary()
.leadingBar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import CachedAsyncImage
import OversizeCore
import OversizeKit
import OversizeModels
import OversizeNetwork
import OversizeServices
Expand Down Expand Up @@ -50,33 +49,35 @@ public struct AdView: View {
}
}

func premiumBanner(appAd: Components.Schemas.AppShort) -> some View {
func premiumBanner(appAd: Components.Schemas.Ad) -> some View {
HStack(spacing: .zero) {
CachedAsyncImage(url: URL(string: "\(Info.links?.company.cdnString ?? "")/assets/apps/\(appAd.address)/icon.png"), urlCache: .imageCache, content: {
$0
.resizable()
.frame(width: 64, height: 64)
.mask(RoundedRectangle(cornerRadius: .large,
style: .continuous))
.overlay(
RoundedRectangle(cornerRadius: 16,
style: .continuous)
.stroke(lineWidth: 1)
.opacity(0.15)
)
.onTapGesture {
isShowProduct.toggle()
}
if let iconUrl = appAd.iconURL, let url = URL(string: iconUrl) {
CachedAsyncImage(url: url, urlCache: .imageCache, content: {
$0
.resizable()
.frame(width: 64, height: 64)
.mask(RoundedRectangle(cornerRadius: .large,
style: .continuous))
.overlay(
RoundedRectangle(cornerRadius: 16,
style: .continuous)
.stroke(lineWidth: 1)
.opacity(0.15)
)
.onTapGesture {
isShowProduct.toggle()
}

}, placeholder: {
RoundedRectangle(cornerRadius: .large, style: .continuous)
.fillSurfaceSecondary()
.frame(width: 64, height: 64)
})
}, placeholder: {
RoundedRectangle(cornerRadius: .large, style: .continuous)
.fillSurfaceSecondary()
.frame(width: 64, height: 64)
})
}

VStack(alignment: .leading, spacing: .xxxSmall) {
HStack {
Text(appAd.name)
Text(appAd.title)
.subheadline(.bold)
.onSurfaceHighEmphasisForegroundColor()

Expand All @@ -86,7 +87,7 @@ public struct AdView: View {
}
}

Text(appAd.title)
Text(appAd.description)
.subheadline()
.onSurfaceMediumEmphasisForegroundColor()
}
Expand Down
Loading

0 comments on commit d030d6b

Please sign in to comment.