Skip to content

Commit

Permalink
🔧 Using Xcode generated assets instead of SwiftGen
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkulman committed Nov 11, 2023
1 parent fce26ca commit ec76d53
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 145 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Test

on: [push]
env:
DEVELOPER_DIR: /Applications/Xcode_15.0.1.app/Contents/Developer

jobs:
job-test:
name: Run unit tests
runs-on: macOS-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v1

Expand Down
8 changes: 3 additions & 5 deletions Sources/iOSSampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
F3C5F35C2961E45000257080 /* AboutCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3C5F35B2961E45000257080 /* AboutCell.swift */; };
F3C5F35E2961EADD00257080 /* UIEdgeInsets+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3C5F35D2961EADD00257080 /* UIEdgeInsets+Extensions.swift */; };
F3C5F3632962C56300257080 /* FormFieldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3C5F3622962C56300257080 /* FormFieldView.swift */; };
F3C5F3652962CE6B00257080 /* Assets.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3C5F3642962CE6B00257080 /* Assets.swift */; };
F3C7CFDD2423AF4C003A961E /* URL+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3C7CFDC2423AF4C003A961E /* URL+Extensions.swift */; };
F3C8DB3B214EA1B700C1A654 /* DataServiceMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3C8DB3A214EA1B700C1A654 /* DataServiceMock.swift */; };
F3C8DB3D214EA1E700C1A654 /* SettingsServiceMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3C8DB3C214EA1E700C1A654 /* SettingsServiceMock.swift */; };
Expand Down Expand Up @@ -166,7 +165,6 @@
F3C5F35B2961E45000257080 /* AboutCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutCell.swift; sourceTree = "<group>"; };
F3C5F35D2961EADD00257080 /* UIEdgeInsets+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIEdgeInsets+Extensions.swift"; sourceTree = "<group>"; };
F3C5F3622962C56300257080 /* FormFieldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormFieldView.swift; sourceTree = "<group>"; };
F3C5F3642962CE6B00257080 /* Assets.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Assets.swift; sourceTree = "<group>"; };
F3C7CFDC2423AF4C003A961E /* URL+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+Extensions.swift"; sourceTree = "<group>"; };
F3C8DB3A214EA1B700C1A654 /* DataServiceMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataServiceMock.swift; sourceTree = "<group>"; };
F3C8DB3C214EA1E700C1A654 /* SettingsServiceMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsServiceMock.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -560,7 +558,6 @@
F3A813141F837EDD00A09AAB /* Resources */ = {
isa = PBXGroup;
children = (
F3C5F3642962CE6B00257080 /* Assets.swift */,
F3520E73206017000011EF40 /* Strings.swift */,
F3D9328221628CF900EA1E91 /* sk */,
F3D9328121628CF000EA1E91 /* en */,
Expand Down Expand Up @@ -702,7 +699,7 @@
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1500;
ORGANIZATIONNAME = "Igor Kulman";
TargetAttributes = {
F3208A791F84E48100B57B0E = {
Expand Down Expand Up @@ -867,7 +864,6 @@
F3A4B21F1FC4359A00787BCE /* AboutCoordinator.swift in Sources */,
F3651D26203C1B3A0082A73A /* SettingsService.swift in Sources */,
F3A812FE1F83791C00A09AAB /* UserDefaultsSettingsService.swift in Sources */,
F3C5F3652962CE6B00257080 /* Assets.swift in Sources */,
F3A812B81F83740E00A09AAB /* AppDelegate.swift in Sources */,
F38CD2371F83AEC70050056C /* UIScrollView+Extensions.swift in Sources */,
F3651D22203C1B0D0082A73A /* DataService.swift in Sources */,
Expand Down Expand Up @@ -1030,6 +1026,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
Expand Down Expand Up @@ -1091,6 +1088,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
126 changes: 0 additions & 126 deletions Sources/iOSSampleApp/Resources/Assets.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final class AboutViewController: UITableViewController {
}

private lazy var logoImageView: UIImageView = .init() &> {
$0.image = Asset.logo.image
$0.image = .logo
$0.contentMode = .scaleAspectFit
$0.fixSize(width: 48, height: 48)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ final class DetailViewController: UIViewController {
// MARK: - UI

private lazy var backBarButtonItem: UIBarButtonItem = .init() &> {
$0.image = Asset.back.image
$0.image = .back
$0.style = .plain
}

private lazy var forwardBarButtonItem: UIBarButtonItem = .init() &> {
$0.image = Asset.forward.image
$0.image = .forward
$0.style = .plain
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ final class FeedViewController: UIViewController, ToastCapable {
}

private lazy var setupButton: UIBarButtonItem = .init() &> {
$0.image = Asset.settings.image
$0.image = .settings
$0.style = .plain
}

private lazy var aboutButton: UIBarButtonItem = .init() &> {
$0.image = Asset.about.image
$0.image = .about
$0.style = .plain
$0.accessibilityIdentifier = "about"
}
Expand Down
8 changes: 1 addition & 7 deletions Sources/swiftgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@ strings:
inputs: iOSSampleApp/Resources/Base.lproj/Localizable.strings
outputs:
- templateName: structured-swift4
output: iOSSampleApp/Resources/Strings.swift

xcassets:
inputs: iOSSampleApp/Assets.xcassets
outputs:
templateName: swift5
output: iOSSampleApp/Resources/Assets.swift
output: iOSSampleApp/Resources/Strings.swift

0 comments on commit ec76d53

Please sign in to comment.