Skip to content

Commit

Permalink
Merge pull request #184 from iZettle/use-spm-to-fetch-and-build-depen…
Browse files Browse the repository at this point in the history
…dencies

Use spm to fetch and build dependencies
  • Loading branch information
bartszczepaniak authored May 23, 2022
2 parents 7059ca9 + b5a621b commit 6eee6b0
Show file tree
Hide file tree
Showing 16 changed files with 143 additions and 305 deletions.
5 changes: 0 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,9 @@ commands:
cd <<parameters.path>>
pod install --verbose
carthage-update:
steps:
- run: sh carthage.sh update Flow --cache-builds

test_main_project:
steps:
- checkout
- carthage-update
- test_project_and_store_results:
project: "Form.xcodeproj"
scheme: "Form"
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 4.0.0
- Replaced `Carthage` with `SPM`
- Removed `Presentation` dependency references from project
- Removed conditionally compiled code wrapped in `#if canImport(Presentation)`. The removed code can be added by integrators directly if needed using this [diff](https://github.com/iZettle/Form/pull/184/commits/71eca247c8fcc988928466afa65dea2ac8989517)

# 3.3.4
- Bug fix for a TableKit update issue [#182](https://github.com/iZettle/Form/issues/182)

Expand Down
1 change: 0 additions & 1 deletion Cartfile

This file was deleted.

1 change: 0 additions & 1 deletion Cartfile.resolved

This file was deleted.

29 changes: 28 additions & 1 deletion Examples/Messages/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
2A8568E12344F73200B9D157 /* ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A8568E02344F73200B9D157 /* ExampleTests.swift */; };
75593950283BA41200EA10E9 /* Presentation in Frameworks */ = {isa = PBXBuildFile; productRef = 7559394F283BA41200EA10E9 /* Presentation */; };
F61928ED2088DE200008F713 /* Messages.swift in Sources */ = {isa = PBXBuildFile; fileRef = F61928EC2088DE200008F713 /* Messages.swift */; };
F61928EF2088DE7E0008F713 /* ComposeMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = F61928EE2088DE7E0008F713 /* ComposeMessage.swift */; };
F61928F12088DEBD0008F713 /* MessageDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = F61928F02088DEBD0008F713 /* MessageDetails.swift */; };
Expand Down Expand Up @@ -63,6 +64,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
75593950283BA41200EA10E9 /* Presentation in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -144,6 +146,9 @@
dependencies = (
);
name = Example;
packageProductDependencies = (
7559394F283BA41200EA10E9 /* Presentation */,
);
productName = Messages;
productReference = F6B3E0552086210E00F55C53 /* Example.app */;
productType = "com.apple.product-type.application";
Expand Down Expand Up @@ -176,6 +181,9 @@
Base,
);
mainGroup = F6B3E04C2086210E00F55C53;
packageReferences = (
7559394E283BA41200EA10E9 /* XCRemoteSwiftPackageReference "Presentation" */,
);
productRefGroup = F6B3E0562086210E00F55C53 /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -468,6 +476,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
7559394E283BA41200EA10E9 /* XCRemoteSwiftPackageReference "Presentation" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/iZettle/Presentation.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.15.2;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
7559394F283BA41200EA10E9 /* Presentation */ = {
isa = XCSwiftPackageProductDependency;
package = 7559394E283BA41200EA10E9 /* XCRemoteSwiftPackageReference "Presentation" */;
productName = Presentation;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = F6B3E04D2086210E00F55C53 /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"object": {
"pins": [
{
"package": "Flow",
"repositoryURL": "https://github.com/izettle/Flow.git",
"state": {
"branch": null,
"revision": "ad38c734f16a404de8895236424bc4acc5355a3d",
"version": "1.10.1"
}
},
{
"package": "Presentation",
"repositoryURL": "https://github.com/iZettle/Presentation.git",
"state": {
"branch": null,
"revision": "491735c045a0e61e4e2536a2da41b347c533d7e6",
"version": "1.15.2"
}
}
]
},
"version": 1
}
6 changes: 6 additions & 0 deletions Examples/Messages/Example/Messages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,9 @@ struct Empty: Presentable {
return (UIViewController(), NilDisposer())
}
}

public extension MasterDetailSelection where Elements.Index == TableIndex {
func bindTo<Row, Section>(_ tableKit: TableKit<Row, Section>) -> Disposable {
return self.map { $0?.index }.bindTo(tableKit, select: self.select)
}
}
1 change: 0 additions & 1 deletion Examples/Messages/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ platform :ios, '11.0'
target 'Example' do
use_frameworks!

pod 'FormFramework/Presentation', :path => '../..'
pod 'FormFramework', :path => '../..'

end
91 changes: 60 additions & 31 deletions Form.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -35,6 +35,7 @@
724EC30D2241513D001F3E11 /* UILabel+StylingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 724EC30C2241513D001F3E11 /* UILabel+StylingTests.swift */; };
7270AFB0201FAB7C004DAAA3 /* ViewLayoutArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7270AFAF201FAB7C004DAAA3 /* ViewLayoutArea.swift */; };
72C5ED6F226F432600E32125 /* UIScrollView+PinningTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72C5ED6E226F432600E32125 /* UIScrollView+PinningTests.swift */; };
7592CA3E282BF9DC00920278 /* Flow in Frameworks */ = {isa = PBXBuildFile; productRef = 7592CA3D282BF9DC00920278 /* Flow */; };
B35F8AEE1F36676D00904E37 /* Collection+Changes.swift in Sources */ = {isa = PBXBuildFile; fileRef = B35F8AED1F36676D00904E37 /* Collection+Changes.swift */; };
B35F8B4C1F3783E400904E37 /* CollectionDiffTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B35F8B4B1F3783E400904E37 /* CollectionDiffTests.swift */; };
CA6755EA1D4B6F1C000662FF /* SegmentedControlStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA6755E91D4B6F1C000662FF /* SegmentedControlStyle.swift */; };
Expand All @@ -48,7 +49,6 @@
F624C3CE1F7CFC9F00E1F5C1 /* UIViewController+Install.swift in Sources */ = {isa = PBXBuildFile; fileRef = F624C3CD1F7CFC9F00E1F5C1 /* UIViewController+Install.swift */; };
F62E45B91CABFB5300C6867E /* Form.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6A9D5DE1C1728BA009A0EEB /* Form.framework */; };
F63863122090B73F00A43824 /* RowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F63863112090B73F00A43824 /* RowView.swift */; };
F647306C20BFDFB1002BC8E3 /* RowsSelection.swift in Sources */ = {isa = PBXBuildFile; fileRef = F647306A20BFDFB1002BC8E3 /* RowsSelection.swift */; };
F64C27F01C7B2C5B003CC378 /* TextStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = F64C27EA1C7B2C5B003CC378 /* TextStyle.swift */; };
F64C27F11C7B2C5B003CC378 /* ButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = F64C27EB1C7B2C5B003CC378 /* ButtonStyle.swift */; };
F65A9F811C7B1E8F007007B4 /* Form.h in Headers */ = {isa = PBXBuildFile; fileRef = F65A9F7F1C7B1E8F007007B4 /* Form.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -160,7 +160,6 @@
F62E45B41CABFB5300C6867E /* FormTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FormTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
F62E45B81CABFB5300C6867E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F63863112090B73F00A43824 /* RowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = RowView.swift; path = Form/RowView.swift; sourceTree = "<group>"; };
F647306A20BFDFB1002BC8E3 /* RowsSelection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RowsSelection.swift; path = Form/RowsSelection.swift; sourceTree = "<group>"; };
F64C27EA1C7B2C5B003CC378 /* TextStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TextStyle.swift; path = Form/TextStyle.swift; sourceTree = "<group>"; };
F64C27EB1C7B2C5B003CC378 /* ButtonStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ButtonStyle.swift; path = Form/ButtonStyle.swift; sourceTree = "<group>"; };
F65A9F7F1C7B1E8F007007B4 /* Form.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Form.h; path = Form/Form.h; sourceTree = SOURCE_ROOT; };
Expand All @@ -179,7 +178,6 @@
F666BB8E20BE9741006D2507 /* NumberEditor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NumberEditor.swift; path = Form/NumberEditor.swift; sourceTree = "<group>"; };
F666BBD720BEDC31006D2507 /* FormFramework.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = FormFramework.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
F666BBD820BEDC32006D2507 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = "<group>"; };
F666BBD920BEDC32006D2507 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = "<group>"; };
F666BBDA20BEDC32006D2507 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
F66835CA2091B6DF002D2676 /* UIView+Embedding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "UIView+Embedding.swift"; path = "Form/UIView+Embedding.swift"; sourceTree = "<group>"; };
F66835D52091CC32002D2676 /* UIResponders+Utilities.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "UIResponders+Utilities.swift"; path = "Form/UIResponders+Utilities.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -234,6 +232,14 @@
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
7592CA3B282BF9AB00920278 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7592CA3E282BF9DC00920278 /* Flow in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F62E45B11CABFB5300C6867E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -377,7 +383,6 @@
F6A9D5D41C1728BA009A0EEB = {
isa = PBXGroup;
children = (
F666BBD920BEDC32006D2507 /* Cartfile */,
F666BBDA20BEDC32006D2507 /* CHANGELOG.md */,
F666BBD720BEDC31006D2507 /* FormFramework.podspec */,
F666BBD820BEDC32006D2507 /* LICENSE.md */,
Expand Down Expand Up @@ -438,7 +443,6 @@
1CEED6CF21341FF300893573 /* ScrollViewDelegate.swift */,
1C0656C11F82625E00E60465 /* UICollectionViewCell+Utilities.swift */,
1CDA23EB1F8E3A3300CCC541 /* TableAnimatable.swift */,
F647306A20BFDFB1002BC8E3 /* RowsSelection.swift */,
);
name = Tables;
sourceTree = "<group>";
Expand All @@ -464,7 +468,6 @@
F62E45B01CABFB5300C6867E /* Sources */,
F62E45B11CABFB5300C6867E /* Frameworks */,
F62E45B21CABFB5300C6867E /* Resources */,
720D32F820E6A3570013FC29 /* Copy Flow */,
);
buildRules = (
);
Expand All @@ -481,6 +484,7 @@
buildConfigurationList = F6A9D5F21C1728BA009A0EEB /* Build configuration list for PBXNativeTarget "Form" */;
buildPhases = (
F6A9D5D91C1728BA009A0EEB /* Sources */,
7592CA3B282BF9AB00920278 /* Frameworks */,
F6A9D5DB1C1728BA009A0EEB /* Headers */,
F6A9D5DC1C1728BA009A0EEB /* Resources */,
ED7163CF2189C1A0008AD729 /* ShellScript */,
Expand All @@ -490,6 +494,9 @@
dependencies = (
);
name = Form;
packageProductDependencies = (
7592CA3D282BF9DC00920278 /* Flow */,
);
productName = Layout;
productReference = F6A9D5DE1C1728BA009A0EEB /* Form.framework */;
productType = "com.apple.product-type.framework";
Expand Down Expand Up @@ -525,6 +532,9 @@
Base,
);
mainGroup = F6A9D5D41C1728BA009A0EEB;
packageReferences = (
7592CA3C282BF9DB00920278 /* XCRemoteSwiftPackageReference "Flow" */,
);
productRefGroup = F6A9D5DF1C1728BA009A0EEB /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -553,22 +563,6 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
720D32F820E6A3570013FC29 /* Copy Flow */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/iOS/Flow.framework",
);
name = "Copy Flow";
outputPaths = (
"$(DERIVED_FILE_DIR)/",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks";
};
ED7163CF2189C1A0008AD729 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -672,7 +666,6 @@
F6C34D3A1C7F37DC00168CD9 /* DefaultStyling.swift in Sources */,
F6A326EA1F94935200C3A692 /* UILabel+Styling.swift in Sources */,
F6BFAFAD2090746C00CBA6B1 /* BarButtonStyle.swift in Sources */,
F647306C20BFDFB1002BC8E3 /* RowsSelection.swift in Sources */,
F6C2E5EA1C69FA0300453548 /* Table.swift in Sources */,
F65A9F9C1C7B1EC6007007B4 /* SeparatorStyle.swift in Sources */,
F67D37921C7B2EDD00A35BD4 /* TextEditor.swift in Sources */,
Expand Down Expand Up @@ -717,7 +710,11 @@
CLANG_ANALYZER_NONNULL = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/iOS";
INFOPLIST_FILE = FormTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.iZettle.FormTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -730,7 +727,11 @@
CLANG_ANALYZER_NONNULL = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/iOS";
INFOPLIST_FILE = FormTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.iZettle.FormTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -835,7 +836,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand All @@ -856,8 +858,12 @@
HEADER_SEARCH_PATHS = "$(SRCROOT)/**";
INFOPLIST_FILE = Form/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 3.3.3;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.iZettle.Form;
PRODUCT_NAME = Form;
SKIP_INSTALL = YES;
Expand All @@ -877,8 +883,12 @@
HEADER_SEARCH_PATHS = "$(SRCROOT)/**";
INFOPLIST_FILE = Form/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 3.3.3;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.iZettle.Form;
PRODUCT_NAME = Form;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -917,6 +927,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
7592CA3C282BF9DB00920278 /* XCRemoteSwiftPackageReference "Flow" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/iZettle/Flow.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.10.1;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
7592CA3D282BF9DC00920278 /* Flow */ = {
isa = XCSwiftPackageProductDependency;
package = 7592CA3C282BF9DB00920278 /* XCRemoteSwiftPackageReference "Flow" */;
productName = Flow;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = F6A9D5D51C1728BA009A0EEB /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "Flow",
"repositoryURL": "https://github.com/iZettle/Flow.git",
"state": {
"branch": null,
"revision": "ad38c734f16a404de8895236424bc4acc5355a3d",
"version": "1.10.1"
}
}
]
},
"version": 1
}
Loading

0 comments on commit 6eee6b0

Please sign in to comment.