├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE ├── README.md ├── main.swift ├── spmready.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── humann.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcshareddata │ └── xcschemes │ │ └── pod2spm.xcscheme └── xcuserdata │ └── humann.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist └── spmreadytest ├── Info.plist └── spmreadytest.swift /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: StatusQuo 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/xcode,swift,macos 3 | # Edit at https://www.gitignore.io/?templates=xcode,swift,macos 4 | 5 | ### macOS ### 6 | # General 7 | .DS_Store 8 | .AppleDouble 9 | .LSOverride 10 | 11 | # Icon must end with two \r 12 | Icon 13 | 14 | # Thumbnails 15 | ._* 16 | 17 | # Files that might appear in the root of a volume 18 | .DocumentRevisions-V100 19 | .fseventsd 20 | .Spotlight-V100 21 | .TemporaryItems 22 | .Trashes 23 | .VolumeIcon.icns 24 | .com.apple.timemachine.donotpresent 25 | 26 | # Directories potentially created on remote AFP share 27 | .AppleDB 28 | .AppleDesktop 29 | Network Trash Folder 30 | Temporary Items 31 | .apdisk 32 | 33 | ### Swift ### 34 | # Xcode 35 | # 36 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 37 | 38 | ## Build generated 39 | build/ 40 | DerivedData/ 41 | 42 | ## Various settings 43 | *.pbxuser 44 | !default.pbxuser 45 | *.mode1v3 46 | !default.mode1v3 47 | *.mode2v3 48 | !default.mode2v3 49 | *.perspectivev3 50 | !default.perspectivev3 51 | xcuserdata/ 52 | 53 | ## Other 54 | *.moved-aside 55 | *.xccheckout 56 | *.xcscmblueprint 57 | 58 | ## Obj-C/Swift specific 59 | *.hmap 60 | *.ipa 61 | *.dSYM.zip 62 | *.dSYM 63 | 64 | ## Playgrounds 65 | timeline.xctimeline 66 | playground.xcworkspace 67 | 68 | # Swift Package Manager 69 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 70 | # Packages/ 71 | # Package.pins 72 | # Package.resolved 73 | .build/ 74 | 75 | # CocoaPods 76 | # We recommend against adding the Pods directory to your .gitignore. However 77 | # you should judge for yourself, the pros and cons are mentioned at: 78 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 79 | # Pods/ 80 | # Add this line if you want to avoid checking in source code from the Xcode workspace 81 | # *.xcworkspace 82 | 83 | # Carthage 84 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 85 | # Carthage/Checkouts 86 | 87 | Carthage/Build 88 | 89 | # Accio dependency management 90 | Dependencies/ 91 | .accio/ 92 | 93 | # fastlane 94 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 95 | # screenshots whenever they are needed. 96 | # For more information about the recommended setup visit: 97 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 98 | 99 | fastlane/report.xml 100 | fastlane/Preview.html 101 | fastlane/screenshots/**/*.png 102 | fastlane/test_output 103 | 104 | # Code Injection 105 | # After new code Injection tools there's a generated folder /iOSInjectionProject 106 | # https://github.com/johnno1962/injectionforxcode 107 | 108 | iOSInjectionProject/ 109 | 110 | ### Xcode ### 111 | # Xcode 112 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 113 | 114 | ## User settings 115 | 116 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 117 | 118 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 119 | 120 | ## Xcode Patch 121 | *.xcodeproj/* 122 | !*.xcodeproj/project.pbxproj 123 | !*.xcodeproj/xcshareddata/ 124 | !*.xcworkspace/contents.xcworkspacedata 125 | /*.gcno 126 | !*.xcworkspace/xcuserdata/* 127 | 128 | ### Xcode Patch ### 129 | **/xcshareddata/WorkspaceSettings.xcsettings 130 | 131 | # End of https://www.gitignore.io/api/xcode,swift,macos 132 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Sebastian Humann 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # spmready 2 | is a small tool to check if all your dependencies (cocoapods/carthage) are ready to migrate to swift package manager 3 | 4 | ## In your Project Directory: 5 | 6 | ## Download newest script version 7 | 8 | `curl https://raw.githubusercontent.com/StatusQuo/spmready/master/main.swift -o spmready.swift` 9 | 10 | ## Make it executable 11 | `chmod +x spmready.swift` 12 | 13 | ## Run & Hope for the best 14 | `./spmready.swift` 15 | 16 | 17 | ### Alternative 18 | 19 | `./spmready.swift {PATH_TO_PODFILE}` 20 | 21 | # Background 22 | 23 | This script scans all depencendies in your podfile / cartfile and checks if the Repository (master) on github has a SwiftPackage.swift file. 24 | This is not a guarantee that this pod works with spm on your platform/machine/etc. but it can give you a first impression, how far away you are from migrating to Swift Package Manager. 25 | 26 | https://medium.com/@bastihumann/ready-for-swift-package-manger-3defcca50ca3 27 | 28 | https://swift.org/package-manager/ 29 | 30 | https://cocoapods.org/ 31 | -------------------------------------------------------------------------------- /main.swift: -------------------------------------------------------------------------------- 1 | #!/usr/bin/swift 2 | 3 | /// spmready is a small tool to check if all your dependencies (cocoapods/ carthage) are ready to migrate to swift package manager 4 | /// see https://github.com/StatusQuo/spmready for more information and updates 5 | 6 | import Foundation 7 | 8 | // MARK: - NetworkKit 9 | 10 | struct HttpResult { 11 | let code: Int 12 | let data: Data? 13 | } 14 | 15 | enum HttpError: Error { 16 | case error 17 | } 18 | 19 | extension Result { 20 | func take() -> Success? { 21 | switch self { 22 | case .success(let data): 23 | return data 24 | case .failure: 25 | return nil 26 | } 27 | } 28 | } 29 | 30 | func get(url: String) -> Result { 31 | 32 | var result: Result = .failure(HttpError.error) 33 | let semaphore = DispatchSemaphore(value: 0) 34 | let url = URL(string: url)! 35 | 36 | let task = URLSession.shared.dataTask(with: url) {(data, response, error) in 37 | if let httpResponse = response as? HTTPURLResponse { 38 | result = .success(HttpResult(code: httpResponse.statusCode, data: data)) 39 | } 40 | 41 | semaphore.signal() 42 | } 43 | 44 | task.resume() 45 | 46 | _ = semaphore.wait(timeout: .distantFuture) 47 | return result 48 | } 49 | 50 | // MARK: - RegexKit 51 | 52 | enum Searcher: String { 53 | case cart = "github [\"']([A-Za-z0–9/]*)[\"']" 54 | case pod = "pod [\"']([^\"']*)" 55 | case podRepoUrl = "(((https?):((//)|(\\\\))+[\\w\\d:#@%/;$()~_?\\+-=\\\\.&]*))\">GitHub Repo" 56 | } 57 | 58 | extension String { 59 | func match(_ search: Searcher) -> String? { 60 | let regex = NSRegularExpression(search.rawValue) 61 | if let match = regex.matches(self), let matchRange = Range(match.range(at: 1), in: self) { 62 | let result = self[matchRange] 63 | return String(result) 64 | } 65 | return nil 66 | } 67 | } 68 | 69 | extension NSRegularExpression { 70 | convenience init(_ pattern: String) { 71 | do { 72 | try self.init(pattern: pattern) 73 | } catch { 74 | preconditionFailure("Illegal regular expression: \(pattern).") 75 | } 76 | } 77 | } 78 | 79 | extension NSRegularExpression { 80 | func matches(_ string: String) -> NSTextCheckingResult? { 81 | let range = NSRange(location: 0, length: string.utf16.count) 82 | return firstMatch(in: string, options: [], range: range) 83 | } 84 | } 85 | 86 | // MARK: - Helper functions 87 | 88 | func fetchPods(_ path: String) -> [Library]? { 89 | var pods:[Library] = [] 90 | do { 91 | // Get the contents 92 | let contents = try String(contentsOfFile: path, encoding: .utf8) 93 | let lines = contents.split(separator: "\n").map { String($0) } 94 | for line in lines { 95 | if let podName = line.match(.pod)?.components(separatedBy: "/").first { 96 | pods.append(Library(name: podName)) 97 | } 98 | if let cartLib = line.match(.cart) { 99 | let lib = Library(name: cartLib) 100 | lib.repo = "https://github.com/" + lib.name 101 | pods.append(lib) 102 | } 103 | } 104 | } 105 | catch { 106 | print("Failed to open Podfile at \(path)") 107 | print("make sure the file exists") 108 | return nil 109 | } 110 | return pods 111 | 112 | } 113 | 114 | func fetchUrl(pod: String) -> String { 115 | 116 | let path = "https://cocoapods.org/pods/\(pod)" 117 | 118 | guard let data = get(url: path).take()?.data, 119 | let contents = String(data: data, encoding: .utf8), 120 | !contents.contains("404") else { 121 | return "" 122 | } 123 | 124 | return contents 125 | 126 | } 127 | 128 | 129 | func hasSwiftPackageFile(repoUrl: String) -> Bool { 130 | let spmUrl = repoUrl.replacingOccurrences(of: ".git", with: "") + "/blob/master/Package.swift" 131 | 132 | if let code = get(url: spmUrl).take()?.code, code == 200 { 133 | return true 134 | } 135 | 136 | return false 137 | } 138 | 139 | 140 | func fetchRepoOnline(podName: String) -> String? { 141 | return fetchUrl(pod: podName).match(.podRepoUrl) 142 | } 143 | 144 | 145 | // MARK: - Data model 146 | 147 | class Library { 148 | init(name: String) { 149 | self.name = name 150 | } 151 | 152 | let name: String 153 | var repo: String? 154 | var spmready: Bool = false 155 | } 156 | 157 | extension Library: Hashable { 158 | 159 | static func == (lhs: Library, rhs: Library) -> Bool { 160 | lhs.name == rhs.name 161 | } 162 | 163 | func hash(into hasher: inout Hasher) { 164 | hasher.combine(name) 165 | } 166 | } 167 | 168 | extension Library { 169 | func readyOrNot() -> String { 170 | return spmready ? "✅" : "❌" 171 | } 172 | 173 | func format() -> String { 174 | return "\(self.readyOrNot()) | \(self.name) : \(self.repo ?? "not found")" 175 | } 176 | } 177 | 178 | extension Array where Element: Hashable { 179 | func asSet() -> Set { 180 | Set(self) 181 | } 182 | } 183 | 184 | // MARK: actual script 185 | 186 | let paths: [String] 187 | 188 | if CommandLine.arguments.count == 2 { 189 | paths = [CommandLine.arguments[1]] 190 | } else { 191 | let arg = CommandLine.arguments.first! 192 | let workingFolder: String 193 | if let index = arg.lastIndex(of: "/") { 194 | workingFolder = String(arg.prefix(upTo: index)) 195 | } else { 196 | workingFolder = "." 197 | } 198 | paths = [workingFolder + "/Podfile", workingFolder + "/Cartfile", workingFolder + "/Cartfile.private"].compactMap({ FileManager.default.fileExists(atPath: $0) ? $0 : nil }) 199 | } 200 | 201 | 202 | // Set the file path 203 | 204 | let libraries = paths 205 | .compactMap(fetchPods) 206 | .flatMap { $0 } 207 | .asSet() 208 | .sorted { $0.name < $1.name } 209 | 210 | guard !libraries.isEmpty else { 211 | exit(1) 212 | } 213 | 214 | print("Found \(libraries.count) dependencies") 215 | 216 | for library in libraries { 217 | if library.repo == nil, let url = fetchRepoOnline(podName: library.name) { 218 | library.repo = url 219 | } 220 | 221 | if let repo = library.repo, hasSwiftPackageFile(repoUrl: repo) { 222 | library.spmready = true 223 | } 224 | 225 | print(library.format()) 226 | 227 | } 228 | 229 | let ready = libraries.filter { $0.spmready }.count 230 | let notReady = libraries.filter { !$0.spmready }.count 231 | 232 | if ready == libraries.count { 233 | print("🎊 you are ready for Swift Package Manager") 234 | } else { 235 | print("Sorry 😢 - ✅ \(ready) | ❌ \(notReady)") 236 | print("Help to improve SPM capablility by opening an issue or contribute via a Pullrequest") 237 | } 238 | 239 | 240 | 241 | -------------------------------------------------------------------------------- /spmready.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 7F43A1AE2326E83F00061123 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F43A1AD2326E83F00061123 /* main.swift */; }; 11 | 7F7BEF41232C2C5B001781BB /* spmreadytest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7BEF40232C2C5B001781BB /* spmreadytest.swift */; }; 12 | 7F7BEF46232C2E4F001781BB /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F43A1AD2326E83F00061123 /* main.swift */; }; 13 | /* End PBXBuildFile section */ 14 | 15 | /* Begin PBXCopyFilesBuildPhase section */ 16 | 7F5D46DD2322F85B0080ADDA /* CopyFiles */ = { 17 | isa = PBXCopyFilesBuildPhase; 18 | buildActionMask = 2147483647; 19 | dstPath = /usr/share/man/man1/; 20 | dstSubfolderSpec = 0; 21 | files = ( 22 | ); 23 | runOnlyForDeploymentPostprocessing = 1; 24 | }; 25 | /* End PBXCopyFilesBuildPhase section */ 26 | 27 | /* Begin PBXFileReference section */ 28 | 7F43A1AD2326E83F00061123 /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; 29 | 7F5D46DF2322F85B0080ADDA /* spmready */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = spmready; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | 7F7BEF3E232C2C5B001781BB /* spmreadytest.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = spmreadytest.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 7F7BEF40232C2C5B001781BB /* spmreadytest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = spmreadytest.swift; sourceTree = ""; }; 32 | 7F7BEF42232C2C5B001781BB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | /* End PBXFileReference section */ 34 | 35 | /* Begin PBXFrameworksBuildPhase section */ 36 | 7F5D46DC2322F85B0080ADDA /* Frameworks */ = { 37 | isa = PBXFrameworksBuildPhase; 38 | buildActionMask = 2147483647; 39 | files = ( 40 | ); 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | 7F7BEF3B232C2C5B001781BB /* Frameworks */ = { 44 | isa = PBXFrameworksBuildPhase; 45 | buildActionMask = 2147483647; 46 | files = ( 47 | ); 48 | runOnlyForDeploymentPostprocessing = 0; 49 | }; 50 | /* End PBXFrameworksBuildPhase section */ 51 | 52 | /* Begin PBXGroup section */ 53 | 7F5D46D62322F85B0080ADDA = { 54 | isa = PBXGroup; 55 | children = ( 56 | 7F43A1AD2326E83F00061123 /* main.swift */, 57 | 7F7BEF3F232C2C5B001781BB /* spmreadytest */, 58 | 7F5D46E02322F85B0080ADDA /* Products */, 59 | ); 60 | sourceTree = ""; 61 | }; 62 | 7F5D46E02322F85B0080ADDA /* Products */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 7F5D46DF2322F85B0080ADDA /* spmready */, 66 | 7F7BEF3E232C2C5B001781BB /* spmreadytest.xctest */, 67 | ); 68 | name = Products; 69 | sourceTree = ""; 70 | }; 71 | 7F7BEF3F232C2C5B001781BB /* spmreadytest */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 7F7BEF40232C2C5B001781BB /* spmreadytest.swift */, 75 | 7F7BEF42232C2C5B001781BB /* Info.plist */, 76 | ); 77 | path = spmreadytest; 78 | sourceTree = ""; 79 | }; 80 | /* End PBXGroup section */ 81 | 82 | /* Begin PBXNativeTarget section */ 83 | 7F5D46DE2322F85B0080ADDA /* spmready */ = { 84 | isa = PBXNativeTarget; 85 | buildConfigurationList = 7F5D46E62322F85B0080ADDA /* Build configuration list for PBXNativeTarget "spmready" */; 86 | buildPhases = ( 87 | 7F5D46DB2322F85B0080ADDA /* Sources */, 88 | 7F5D46DC2322F85B0080ADDA /* Frameworks */, 89 | 7F5D46DD2322F85B0080ADDA /* CopyFiles */, 90 | ); 91 | buildRules = ( 92 | ); 93 | dependencies = ( 94 | ); 95 | name = spmready; 96 | packageProductDependencies = ( 97 | ); 98 | productName = pod2spm; 99 | productReference = 7F5D46DF2322F85B0080ADDA /* spmready */; 100 | productType = "com.apple.product-type.tool"; 101 | }; 102 | 7F7BEF3D232C2C5B001781BB /* spmreadytest */ = { 103 | isa = PBXNativeTarget; 104 | buildConfigurationList = 7F7BEF43232C2C5B001781BB /* Build configuration list for PBXNativeTarget "spmreadytest" */; 105 | buildPhases = ( 106 | 7F7BEF3A232C2C5B001781BB /* Sources */, 107 | 7F7BEF3B232C2C5B001781BB /* Frameworks */, 108 | 7F7BEF3C232C2C5B001781BB /* Resources */, 109 | ); 110 | buildRules = ( 111 | ); 112 | dependencies = ( 113 | ); 114 | name = spmreadytest; 115 | productName = spmreadytest; 116 | productReference = 7F7BEF3E232C2C5B001781BB /* spmreadytest.xctest */; 117 | productType = "com.apple.product-type.bundle.unit-test"; 118 | }; 119 | /* End PBXNativeTarget section */ 120 | 121 | /* Begin PBXProject section */ 122 | 7F5D46D72322F85B0080ADDA /* Project object */ = { 123 | isa = PBXProject; 124 | attributes = { 125 | LastSwiftUpdateCheck = 1100; 126 | LastUpgradeCheck = 1100; 127 | ORGANIZATIONNAME = "sipgate GmbH"; 128 | TargetAttributes = { 129 | 7F5D46DE2322F85B0080ADDA = { 130 | CreatedOnToolsVersion = 11.0; 131 | }; 132 | 7F7BEF3D232C2C5B001781BB = { 133 | CreatedOnToolsVersion = 11.0; 134 | }; 135 | }; 136 | }; 137 | buildConfigurationList = 7F5D46DA2322F85B0080ADDA /* Build configuration list for PBXProject "spmready" */; 138 | compatibilityVersion = "Xcode 9.3"; 139 | developmentRegion = en; 140 | hasScannedForEncodings = 0; 141 | knownRegions = ( 142 | en, 143 | Base, 144 | ); 145 | mainGroup = 7F5D46D62322F85B0080ADDA; 146 | packageReferences = ( 147 | ); 148 | productRefGroup = 7F5D46E02322F85B0080ADDA /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 7F5D46DE2322F85B0080ADDA /* spmready */, 153 | 7F7BEF3D232C2C5B001781BB /* spmreadytest */, 154 | ); 155 | }; 156 | /* End PBXProject section */ 157 | 158 | /* Begin PBXResourcesBuildPhase section */ 159 | 7F7BEF3C232C2C5B001781BB /* Resources */ = { 160 | isa = PBXResourcesBuildPhase; 161 | buildActionMask = 2147483647; 162 | files = ( 163 | ); 164 | runOnlyForDeploymentPostprocessing = 0; 165 | }; 166 | /* End PBXResourcesBuildPhase section */ 167 | 168 | /* Begin PBXSourcesBuildPhase section */ 169 | 7F5D46DB2322F85B0080ADDA /* Sources */ = { 170 | isa = PBXSourcesBuildPhase; 171 | buildActionMask = 2147483647; 172 | files = ( 173 | 7F43A1AE2326E83F00061123 /* main.swift in Sources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | 7F7BEF3A232C2C5B001781BB /* Sources */ = { 178 | isa = PBXSourcesBuildPhase; 179 | buildActionMask = 2147483647; 180 | files = ( 181 | 7F7BEF46232C2E4F001781BB /* main.swift in Sources */, 182 | 7F7BEF41232C2C5B001781BB /* spmreadytest.swift in Sources */, 183 | ); 184 | runOnlyForDeploymentPostprocessing = 0; 185 | }; 186 | /* End PBXSourcesBuildPhase section */ 187 | 188 | /* Begin XCBuildConfiguration section */ 189 | 7F5D46E42322F85B0080ADDA /* Debug */ = { 190 | isa = XCBuildConfiguration; 191 | buildSettings = { 192 | ALWAYS_SEARCH_USER_PATHS = NO; 193 | CLANG_ANALYZER_NONNULL = YES; 194 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 195 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 196 | CLANG_CXX_LIBRARY = "libc++"; 197 | CLANG_ENABLE_MODULES = YES; 198 | CLANG_ENABLE_OBJC_ARC = YES; 199 | CLANG_ENABLE_OBJC_WEAK = YES; 200 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 201 | CLANG_WARN_BOOL_CONVERSION = YES; 202 | CLANG_WARN_COMMA = YES; 203 | CLANG_WARN_CONSTANT_CONVERSION = YES; 204 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 205 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 206 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 207 | CLANG_WARN_EMPTY_BODY = YES; 208 | CLANG_WARN_ENUM_CONVERSION = YES; 209 | CLANG_WARN_INFINITE_RECURSION = YES; 210 | CLANG_WARN_INT_CONVERSION = YES; 211 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 212 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 213 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 214 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 215 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 216 | CLANG_WARN_STRICT_PROTOTYPES = YES; 217 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 218 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 219 | CLANG_WARN_UNREACHABLE_CODE = YES; 220 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 221 | COPY_PHASE_STRIP = NO; 222 | DEBUG_INFORMATION_FORMAT = dwarf; 223 | ENABLE_STRICT_OBJC_MSGSEND = YES; 224 | ENABLE_TESTABILITY = YES; 225 | GCC_C_LANGUAGE_STANDARD = gnu11; 226 | GCC_DYNAMIC_NO_PIC = NO; 227 | GCC_NO_COMMON_BLOCKS = YES; 228 | GCC_OPTIMIZATION_LEVEL = 0; 229 | GCC_PREPROCESSOR_DEFINITIONS = ( 230 | "DEBUG=1", 231 | "$(inherited)", 232 | ); 233 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 234 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 235 | GCC_WARN_UNDECLARED_SELECTOR = YES; 236 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 237 | GCC_WARN_UNUSED_FUNCTION = YES; 238 | GCC_WARN_UNUSED_VARIABLE = YES; 239 | MACOSX_DEPLOYMENT_TARGET = 10.15; 240 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 241 | MTL_FAST_MATH = YES; 242 | ONLY_ACTIVE_ARCH = YES; 243 | SDKROOT = macosx; 244 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 245 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 246 | }; 247 | name = Debug; 248 | }; 249 | 7F5D46E52322F85B0080ADDA /* Release */ = { 250 | isa = XCBuildConfiguration; 251 | buildSettings = { 252 | ALWAYS_SEARCH_USER_PATHS = NO; 253 | CLANG_ANALYZER_NONNULL = YES; 254 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 255 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 256 | CLANG_CXX_LIBRARY = "libc++"; 257 | CLANG_ENABLE_MODULES = YES; 258 | CLANG_ENABLE_OBJC_ARC = YES; 259 | CLANG_ENABLE_OBJC_WEAK = YES; 260 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 261 | CLANG_WARN_BOOL_CONVERSION = YES; 262 | CLANG_WARN_COMMA = YES; 263 | CLANG_WARN_CONSTANT_CONVERSION = YES; 264 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 265 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 266 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 267 | CLANG_WARN_EMPTY_BODY = YES; 268 | CLANG_WARN_ENUM_CONVERSION = YES; 269 | CLANG_WARN_INFINITE_RECURSION = YES; 270 | CLANG_WARN_INT_CONVERSION = YES; 271 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 272 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 273 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 274 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 275 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 276 | CLANG_WARN_STRICT_PROTOTYPES = YES; 277 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 278 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 279 | CLANG_WARN_UNREACHABLE_CODE = YES; 280 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 281 | COPY_PHASE_STRIP = NO; 282 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 283 | ENABLE_NS_ASSERTIONS = NO; 284 | ENABLE_STRICT_OBJC_MSGSEND = YES; 285 | GCC_C_LANGUAGE_STANDARD = gnu11; 286 | GCC_NO_COMMON_BLOCKS = YES; 287 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 288 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 289 | GCC_WARN_UNDECLARED_SELECTOR = YES; 290 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 291 | GCC_WARN_UNUSED_FUNCTION = YES; 292 | GCC_WARN_UNUSED_VARIABLE = YES; 293 | MACOSX_DEPLOYMENT_TARGET = 10.15; 294 | MTL_ENABLE_DEBUG_INFO = NO; 295 | MTL_FAST_MATH = YES; 296 | SDKROOT = macosx; 297 | SWIFT_COMPILATION_MODE = wholemodule; 298 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 299 | }; 300 | name = Release; 301 | }; 302 | 7F5D46E72322F85B0080ADDA /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | CODE_SIGN_ENTITLEMENTS = ""; 306 | CODE_SIGN_STYLE = Automatic; 307 | DEVELOPMENT_TEAM = YL7FVRB37Y; 308 | ENABLE_HARDENED_RUNTIME = YES; 309 | PRODUCT_NAME = "$(TARGET_NAME)"; 310 | SWIFT_VERSION = 5.0; 311 | }; 312 | name = Debug; 313 | }; 314 | 7F5D46E82322F85B0080ADDA /* Release */ = { 315 | isa = XCBuildConfiguration; 316 | buildSettings = { 317 | CODE_SIGN_ENTITLEMENTS = ""; 318 | CODE_SIGN_STYLE = Automatic; 319 | DEVELOPMENT_TEAM = YL7FVRB37Y; 320 | ENABLE_HARDENED_RUNTIME = YES; 321 | PRODUCT_NAME = "$(TARGET_NAME)"; 322 | SWIFT_VERSION = 5.0; 323 | }; 324 | name = Release; 325 | }; 326 | 7F7BEF44232C2C5B001781BB /* Debug */ = { 327 | isa = XCBuildConfiguration; 328 | buildSettings = { 329 | CODE_SIGN_STYLE = Automatic; 330 | COMBINE_HIDPI_IMAGES = YES; 331 | DEVELOPMENT_TEAM = YL7FVRB37Y; 332 | INFOPLIST_FILE = spmreadytest/Info.plist; 333 | LD_RUNPATH_SEARCH_PATHS = ( 334 | "$(inherited)", 335 | "@executable_path/../Frameworks", 336 | "@loader_path/../Frameworks", 337 | ); 338 | PRODUCT_BUNDLE_IDENTIFIER = dev.humi.spmreadytest; 339 | PRODUCT_NAME = "$(TARGET_NAME)"; 340 | SWIFT_VERSION = 5.0; 341 | }; 342 | name = Debug; 343 | }; 344 | 7F7BEF45232C2C5B001781BB /* Release */ = { 345 | isa = XCBuildConfiguration; 346 | buildSettings = { 347 | CODE_SIGN_STYLE = Automatic; 348 | COMBINE_HIDPI_IMAGES = YES; 349 | DEVELOPMENT_TEAM = YL7FVRB37Y; 350 | INFOPLIST_FILE = spmreadytest/Info.plist; 351 | LD_RUNPATH_SEARCH_PATHS = ( 352 | "$(inherited)", 353 | "@executable_path/../Frameworks", 354 | "@loader_path/../Frameworks", 355 | ); 356 | PRODUCT_BUNDLE_IDENTIFIER = dev.humi.spmreadytest; 357 | PRODUCT_NAME = "$(TARGET_NAME)"; 358 | SWIFT_VERSION = 5.0; 359 | }; 360 | name = Release; 361 | }; 362 | /* End XCBuildConfiguration section */ 363 | 364 | /* Begin XCConfigurationList section */ 365 | 7F5D46DA2322F85B0080ADDA /* Build configuration list for PBXProject "spmready" */ = { 366 | isa = XCConfigurationList; 367 | buildConfigurations = ( 368 | 7F5D46E42322F85B0080ADDA /* Debug */, 369 | 7F5D46E52322F85B0080ADDA /* Release */, 370 | ); 371 | defaultConfigurationIsVisible = 0; 372 | defaultConfigurationName = Release; 373 | }; 374 | 7F5D46E62322F85B0080ADDA /* Build configuration list for PBXNativeTarget "spmready" */ = { 375 | isa = XCConfigurationList; 376 | buildConfigurations = ( 377 | 7F5D46E72322F85B0080ADDA /* Debug */, 378 | 7F5D46E82322F85B0080ADDA /* Release */, 379 | ); 380 | defaultConfigurationIsVisible = 0; 381 | defaultConfigurationName = Release; 382 | }; 383 | 7F7BEF43232C2C5B001781BB /* Build configuration list for PBXNativeTarget "spmreadytest" */ = { 384 | isa = XCConfigurationList; 385 | buildConfigurations = ( 386 | 7F7BEF44232C2C5B001781BB /* Debug */, 387 | 7F7BEF45232C2C5B001781BB /* Release */, 388 | ); 389 | defaultConfigurationIsVisible = 0; 390 | defaultConfigurationName = Release; 391 | }; 392 | /* End XCConfigurationList section */ 393 | }; 394 | rootObject = 7F5D46D72322F85B0080ADDA /* Project object */; 395 | } 396 | -------------------------------------------------------------------------------- /spmready.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spmready.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /spmready.xcodeproj/project.xcworkspace/xcuserdata/humann.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StatusQuo/spmready/7c1ccea3c1cbc5e0dccf5629e86c362891c4e064/spmready.xcodeproj/project.xcworkspace/xcuserdata/humann.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /spmready.xcodeproj/xcshareddata/xcschemes/pod2spm.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 67 | 68 | 69 | 70 | 76 | 78 | 84 | 85 | 86 | 87 | 89 | 90 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /spmready.xcodeproj/xcuserdata/humann.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /spmready.xcodeproj/xcuserdata/humann.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | pod2spm.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 7F5D46DE2322F85B0080ADDA 16 | 17 | primary 18 | 19 | 20 | 7F7BEF3D232C2C5B001781BB 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /spmreadytest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /spmreadytest/spmreadytest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // spmreadytest.swift 3 | // spmreadytest 4 | // 5 | // Created by Sebastian Humann on 13.09.19. 6 | // Copyright © 2019 Sebastian Humann. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | 12 | class spmreadytest: XCTestCase { 13 | 14 | override func setUp() { 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | } 21 | 22 | func testSingleQuotePod() { 23 | let name = " pod 'Name', '~> 16.0.1'".match(.pod) 24 | XCTAssertEqual(name, "Name") 25 | } 26 | 27 | func testDoubleQuotePod() { 28 | let name = #" pod "Name", "~> 16.0.1""#.match(.pod) 29 | XCTAssertEqual(name, "Name") 30 | } 31 | 32 | func testPodParseSafe() { 33 | let name = #" ajshgdjsad"#.match(.pod) 34 | XCTAssertEqual(name, nil) 35 | } 36 | 37 | func testCartParseSafe() { 38 | let name = #" github "ReactiveCocoa/ReactiveCocoa""#.match(.cart) 39 | XCTAssertEqual(name, nil) 40 | } 41 | 42 | 43 | 44 | } 45 | --------------------------------------------------------------------------------