From faceab5d005484282455ab0440fca371ac3dc634 Mon Sep 17 00:00:00 2001 From: David Robles Date: Wed, 1 Dec 2021 10:01:06 -0800 Subject: [PATCH 1/4] Fix public headers path for ObjC SwiftPM target --- CHTCollectionViewWaterfallLayout.podspec | 2 +- Package.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHTCollectionViewWaterfallLayout.podspec b/CHTCollectionViewWaterfallLayout.podspec index 0571f53..8222d07 100644 --- a/CHTCollectionViewWaterfallLayout.podspec +++ b/CHTCollectionViewWaterfallLayout.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "CHTCollectionViewWaterfallLayout" - s.version = "0.9.9" + s.version = "0.9.10" s.summary = "The waterfall (i.e., Pinterest-like) layout for UICollectionView." s.homepage = "https://github.com/chiahsien/CHTCollectionViewWaterfallLayout" s.screenshots = "https://raw.github.com/chiahsien/UICollectionViewWaterfallLayout/master/Screenshots/2-columns.png" diff --git a/Package.swift b/Package.swift index ad72232..3629336 100644 --- a/Package.swift +++ b/Package.swift @@ -26,7 +26,7 @@ let package = Package( "CHTCollectionViewWaterfallLayout.h", "CHTCollectionViewWaterfallLayout.m" ], - publicHeadersPath: "Source" + publicHeadersPath: "." ) ], swiftLanguageVersions: [.v5] From 2ff10e55af6e0ee966a89b3e662f0c3af0de575e Mon Sep 17 00:00:00 2001 From: David Robles Date: Thu, 2 Dec 2021 11:58:57 -0800 Subject: [PATCH 2/4] Add CHTCollectionViewWaterfallLayout as a Swift Package to Swift demo app --- .github/workflows/CI.yml | 8 + .../project.pbxproj | 142 +++++++++++++++++- .../xcschemes/CHTWaterfallSwiftDemo.xcscheme | 78 ++++++++++ .../CHTWaterfallSwiftSPMDemo.xcscheme | 78 ++++++++++ ...plist => CHTWaterfallSwiftDemo-Info.plist} | 0 .../CHTWaterfallSwiftSPMDemo-Info.plist | 47 ++++++ .../ViewController.swift | 3 + 7 files changed, 349 insertions(+), 7 deletions(-) create mode 100644 Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftDemo.xcscheme create mode 100644 Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftSPMDemo.xcscheme rename Demo/Swift/CHTWaterfallSwiftDemo/{Info.plist => CHTWaterfallSwiftDemo-Info.plist} (100%) create mode 100644 Demo/Swift/CHTWaterfallSwiftDemo/CHTWaterfallSwiftSPMDemo-Info.plist diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index be4c6aa..42fbcc4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,6 +29,14 @@ jobs: destination: name=iPhone 13 Pro action: build + - name: Build Swift SPM Project + uses: sersoft-gmbh/xcodebuild-action@v1.8.0 + with: + project: Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj + scheme: CHTWaterfallSwiftSPMDemo + destination: name=iPhone 13 Pro + action: build + - name: Build Objective-C Project uses: sersoft-gmbh/xcodebuild-action@v1.8.0 with: diff --git a/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/project.pbxproj b/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/project.pbxproj index cf9e906..ca11c96 100644 --- a/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/project.pbxproj +++ b/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -16,12 +16,21 @@ 62C270031ABE01D70027F8D4 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62C270021ABE01D70027F8D4 /* Model.swift */; }; 62C270061ABE01E70027F8D4 /* ImageUICollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62C270041ABE01E70027F8D4 /* ImageUICollectionViewCell.swift */; }; 62C270071ABE01E70027F8D4 /* ImageUICollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 62C270051ABE01E70027F8D4 /* ImageUICollectionViewCell.xib */; }; + A561128927595AE500D4F206 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62C270021ABE01D70027F8D4 /* Model.swift */; }; + A561128A27595AE500D4F206 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62C270001ABE01BA0027F8D4 /* ViewController.swift */; }; + A561128B27595AE500D4F206 /* ImageUICollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62C270041ABE01E70027F8D4 /* ImageUICollectionViewCell.swift */; }; + A561128C27595AE500D4F206 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62C26FDE1ABE01840027F8D4 /* AppDelegate.swift */; }; + A561129027595AE500D4F206 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 62C26FFE1ABE01B20027F8D4 /* Main.storyboard */; }; + A561129127595AE500D4F206 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 62C26FE71ABE01840027F8D4 /* LaunchScreen.xib */; }; + A561129227595AE500D4F206 /* ImageUICollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 62C270051ABE01E70027F8D4 /* ImageUICollectionViewCell.xib */; }; + A561129327595AE500D4F206 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 62C26FE51ABE01840027F8D4 /* Images.xcassets */; }; + A561129B27595BAC00D4F206 /* CHTCollectionViewWaterfallLayout in Frameworks */ = {isa = PBXBuildFile; productRef = A561129A27595BAC00D4F206 /* CHTCollectionViewWaterfallLayout */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 52FADF3C1CB650DC0097FB12 /* CHTCollectionViewWaterfallLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CHTCollectionViewWaterfallLayout.swift; path = ../../Source/CHTCollectionViewWaterfallLayout.swift; sourceTree = SOURCE_ROOT; }; 62C26FD91ABE01840027F8D4 /* CHTWaterfallSwiftDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CHTWaterfallSwiftDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 62C26FDD1ABE01840027F8D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 62C26FDD1ABE01840027F8D4 /* CHTWaterfallSwiftDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CHTWaterfallSwiftDemo-Info.plist"; sourceTree = ""; }; 62C26FDE1ABE01840027F8D4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 62C26FE51ABE01840027F8D4 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 62C26FE81ABE01840027F8D4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; @@ -30,6 +39,9 @@ 62C270021ABE01D70027F8D4 /* Model.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = ""; }; 62C270041ABE01E70027F8D4 /* ImageUICollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageUICollectionViewCell.swift; sourceTree = ""; }; 62C270051ABE01E70027F8D4 /* ImageUICollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ImageUICollectionViewCell.xib; sourceTree = ""; }; + A561128627595AB200D4F206 /* CHTCollectionViewWaterfallLayout */ = {isa = PBXFileReference; lastKnownFileType = folder; name = CHTCollectionViewWaterfallLayout; path = ../..; sourceTree = ""; }; + A561129727595AE500D4F206 /* CHTWaterfallSwiftSPMDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CHTWaterfallSwiftSPMDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A561129827595AE600D4F206 /* CHTWaterfallSwiftSPMDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CHTWaterfallSwiftSPMDemo-Info.plist"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -40,6 +52,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A561128E27595AE500D4F206 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A561129B27595BAC00D4F206 /* CHTCollectionViewWaterfallLayout in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -54,8 +74,10 @@ 62C26FD01ABE01840027F8D4 = { isa = PBXGroup; children = ( + A561128627595AB200D4F206 /* CHTCollectionViewWaterfallLayout */, 62C26FDB1ABE01840027F8D4 /* CHTWaterfallSwiftDemo */, 62C26FDA1ABE01840027F8D4 /* Products */, + A561129927595BAC00D4F206 /* Frameworks */, ); sourceTree = ""; }; @@ -63,6 +85,7 @@ isa = PBXGroup; children = ( 62C26FD91ABE01840027F8D4 /* CHTWaterfallSwiftDemo.app */, + A561129727595AE500D4F206 /* CHTWaterfallSwiftSPMDemo.app */, ); name = Products; sourceTree = ""; @@ -87,11 +110,19 @@ 62C26FDC1ABE01840027F8D4 /* Supporting Files */ = { isa = PBXGroup; children = ( - 62C26FDD1ABE01840027F8D4 /* Info.plist */, + 62C26FDD1ABE01840027F8D4 /* CHTWaterfallSwiftDemo-Info.plist */, + A561129827595AE600D4F206 /* CHTWaterfallSwiftSPMDemo-Info.plist */, ); name = "Supporting Files"; sourceTree = ""; }; + A561129927595BAC00D4F206 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -112,6 +143,26 @@ productReference = 62C26FD91ABE01840027F8D4 /* CHTWaterfallSwiftDemo.app */; productType = "com.apple.product-type.application"; }; + A561128727595AE500D4F206 /* CHTWaterfallSwiftSPMDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = A561129427595AE500D4F206 /* Build configuration list for PBXNativeTarget "CHTWaterfallSwiftSPMDemo" */; + buildPhases = ( + A561128827595AE500D4F206 /* Sources */, + A561128E27595AE500D4F206 /* Frameworks */, + A561128F27595AE500D4F206 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CHTWaterfallSwiftSPMDemo; + packageProductDependencies = ( + A561129A27595BAC00D4F206 /* CHTCollectionViewWaterfallLayout */, + ); + productName = CHTWaterfallSwiftDemo; + productReference = A561129727595AE500D4F206 /* CHTWaterfallSwiftSPMDemo.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -143,6 +194,7 @@ projectRoot = ""; targets = ( 62C26FD81ABE01840027F8D4 /* CHTWaterfallSwiftDemo */, + A561128727595AE500D4F206 /* CHTWaterfallSwiftSPMDemo */, ); }; /* End PBXProject section */ @@ -159,6 +211,17 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A561128F27595AE500D4F206 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A561129027595AE500D4F206 /* Main.storyboard in Resources */, + A561129127595AE500D4F206 /* LaunchScreen.xib in Resources */, + A561129227595AE500D4F206 /* ImageUICollectionViewCell.xib in Resources */, + A561129327595AE500D4F206 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -174,6 +237,17 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A561128827595AE500D4F206 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A561128927595AE500D4F206 /* Model.swift in Sources */, + A561128A27595AE500D4F206 /* ViewController.swift in Sources */, + A561128B27595AE500D4F206 /* ImageUICollectionViewCell.swift in Sources */, + A561128C27595AE500D4F206 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ @@ -298,8 +372,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - INFOPLIST_FILE = CHTWaterfallSwiftDemo/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + INFOPLIST_FILE = "CHTWaterfallSwiftDemo/CHTWaterfallSwiftDemo-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.sophiefader.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -311,14 +388,49 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - INFOPLIST_FILE = CHTWaterfallSwiftDemo/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + INFOPLIST_FILE = "CHTWaterfallSwiftDemo/CHTWaterfallSwiftDemo-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.sophiefader.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; }; name = Release; }; + A561129527595AE500D4F206 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + INFOPLIST_FILE = "CHTWaterfallSwiftDemo/CHTWaterfallSwiftSPMDemo-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.sophiefader.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + A561129627595AE500D4F206 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + INFOPLIST_FILE = "CHTWaterfallSwiftDemo/CHTWaterfallSwiftSPMDemo-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.sophiefader.CHTWaterfallSwiftSPMDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -340,7 +452,23 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + A561129427595AE500D4F206 /* Build configuration list for PBXNativeTarget "CHTWaterfallSwiftSPMDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A561129527595AE500D4F206 /* Debug */, + A561129627595AE500D4F206 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + A561129A27595BAC00D4F206 /* CHTCollectionViewWaterfallLayout */ = { + isa = XCSwiftPackageProductDependency; + productName = CHTCollectionViewWaterfallLayout; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 62C26FD11ABE01840027F8D4 /* Project object */; } diff --git a/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftDemo.xcscheme b/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftDemo.xcscheme new file mode 100644 index 0000000..7d5fcfb --- /dev/null +++ b/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftDemo.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftSPMDemo.xcscheme b/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftSPMDemo.xcscheme new file mode 100644 index 0000000..aaec4d3 --- /dev/null +++ b/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftSPMDemo.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demo/Swift/CHTWaterfallSwiftDemo/Info.plist b/Demo/Swift/CHTWaterfallSwiftDemo/CHTWaterfallSwiftDemo-Info.plist similarity index 100% rename from Demo/Swift/CHTWaterfallSwiftDemo/Info.plist rename to Demo/Swift/CHTWaterfallSwiftDemo/CHTWaterfallSwiftDemo-Info.plist diff --git a/Demo/Swift/CHTWaterfallSwiftDemo/CHTWaterfallSwiftSPMDemo-Info.plist b/Demo/Swift/CHTWaterfallSwiftDemo/CHTWaterfallSwiftSPMDemo-Info.plist new file mode 100644 index 0000000..40c6215 --- /dev/null +++ b/Demo/Swift/CHTWaterfallSwiftDemo/CHTWaterfallSwiftSPMDemo-Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Demo/Swift/CHTWaterfallSwiftDemo/ViewController.swift b/Demo/Swift/CHTWaterfallSwiftDemo/ViewController.swift index 50ad668..2df5191 100644 --- a/Demo/Swift/CHTWaterfallSwiftDemo/ViewController.swift +++ b/Demo/Swift/CHTWaterfallSwiftDemo/ViewController.swift @@ -7,6 +7,9 @@ // import UIKit +#if canImport(CHTCollectionViewWaterfallLayout) +import CHTCollectionViewWaterfallLayout +#endif class ViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, CHTCollectionViewDelegateWaterfallLayout { From 04121da407f15559a1402c7933dab7dfc8c29086 Mon Sep 17 00:00:00 2001 From: David Robles Date: Thu, 2 Dec 2021 12:53:01 -0800 Subject: [PATCH 3/4] Add CHTCollectionViewWaterfallLayout as a Swift Package to Objective-C demo app --- .github/workflows/CI.yml | 8 ++ .../Demo.xcodeproj/project.pbxproj | 132 +++++++++++++++++- .../xcshareddata/xcschemes/SPMDemo.xcscheme | 78 +++++++++++ Demo/Objective-C/Demo/SPMDemo-Info.plist | 51 +++++++ Demo/Objective-C/Demo/ViewController.h | 4 + 5 files changed, 272 insertions(+), 1 deletion(-) create mode 100644 Demo/Objective-C/Demo.xcodeproj/xcshareddata/xcschemes/SPMDemo.xcscheme create mode 100644 Demo/Objective-C/Demo/SPMDemo-Info.plist diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 42fbcc4..3e3eccf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -44,6 +44,14 @@ jobs: scheme: Demo destination: name=iPhone 13 Pro action: build + + - name: Build Objective-C SPM Project + uses: sersoft-gmbh/xcodebuild-action@v1.8.0 + with: + project: Demo/Objective-C/Demo.xcodeproj + scheme: SPMDemo + destination: name=iPhone 13 Pro + action: build Pods: name: Cocoapods Lint (Latest Stable Xcode) diff --git a/Demo/Objective-C/Demo.xcodeproj/project.pbxproj b/Demo/Objective-C/Demo.xcodeproj/project.pbxproj index cd8d74b..4121dc8 100644 --- a/Demo/Objective-C/Demo.xcodeproj/project.pbxproj +++ b/Demo/Objective-C/Demo.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -23,6 +23,26 @@ 526109F31664740B005E4B6E /* CHTCollectionViewWaterfallCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 526109F21664740B005E4B6E /* CHTCollectionViewWaterfallCell.m */; }; 529599F62757C93E00621B8A /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 529599F52757C93E00621B8A /* Launch Screen.storyboard */; }; 52FADF371CB64F5C0097FB12 /* CHTCollectionViewWaterfallLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 52FADF361CB64F5C0097FB12 /* CHTCollectionViewWaterfallLayout.m */; }; + A56112A127595F0600D4F206 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 526109D016646F4D005E4B6E /* main.m */; }; + A56112A227595F0600D4F206 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 526109D416646F4D005E4B6E /* AppDelegate.m */; }; + A56112A327595F0600D4F206 /* CHTCollectionViewWaterfallFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 28ACC0CA181E580300454F4A /* CHTCollectionViewWaterfallFooter.m */; }; + A56112A527595F0600D4F206 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 526109E316646F4D005E4B6E /* ViewController.m */; }; + A56112A627595F0600D4F206 /* CHTCollectionViewWaterfallHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 28FB2A15181580B1002B84F4 /* CHTCollectionViewWaterfallHeader.m */; }; + A56112A727595F0600D4F206 /* CHTCollectionViewWaterfallCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 526109F21664740B005E4B6E /* CHTCollectionViewWaterfallCell.m */; }; + A56112A927595F0600D4F206 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 526109C416646F4D005E4B6E /* UIKit.framework */; }; + A56112AA27595F0600D4F206 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 526109C616646F4D005E4B6E /* Foundation.framework */; }; + A56112AB27595F0600D4F206 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 526109C816646F4D005E4B6E /* CoreGraphics.framework */; }; + A56112AD27595F0600D4F206 /* cat2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E5E70738195E341500773FD3 /* cat2.jpg */; }; + A56112AE27595F0600D4F206 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 526109CD16646F4D005E4B6E /* InfoPlist.strings */; }; + A56112AF27595F0600D4F206 /* cat3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E5E70739195E341500773FD3 /* cat3.jpg */; }; + A56112B027595F0600D4F206 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 526109D616646F4D005E4B6E /* Default.png */; }; + A56112B127595F0600D4F206 /* cat4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E5E7073A195E341500773FD3 /* cat4.jpg */; }; + A56112B227595F0600D4F206 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 526109D816646F4D005E4B6E /* Default@2x.png */; }; + A56112B327595F0600D4F206 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 526109DA16646F4D005E4B6E /* Default-568h@2x.png */; }; + A56112B427595F0600D4F206 /* cat1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E5E70737195E341500773FD3 /* cat1.jpg */; }; + A56112B527595F0600D4F206 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 529599F52757C93E00621B8A /* Launch Screen.storyboard */; }; + A56112B627595F0600D4F206 /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 526109DC16646F4D005E4B6E /* MainStoryboard_iPhone.storyboard */; }; + A56112C12759620E00D4F206 /* CHTCollectionViewWaterfallLayoutObjC in Frameworks */ = {isa = PBXBuildFile; productRef = A56112C02759620E00D4F206 /* CHTCollectionViewWaterfallLayoutObjC */; }; E5E7073B195E341500773FD3 /* cat1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E5E70737195E341500773FD3 /* cat1.jpg */; }; E5E7073C195E341500773FD3 /* cat2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E5E70738195E341500773FD3 /* cat2.jpg */; }; E5E7073D195E341500773FD3 /* cat3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E5E70739195E341500773FD3 /* cat3.jpg */; }; @@ -55,6 +75,9 @@ 529599F52757C93E00621B8A /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; }; 52FADF351CB64F5C0097FB12 /* CHTCollectionViewWaterfallLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CHTCollectionViewWaterfallLayout.h; path = ../../Source/CHTCollectionViewWaterfallLayout.h; sourceTree = SOURCE_ROOT; }; 52FADF361CB64F5C0097FB12 /* CHTCollectionViewWaterfallLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CHTCollectionViewWaterfallLayout.m; path = ../../Source/CHTCollectionViewWaterfallLayout.m; sourceTree = SOURCE_ROOT; }; + A561129E27595EF100D4F206 /* CHTCollectionViewWaterfallLayout */ = {isa = PBXFileReference; lastKnownFileType = folder; name = CHTCollectionViewWaterfallLayout; path = ../..; sourceTree = ""; }; + A56112BA27595F0600D4F206 /* SPMDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SPMDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A56112BB27595F0600D4F206 /* SPMDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SPMDemo-Info.plist"; sourceTree = ""; }; E5E70737195E341500773FD3 /* cat1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = cat1.jpg; sourceTree = ""; }; E5E70738195E341500773FD3 /* cat2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = cat2.jpg; sourceTree = ""; }; E5E70739195E341500773FD3 /* cat3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = cat3.jpg; sourceTree = ""; }; @@ -72,12 +95,24 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A56112A827595F0600D4F206 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A56112A927595F0600D4F206 /* UIKit.framework in Frameworks */, + A56112AA27595F0600D4F206 /* Foundation.framework in Frameworks */, + A56112C12759620E00D4F206 /* CHTCollectionViewWaterfallLayoutObjC in Frameworks */, + A56112AB27595F0600D4F206 /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 526109B516646F4D005E4B6E = { isa = PBXGroup; children = ( + A561129E27595EF100D4F206 /* CHTCollectionViewWaterfallLayout */, 526109CA16646F4D005E4B6E /* Demo */, 526109C316646F4D005E4B6E /* Frameworks */, 526109C116646F4D005E4B6E /* Products */, @@ -88,6 +123,7 @@ isa = PBXGroup; children = ( 526109C016646F4D005E4B6E /* Demo.app */, + A56112BA27595F0600D4F206 /* SPMDemo.app */, ); name = Products; sourceTree = ""; @@ -127,6 +163,7 @@ children = ( E5E70736195E341500773FD3 /* images */, 526109CC16646F4D005E4B6E /* Demo-Info.plist */, + A56112BB27595F0600D4F206 /* SPMDemo-Info.plist */, 526109CD16646F4D005E4B6E /* InfoPlist.strings */, 526109D016646F4D005E4B6E /* main.m */, 526109D216646F4D005E4B6E /* Demo-Prefix.pch */, @@ -178,6 +215,26 @@ productReference = 526109C016646F4D005E4B6E /* Demo.app */; productType = "com.apple.product-type.application"; }; + A561129F27595F0600D4F206 /* SPMDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = A56112B727595F0600D4F206 /* Build configuration list for PBXNativeTarget "SPMDemo" */; + buildPhases = ( + A56112A027595F0600D4F206 /* Sources */, + A56112A827595F0600D4F206 /* Frameworks */, + A56112AC27595F0600D4F206 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SPMDemo; + packageProductDependencies = ( + A56112C02759620E00D4F206 /* CHTCollectionViewWaterfallLayoutObjC */, + ); + productName = Demo; + productReference = A56112BA27595F0600D4F206 /* SPMDemo.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -201,6 +258,7 @@ projectRoot = ""; targets = ( 526109BF16646F4D005E4B6E /* Demo */, + A561129F27595F0600D4F206 /* SPMDemo */, ); }; /* End PBXProject section */ @@ -223,6 +281,23 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A56112AC27595F0600D4F206 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A56112AD27595F0600D4F206 /* cat2.jpg in Resources */, + A56112AE27595F0600D4F206 /* InfoPlist.strings in Resources */, + A56112AF27595F0600D4F206 /* cat3.jpg in Resources */, + A56112B027595F0600D4F206 /* Default.png in Resources */, + A56112B127595F0600D4F206 /* cat4.jpg in Resources */, + A56112B227595F0600D4F206 /* Default@2x.png in Resources */, + A56112B327595F0600D4F206 /* Default-568h@2x.png in Resources */, + A56112B427595F0600D4F206 /* cat1.jpg in Resources */, + A56112B527595F0600D4F206 /* Launch Screen.storyboard in Resources */, + A56112B627595F0600D4F206 /* MainStoryboard_iPhone.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -240,6 +315,19 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A56112A027595F0600D4F206 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A56112A127595F0600D4F206 /* main.m in Sources */, + A56112A227595F0600D4F206 /* AppDelegate.m in Sources */, + A56112A327595F0600D4F206 /* CHTCollectionViewWaterfallFooter.m in Sources */, + A56112A527595F0600D4F206 /* ViewController.m in Sources */, + A56112A627595F0600D4F206 /* CHTCollectionViewWaterfallHeader.m in Sources */, + A56112A727595F0600D4F206 /* CHTCollectionViewWaterfallCell.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ @@ -381,6 +469,32 @@ }; name = Release; }; + A56112B827595F0600D4F206 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Demo/Demo-Prefix.pch"; + INFOPLIST_FILE = "Demo/SPMDemo-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "nelson.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + A56112B927595F0600D4F206 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Demo/Demo-Prefix.pch"; + INFOPLIST_FILE = "Demo/SPMDemo-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "nelson.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -402,7 +516,23 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + A56112B727595F0600D4F206 /* Build configuration list for PBXNativeTarget "SPMDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A56112B827595F0600D4F206 /* Debug */, + A56112B927595F0600D4F206 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + A56112C02759620E00D4F206 /* CHTCollectionViewWaterfallLayoutObjC */ = { + isa = XCSwiftPackageProductDependency; + productName = CHTCollectionViewWaterfallLayoutObjC; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 526109B716646F4D005E4B6E /* Project object */; } diff --git a/Demo/Objective-C/Demo.xcodeproj/xcshareddata/xcschemes/SPMDemo.xcscheme b/Demo/Objective-C/Demo.xcodeproj/xcshareddata/xcschemes/SPMDemo.xcscheme new file mode 100644 index 0000000..41208e2 --- /dev/null +++ b/Demo/Objective-C/Demo.xcodeproj/xcshareddata/xcschemes/SPMDemo.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demo/Objective-C/Demo/SPMDemo-Info.plist b/Demo/Objective-C/Demo/SPMDemo-Info.plist new file mode 100644 index 0000000..ad89804 --- /dev/null +++ b/Demo/Objective-C/Demo/SPMDemo-Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UILaunchStoryboardName + Launch Screen + UIMainStoryboardFile + MainStoryboard_iPhone + UIMainStoryboardFile~ipad + MainStoryboard_iPhone + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Demo/Objective-C/Demo/ViewController.h b/Demo/Objective-C/Demo/ViewController.h index 0106a90..570179f 100644 --- a/Demo/Objective-C/Demo/ViewController.h +++ b/Demo/Objective-C/Demo/ViewController.h @@ -7,7 +7,11 @@ // #import +#if __has_feature(modules) +@import CHTCollectionViewWaterfallLayoutObjC; +#else #import "CHTCollectionViewWaterfallLayout.h" +#endif @interface ViewController : UIViewController @property (nonatomic, strong) IBOutlet UICollectionView *collectionView; From 88b81c251b96e3dd8ad6ea2cf647140ef1bc7c9b Mon Sep 17 00:00:00 2001 From: Nelson Tai Date: Fri, 3 Dec 2021 09:45:57 +0800 Subject: [PATCH 4/4] Update some project settings --- .../Demo.xcodeproj/xcshareddata/xcschemes/SPMDemo.xcscheme | 6 +++--- Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/project.pbxproj | 4 +++- .../xcshareddata/xcschemes/CHTWaterfallSwiftDemo.xcscheme | 2 +- .../xcschemes/CHTWaterfallSwiftSPMDemo.xcscheme | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Demo/Objective-C/Demo.xcodeproj/xcshareddata/xcschemes/SPMDemo.xcscheme b/Demo/Objective-C/Demo.xcodeproj/xcshareddata/xcschemes/SPMDemo.xcscheme index 41208e2..c8891ea 100644 --- a/Demo/Objective-C/Demo.xcodeproj/xcshareddata/xcschemes/SPMDemo.xcscheme +++ b/Demo/Objective-C/Demo.xcodeproj/xcshareddata/xcschemes/SPMDemo.xcscheme @@ -15,7 +15,7 @@ @@ -45,7 +45,7 @@ @@ -62,7 +62,7 @@ diff --git a/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/project.pbxproj b/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/project.pbxproj index ca11c96..7100acb 100644 --- a/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/project.pbxproj +++ b/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/project.pbxproj @@ -171,7 +171,7 @@ attributes = { LastSwiftMigration = 0730; LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1250; ORGANIZATIONNAME = "Sophie Fader"; TargetAttributes = { 62C26FD81ABE01840027F8D4 = { @@ -285,6 +285,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -341,6 +342,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; diff --git a/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftDemo.xcscheme b/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftDemo.xcscheme index 7d5fcfb..b4e0a51 100644 --- a/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftDemo.xcscheme +++ b/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/xcshareddata/xcschemes/CHTWaterfallSwiftDemo.xcscheme @@ -1,6 +1,6 @@