From 4e664baba8f00cd3c51fb232853dc647ef087766 Mon Sep 17 00:00:00 2001 From: radude89 Date: Sun, 29 Sep 2024 17:17:28 +0300 Subject: [PATCH] Move to root the SPM --- .gitignore | 78 ++----------------- .../project.pbxproj | 29 +++---- .../MyAppKeychain.swift | 2 +- KeychainStorage/.gitignore | 8 -- .../Package.swift => Package.swift | 0 .../KeychainStorage/KeyValueStorage.swift | 0 .../KeychainQueryFactory.swift | 0 .../KeychainStorage/KeychainStorage.swift | 0 .../KeychainQueryFactoryTests.swift | 0 .../KeychainStorageTests.swift | 0 10 files changed, 17 insertions(+), 100 deletions(-) delete mode 100644 KeychainStorage/.gitignore rename KeychainStorage/Package.swift => Package.swift (100%) rename {KeychainStorage/Sources => Sources}/KeychainStorage/KeyValueStorage.swift (100%) rename {KeychainStorage/Sources => Sources}/KeychainStorage/KeychainQueryFactory.swift (100%) rename {KeychainStorage/Sources => Sources}/KeychainStorage/KeychainStorage.swift (100%) rename {KeychainStorage/Tests => Tests}/KeychainStorageTests/KeychainQueryFactoryTests.swift (100%) rename {KeychainStorage/Tests => Tests}/KeychainStorageTests/KeychainStorageTests.swift (100%) diff --git a/.gitignore b/.gitignore index a5e81b1..0023a53 100644 --- a/.gitignore +++ b/.gitignore @@ -1,74 +1,8 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -# Mac OS X .DS_Store - -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 +/.build +/Packages xcuserdata/ - -## Other -*.moved-aside -*.xccheckout -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output - -# When SPM is used, Sources/Playground.swift will be renamed to Sources/main.swift -Sources/main.swift -Package.resolved +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/Example/KeychainStorageExample/KeychainStorageExample.xcodeproj/project.pbxproj b/Example/KeychainStorageExample/KeychainStorageExample.xcodeproj/project.pbxproj index 36576f8..72678db 100644 --- a/Example/KeychainStorageExample/KeychainStorageExample.xcodeproj/project.pbxproj +++ b/Example/KeychainStorageExample/KeychainStorageExample.xcodeproj/project.pbxproj @@ -6,10 +6,6 @@ objectVersion = 77; objects = { -/* Begin PBXBuildFile section */ - F7D278782CA9920B0096C830 /* KeychainStorage in Frameworks */ = {isa = PBXBuildFile; productRef = F7D278772CA9920B0096C830 /* KeychainStorage */; }; -/* End PBXBuildFile section */ - /* Begin PBXFileReference section */ F7D278652CA991620096C830 /* KeychainStorageExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KeychainStorageExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -27,7 +23,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F7D278782CA9920B0096C830 /* KeychainStorage in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -70,7 +65,6 @@ ); name = KeychainStorageExample; packageProductDependencies = ( - F7D278772CA9920B0096C830 /* KeychainStorage */, ); productName = KeychainStorageExample; productReference = F7D278652CA991620096C830 /* KeychainStorageExample.app */; @@ -101,7 +95,7 @@ mainGroup = F7D2785C2CA991620096C830; minimizedProjectReferenceProxies = 1; packageReferences = ( - F7D278762CA9920B0096C830 /* XCLocalSwiftPackageReference "../../KeychainStorage" */, + F71BE9CF2CA9989B00931907 /* XCRemoteSwiftPackageReference "KeychainStorage" */, ); preferredProjectObjectVersion = 77; productRefGroup = F7D278662CA991620096C830 /* Products */; @@ -334,19 +328,16 @@ }; /* End XCConfigurationList section */ -/* Begin XCLocalSwiftPackageReference section */ - F7D278762CA9920B0096C830 /* XCLocalSwiftPackageReference "../../KeychainStorage" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = ../../KeychainStorage; - }; -/* End XCLocalSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - F7D278772CA9920B0096C830 /* KeychainStorage */ = { - isa = XCSwiftPackageProductDependency; - productName = KeychainStorage; +/* Begin XCRemoteSwiftPackageReference section */ + F71BE9CF2CA9989B00931907 /* XCRemoteSwiftPackageReference "KeychainStorage" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/radude89/KeychainStorage/"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 2.0.0; + }; }; -/* End XCSwiftPackageProductDependency section */ +/* End XCRemoteSwiftPackageReference section */ }; rootObject = F7D2785D2CA991620096C830 /* Project object */; } diff --git a/Example/KeychainStorageExample/KeychainStorageExample/MyAppKeychain.swift b/Example/KeychainStorageExample/KeychainStorageExample/MyAppKeychain.swift index 0b15ca2..c121431 100644 --- a/Example/KeychainStorageExample/KeychainStorageExample/MyAppKeychain.swift +++ b/Example/KeychainStorageExample/KeychainStorageExample/MyAppKeychain.swift @@ -7,7 +7,7 @@ // import Foundation -import KeychainStorage +//import KeychainStorage final class MyAppKeychain { diff --git a/KeychainStorage/.gitignore b/KeychainStorage/.gitignore deleted file mode 100644 index 0023a53..0000000 --- a/KeychainStorage/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.DS_Store -/.build -/Packages -xcuserdata/ -DerivedData/ -.swiftpm/configuration/registries.json -.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata -.netrc diff --git a/KeychainStorage/Package.swift b/Package.swift similarity index 100% rename from KeychainStorage/Package.swift rename to Package.swift diff --git a/KeychainStorage/Sources/KeychainStorage/KeyValueStorage.swift b/Sources/KeychainStorage/KeyValueStorage.swift similarity index 100% rename from KeychainStorage/Sources/KeychainStorage/KeyValueStorage.swift rename to Sources/KeychainStorage/KeyValueStorage.swift diff --git a/KeychainStorage/Sources/KeychainStorage/KeychainQueryFactory.swift b/Sources/KeychainStorage/KeychainQueryFactory.swift similarity index 100% rename from KeychainStorage/Sources/KeychainStorage/KeychainQueryFactory.swift rename to Sources/KeychainStorage/KeychainQueryFactory.swift diff --git a/KeychainStorage/Sources/KeychainStorage/KeychainStorage.swift b/Sources/KeychainStorage/KeychainStorage.swift similarity index 100% rename from KeychainStorage/Sources/KeychainStorage/KeychainStorage.swift rename to Sources/KeychainStorage/KeychainStorage.swift diff --git a/KeychainStorage/Tests/KeychainStorageTests/KeychainQueryFactoryTests.swift b/Tests/KeychainStorageTests/KeychainQueryFactoryTests.swift similarity index 100% rename from KeychainStorage/Tests/KeychainStorageTests/KeychainQueryFactoryTests.swift rename to Tests/KeychainStorageTests/KeychainQueryFactoryTests.swift diff --git a/KeychainStorage/Tests/KeychainStorageTests/KeychainStorageTests.swift b/Tests/KeychainStorageTests/KeychainStorageTests.swift similarity index 100% rename from KeychainStorage/Tests/KeychainStorageTests/KeychainStorageTests.swift rename to Tests/KeychainStorageTests/KeychainStorageTests.swift