From 16d2dc26ac31f2c5ec3dfd72228d2e7997459028 Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Fri, 18 Mar 2022 13:41:31 +1100 Subject: Added SnapKit with Swift package manager Was thinking of using CocoaPods as that's what is in use, but either way looked decently straightforward. Decided to start with whatever was already built in and no extra software. Note: it was File > Add Packages > put git link in top right. References I saw seemed to say File > Swift Packages and I couldn't find it. Also some other docs had older screenshots, I presume it's pre-Xcode-13 being slightly different. References: - https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app - https://www.raywenderlich.com/7242045-swift-package-manager-for-ios - https://snapkit.io/docs/ --- foray.xcodeproj/project.pbxproj | 27 ++++++++++++++++++++++ .../xcshareddata/swiftpm/Package.resolved | 14 +++++++++++ foray/Base.lproj/Main.storyboard | 5 ++-- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 foray.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/foray.xcodeproj/project.pbxproj b/foray.xcodeproj/project.pbxproj index 42e2a75..222f951 100644 --- a/foray.xcodeproj/project.pbxproj +++ b/foray.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ C04B45AD27DEF118001451A3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C04B45AC27DEF118001451A3 /* Assets.xcassets */; }; C04B45B027DEF118001451A3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C04B45AE27DEF118001451A3 /* LaunchScreen.storyboard */; }; C04B45B827DEF2ED001451A3 /* ForayTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04B45B727DEF2ED001451A3 /* ForayTableViewController.swift */; }; + C04EDE4227E428AB00D83005 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = C04EDE4127E428AB00D83005 /* SnapKit */; }; C0FEAF5F27E14C52000A7648 /* ForayDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0FEAF5E27E14C52000A7648 /* ForayDetailViewController.swift */; }; /* End PBXBuildFile section */ @@ -33,6 +34,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + C04EDE4227E428AB00D83005 /* SnapKit in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -86,6 +88,9 @@ dependencies = ( ); name = foray; + packageProductDependencies = ( + C04EDE4127E428AB00D83005 /* SnapKit */, + ); productName = foray; productReference = C04B45A027DEF117001451A3 /* foray.app */; productType = "com.apple.product-type.application"; @@ -114,6 +119,9 @@ Base, ); mainGroup = C04B459727DEF117001451A3; + packageReferences = ( + C04EDE4027E428AB00D83005 /* XCRemoteSwiftPackageReference "SnapKit" */, + ); productRefGroup = C04B45A127DEF117001451A3 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -366,6 +374,25 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + C04EDE4027E428AB00D83005 /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + C04EDE4127E428AB00D83005 /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = C04EDE4027E428AB00D83005 /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = C04B459827DEF117001451A3 /* Project object */; } diff --git a/foray.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/foray.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..ba647d8 --- /dev/null +++ b/foray.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "snapkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SnapKit/SnapKit.git", + "state" : { + "revision" : "d458564516e5676af9c70b4f4b2a9178294f1bc6", + "version" : "5.0.1" + } + } + ], + "version" : 2 +} diff --git a/foray/Base.lproj/Main.storyboard b/foray/Base.lproj/Main.storyboard index b6b3f86..231af8c 100644 --- a/foray/Base.lproj/Main.storyboard +++ b/foray/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + @@ -123,6 +123,7 @@ + -- cgit