diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index be4c6aa..3e3eccf 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: @@ -36,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/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/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..c8891ea --- /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; diff --git a/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/project.pbxproj b/Demo/Swift/CHTWaterfallSwiftDemo.xcodeproj/project.pbxproj index cf9e906..7100acb 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 */ @@ -120,7 +171,7 @@ attributes = { LastSwiftMigration = 0730; LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1250; ORGANIZATIONNAME = "Sophie Fader"; TargetAttributes = { 62C26FD81ABE01840027F8D4 = { @@ -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 */ @@ -211,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; @@ -267,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; @@ -298,8 +374,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 +390,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 +454,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..b4e0a51 --- /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..4ffc52e --- /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 { 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]