├── .github ├── FUNDING.yml └── workflows │ └── stale.yml ├── .gitignore ├── .gitmodules ├── .swiftpm └── xcode │ └── package.xcworkspace │ └── contents.xcworkspacedata ├── CODEOWNERS ├── Changelog.md ├── Dangerfile.swift ├── Gemfile ├── LICENSE ├── Package.resolved ├── Package.swift ├── Poes.xcodeproj ├── Basic_Info.plist ├── PoesCore_Info.plist ├── PoesTests_Info.plist ├── SPMLibc_Info.plist ├── SPMUtility_Info.plist ├── clibc_Info.plist ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── WorkspaceSettings.xcsettings └── xcshareddata │ └── xcschemes │ ├── Poes-Package.xcscheme │ └── Poes.xcscheme ├── README.md ├── Sources ├── Poes │ └── main.swift └── PoesCore │ ├── Helpers │ ├── Log.swift │ └── Shell.swift │ ├── Payload.swift │ ├── Poes.swift │ └── Send.swift ├── Tests ├── LinuxMain.swift └── PoesTests │ ├── Mocks.swift │ └── PoesTests.swift └── fastlane ├── .gitignore └── Fastfile /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [AvdLee] 4 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Mark stale issues and pull requests 2 | 3 | on: 4 | schedule: 5 | - cron: "0 0 * * *" 6 | 7 | jobs: 8 | stale: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/stale@v3 12 | with: 13 | repo-token: ${{ secrets.GITHUB_TOKEN }} 14 | stale-issue-label: 'Stale' 15 | stale-issue-message: 'This issue is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.' 16 | stale-pr-label: 'Stale' 17 | stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.' 18 | exempt-issue-labels: 'bug,enhancement' 19 | days-before-stale: 30 20 | days-before-close: 30 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | Packages/ 41 | Package.pins 42 | Package.resolved 43 | *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Submodules/WeTransfer-iOS-CI"] 2 | path = Submodules/WeTransfer-iOS-CI 3 | url = https://github.com/WeTransfer/WeTransfer-iOS-CI.git 4 | -------------------------------------------------------------------------------- /.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # https://help.github.com/en/articles/about-code-owners 2 | # These owners will be the default owners for everything in 3 | # the repo. Unless a later match takes precedence, they 4 | # will be requested for review when someone opens a PR. 5 | * @AvdLee -------------------------------------------------------------------------------- /Changelog.md: -------------------------------------------------------------------------------- 1 | ### 2.0.0 2 | - Make use of the new ArgumentParser framework ([#13](https://github.com/AvdLee/Poes/issues/13)) via @AvdLee 3 | - Merge release 1.1.0 into master ([#11](https://github.com/AvdLee/Poes/pull/11)) 4 | 5 | ### 1.1.0 6 | - Add support for badge counts ([#4](https://github.com/AvdLee/Poes/issues/4)) 7 | 8 | ### 1.0.0 9 | - Initial version ([#1](https://github.com/AvdLee/Poes/pull/1)) via @AvdLee 10 | -------------------------------------------------------------------------------- /Dangerfile.swift: -------------------------------------------------------------------------------- 1 | import Danger 2 | import WeTransferPRLinter 3 | 4 | WeTransferPRLinter.lint() 5 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ci_gems_path = File.join(File.dirname(__FILE__), "Submodules/WeTransfer-iOS-CI/Gemfile") 4 | eval_gemfile(ci_gems_path) if File.exist?(ci_gems_path) 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Antoine van der Lee 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 | -------------------------------------------------------------------------------- /Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "swift-argument-parser", 6 | "repositoryURL": "https://github.com/apple/swift-argument-parser", 7 | "state": { 8 | "branch": null, 9 | "revision": "f6ac7b8118ff5d1bc0faee7f37bf6f8fd8f95602", 10 | "version": "0.0.1" 11 | } 12 | } 13 | ] 14 | }, 15 | "version": 1 16 | } 17 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.1 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | // We're hiding dev, test, and danger dependencies with // dev to make sure they're not fetched by users of this package. 4 | 5 | import PackageDescription 6 | 7 | let package = Package( 8 | name: "Poes", 9 | platforms: [ 10 | .macOS(.v10_15) 11 | ], 12 | products: [ 13 | // dev .library(name: "DangerDeps", type: .dynamic, targets: ["DangerDependencies"]), 14 | .executable(name: "Poes", targets: ["Poes"]) 15 | ], 16 | dependencies: [ 17 | // dev .package(url: "https://github.com/danger/swift", from: "3.0.0"), 18 | // dev .package(path: "Submodules/WeTransfer-iOS-CI/Danger-Swift"), 19 | .package(url: "https://github.com/apple/swift-argument-parser", from: "0.0.1") 20 | ], 21 | targets: [ 22 | // dev .testTarget(name: "PoesTests", dependencies: ["PoesCore"]), 23 | // dev .target(name: "DangerDependencies", dependencies: ["Danger", "WeTransferPRLinter"], path: "Submodules/WeTransfer-iOS-CI/Danger-Swift", sources: ["DangerFakeSource.swift"]), 24 | .target(name: "Poes", dependencies: ["PoesCore"]), 25 | .target(name: "PoesCore", dependencies: ["ArgumentParser"]) 26 | ] 27 | ) 28 | -------------------------------------------------------------------------------- /Poes.xcodeproj/Basic_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Poes.xcodeproj/PoesCore_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Poes.xcodeproj/PoesTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Poes.xcodeproj/SPMLibc_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Poes.xcodeproj/SPMUtility_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Poes.xcodeproj/clibc_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Poes.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = "1"; 4 | objectVersion = "46"; 5 | objects = { 6 | "OBJ_1" = { 7 | isa = "PBXProject"; 8 | attributes = { 9 | LastSwiftMigration = "9999"; 10 | LastUpgradeCheck = "9999"; 11 | }; 12 | buildConfigurationList = "OBJ_2"; 13 | compatibilityVersion = "Xcode 3.2"; 14 | developmentRegion = "en"; 15 | hasScannedForEncodings = "0"; 16 | knownRegions = ( 17 | "en" 18 | ); 19 | mainGroup = "OBJ_5"; 20 | productRefGroup = "OBJ_58"; 21 | projectDirPath = "."; 22 | targets = ( 23 | "swift-argument-parser::ArgumentParser", 24 | "Poes::Poes", 25 | "Poes::PoesCore", 26 | "Poes::SwiftPMPackageDescription", 27 | "Poes::PoesPackageTests::ProductTarget", 28 | "Poes::PoesTests", 29 | "swift-argument-parser::SwiftPMPackageDescription" 30 | ); 31 | }; 32 | "OBJ_10" = { 33 | isa = "PBXGroup"; 34 | children = ( 35 | "OBJ_11", 36 | "OBJ_14", 37 | "OBJ_15", 38 | "OBJ_16" 39 | ); 40 | name = "PoesCore"; 41 | path = "Sources/PoesCore"; 42 | sourceTree = "SOURCE_ROOT"; 43 | }; 44 | "OBJ_100" = { 45 | isa = "PBXBuildFile"; 46 | fileRef = "OBJ_53"; 47 | }; 48 | "OBJ_101" = { 49 | isa = "PBXBuildFile"; 50 | fileRef = "OBJ_55"; 51 | }; 52 | "OBJ_102" = { 53 | isa = "PBXBuildFile"; 54 | fileRef = "OBJ_56"; 55 | }; 56 | "OBJ_103" = { 57 | isa = "PBXFrameworksBuildPhase"; 58 | files = ( 59 | ); 60 | }; 61 | "OBJ_105" = { 62 | isa = "XCConfigurationList"; 63 | buildConfigurations = ( 64 | "OBJ_106", 65 | "OBJ_107" 66 | ); 67 | defaultConfigurationIsVisible = "0"; 68 | defaultConfigurationName = "Release"; 69 | }; 70 | "OBJ_106" = { 71 | isa = "XCBuildConfiguration"; 72 | buildSettings = { 73 | FRAMEWORK_SEARCH_PATHS = ( 74 | "$(inherited)", 75 | "$(PLATFORM_DIR)/Developer/Library/Frameworks" 76 | ); 77 | HEADER_SEARCH_PATHS = ( 78 | "$(inherited)" 79 | ); 80 | INFOPLIST_FILE = "Poes.xcodeproj/Poes_Info.plist"; 81 | IPHONEOS_DEPLOYMENT_TARGET = "8.0"; 82 | LD_RUNPATH_SEARCH_PATHS = ( 83 | "$(inherited)", 84 | "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx", 85 | "@executable_path" 86 | ); 87 | MACOSX_DEPLOYMENT_TARGET = "10.15"; 88 | OTHER_CFLAGS = ( 89 | "$(inherited)" 90 | ); 91 | OTHER_LDFLAGS = ( 92 | "$(inherited)" 93 | ); 94 | OTHER_SWIFT_FLAGS = ( 95 | "$(inherited)" 96 | ); 97 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( 98 | "$(inherited)" 99 | ); 100 | SWIFT_FORCE_DYNAMIC_LINK_STDLIB = "YES"; 101 | SWIFT_FORCE_STATIC_LINK_STDLIB = "NO"; 102 | SWIFT_VERSION = "5.0"; 103 | TARGET_NAME = "Poes"; 104 | TVOS_DEPLOYMENT_TARGET = "9.0"; 105 | WATCHOS_DEPLOYMENT_TARGET = "2.0"; 106 | }; 107 | name = "Debug"; 108 | }; 109 | "OBJ_107" = { 110 | isa = "XCBuildConfiguration"; 111 | buildSettings = { 112 | FRAMEWORK_SEARCH_PATHS = ( 113 | "$(inherited)", 114 | "$(PLATFORM_DIR)/Developer/Library/Frameworks" 115 | ); 116 | HEADER_SEARCH_PATHS = ( 117 | "$(inherited)" 118 | ); 119 | INFOPLIST_FILE = "Poes.xcodeproj/Poes_Info.plist"; 120 | IPHONEOS_DEPLOYMENT_TARGET = "8.0"; 121 | LD_RUNPATH_SEARCH_PATHS = ( 122 | "$(inherited)", 123 | "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx", 124 | "@executable_path" 125 | ); 126 | MACOSX_DEPLOYMENT_TARGET = "10.15"; 127 | OTHER_CFLAGS = ( 128 | "$(inherited)" 129 | ); 130 | OTHER_LDFLAGS = ( 131 | "$(inherited)" 132 | ); 133 | OTHER_SWIFT_FLAGS = ( 134 | "$(inherited)" 135 | ); 136 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( 137 | "$(inherited)" 138 | ); 139 | SWIFT_FORCE_DYNAMIC_LINK_STDLIB = "YES"; 140 | SWIFT_FORCE_STATIC_LINK_STDLIB = "NO"; 141 | SWIFT_VERSION = "5.0"; 142 | TARGET_NAME = "Poes"; 143 | TVOS_DEPLOYMENT_TARGET = "9.0"; 144 | WATCHOS_DEPLOYMENT_TARGET = "2.0"; 145 | }; 146 | name = "Release"; 147 | }; 148 | "OBJ_108" = { 149 | isa = "PBXSourcesBuildPhase"; 150 | files = ( 151 | "OBJ_109" 152 | ); 153 | }; 154 | "OBJ_109" = { 155 | isa = "PBXBuildFile"; 156 | fileRef = "OBJ_9"; 157 | }; 158 | "OBJ_11" = { 159 | isa = "PBXGroup"; 160 | children = ( 161 | "OBJ_12", 162 | "OBJ_13" 163 | ); 164 | name = "Helpers"; 165 | path = "Helpers"; 166 | sourceTree = ""; 167 | }; 168 | "OBJ_110" = { 169 | isa = "PBXFrameworksBuildPhase"; 170 | files = ( 171 | "OBJ_111", 172 | "OBJ_112" 173 | ); 174 | }; 175 | "OBJ_111" = { 176 | isa = "PBXBuildFile"; 177 | fileRef = "Poes::PoesCore::Product"; 178 | }; 179 | "OBJ_112" = { 180 | isa = "PBXBuildFile"; 181 | fileRef = "swift-argument-parser::ArgumentParser::Product"; 182 | }; 183 | "OBJ_113" = { 184 | isa = "PBXTargetDependency"; 185 | target = "Poes::PoesCore"; 186 | }; 187 | "OBJ_115" = { 188 | isa = "PBXTargetDependency"; 189 | target = "swift-argument-parser::ArgumentParser"; 190 | }; 191 | "OBJ_116" = { 192 | isa = "XCConfigurationList"; 193 | buildConfigurations = ( 194 | "OBJ_117", 195 | "OBJ_118" 196 | ); 197 | defaultConfigurationIsVisible = "0"; 198 | defaultConfigurationName = "Release"; 199 | }; 200 | "OBJ_117" = { 201 | isa = "XCBuildConfiguration"; 202 | buildSettings = { 203 | ENABLE_TESTABILITY = "YES"; 204 | FRAMEWORK_SEARCH_PATHS = ( 205 | "$(inherited)", 206 | "$(PLATFORM_DIR)/Developer/Library/Frameworks" 207 | ); 208 | HEADER_SEARCH_PATHS = ( 209 | "$(inherited)" 210 | ); 211 | INFOPLIST_FILE = "Poes.xcodeproj/PoesCore_Info.plist"; 212 | IPHONEOS_DEPLOYMENT_TARGET = "8.0"; 213 | LD_RUNPATH_SEARCH_PATHS = ( 214 | "$(inherited)", 215 | "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" 216 | ); 217 | MACOSX_DEPLOYMENT_TARGET = "10.15"; 218 | OTHER_CFLAGS = ( 219 | "$(inherited)" 220 | ); 221 | OTHER_LDFLAGS = ( 222 | "$(inherited)" 223 | ); 224 | OTHER_SWIFT_FLAGS = ( 225 | "$(inherited)" 226 | ); 227 | PRODUCT_BUNDLE_IDENTIFIER = "PoesCore"; 228 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; 229 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 230 | SKIP_INSTALL = "YES"; 231 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( 232 | "$(inherited)" 233 | ); 234 | SWIFT_VERSION = "5.0"; 235 | TARGET_NAME = "PoesCore"; 236 | TVOS_DEPLOYMENT_TARGET = "9.0"; 237 | WATCHOS_DEPLOYMENT_TARGET = "2.0"; 238 | }; 239 | name = "Debug"; 240 | }; 241 | "OBJ_118" = { 242 | isa = "XCBuildConfiguration"; 243 | buildSettings = { 244 | ENABLE_TESTABILITY = "YES"; 245 | FRAMEWORK_SEARCH_PATHS = ( 246 | "$(inherited)", 247 | "$(PLATFORM_DIR)/Developer/Library/Frameworks" 248 | ); 249 | HEADER_SEARCH_PATHS = ( 250 | "$(inherited)" 251 | ); 252 | INFOPLIST_FILE = "Poes.xcodeproj/PoesCore_Info.plist"; 253 | IPHONEOS_DEPLOYMENT_TARGET = "8.0"; 254 | LD_RUNPATH_SEARCH_PATHS = ( 255 | "$(inherited)", 256 | "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" 257 | ); 258 | MACOSX_DEPLOYMENT_TARGET = "10.15"; 259 | OTHER_CFLAGS = ( 260 | "$(inherited)" 261 | ); 262 | OTHER_LDFLAGS = ( 263 | "$(inherited)" 264 | ); 265 | OTHER_SWIFT_FLAGS = ( 266 | "$(inherited)" 267 | ); 268 | PRODUCT_BUNDLE_IDENTIFIER = "PoesCore"; 269 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; 270 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 271 | SKIP_INSTALL = "YES"; 272 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( 273 | "$(inherited)" 274 | ); 275 | SWIFT_VERSION = "5.0"; 276 | TARGET_NAME = "PoesCore"; 277 | TVOS_DEPLOYMENT_TARGET = "9.0"; 278 | WATCHOS_DEPLOYMENT_TARGET = "2.0"; 279 | }; 280 | name = "Release"; 281 | }; 282 | "OBJ_119" = { 283 | isa = "PBXSourcesBuildPhase"; 284 | files = ( 285 | "OBJ_120", 286 | "OBJ_121", 287 | "OBJ_122", 288 | "OBJ_123", 289 | "OBJ_124" 290 | ); 291 | }; 292 | "OBJ_12" = { 293 | isa = "PBXFileReference"; 294 | path = "Log.swift"; 295 | sourceTree = ""; 296 | }; 297 | "OBJ_120" = { 298 | isa = "PBXBuildFile"; 299 | fileRef = "OBJ_12"; 300 | }; 301 | "OBJ_121" = { 302 | isa = "PBXBuildFile"; 303 | fileRef = "OBJ_13"; 304 | }; 305 | "OBJ_122" = { 306 | isa = "PBXBuildFile"; 307 | fileRef = "OBJ_14"; 308 | }; 309 | "OBJ_123" = { 310 | isa = "PBXBuildFile"; 311 | fileRef = "OBJ_15"; 312 | }; 313 | "OBJ_124" = { 314 | isa = "PBXBuildFile"; 315 | fileRef = "OBJ_16"; 316 | }; 317 | "OBJ_125" = { 318 | isa = "PBXFrameworksBuildPhase"; 319 | files = ( 320 | "OBJ_126" 321 | ); 322 | }; 323 | "OBJ_126" = { 324 | isa = "PBXBuildFile"; 325 | fileRef = "swift-argument-parser::ArgumentParser::Product"; 326 | }; 327 | "OBJ_127" = { 328 | isa = "PBXTargetDependency"; 329 | target = "swift-argument-parser::ArgumentParser"; 330 | }; 331 | "OBJ_129" = { 332 | isa = "XCConfigurationList"; 333 | buildConfigurations = ( 334 | "OBJ_130", 335 | "OBJ_131" 336 | ); 337 | defaultConfigurationIsVisible = "0"; 338 | defaultConfigurationName = "Release"; 339 | }; 340 | "OBJ_13" = { 341 | isa = "PBXFileReference"; 342 | path = "Shell.swift"; 343 | sourceTree = ""; 344 | }; 345 | "OBJ_130" = { 346 | isa = "XCBuildConfiguration"; 347 | buildSettings = { 348 | LD = "/usr/bin/true"; 349 | OTHER_SWIFT_FLAGS = ( 350 | "-swift-version", 351 | "5", 352 | "-I", 353 | "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", 354 | "-target", 355 | "x86_64-apple-macosx10.10", 356 | "-sdk", 357 | "/Users/antoinevanderlee/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", 358 | "-package-description-version", 359 | "5.1.0" 360 | ); 361 | SWIFT_VERSION = "5.0"; 362 | }; 363 | name = "Debug"; 364 | }; 365 | "OBJ_131" = { 366 | isa = "XCBuildConfiguration"; 367 | buildSettings = { 368 | LD = "/usr/bin/true"; 369 | OTHER_SWIFT_FLAGS = ( 370 | "-swift-version", 371 | "5", 372 | "-I", 373 | "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", 374 | "-target", 375 | "x86_64-apple-macosx10.10", 376 | "-sdk", 377 | "/Users/antoinevanderlee/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", 378 | "-package-description-version", 379 | "5.1.0" 380 | ); 381 | SWIFT_VERSION = "5.0"; 382 | }; 383 | name = "Release"; 384 | }; 385 | "OBJ_132" = { 386 | isa = "PBXSourcesBuildPhase"; 387 | files = ( 388 | "OBJ_133" 389 | ); 390 | }; 391 | "OBJ_133" = { 392 | isa = "PBXBuildFile"; 393 | fileRef = "OBJ_6"; 394 | }; 395 | "OBJ_135" = { 396 | isa = "XCConfigurationList"; 397 | buildConfigurations = ( 398 | "OBJ_136", 399 | "OBJ_137" 400 | ); 401 | defaultConfigurationIsVisible = "0"; 402 | defaultConfigurationName = "Release"; 403 | }; 404 | "OBJ_136" = { 405 | isa = "XCBuildConfiguration"; 406 | buildSettings = { 407 | }; 408 | name = "Debug"; 409 | }; 410 | "OBJ_137" = { 411 | isa = "XCBuildConfiguration"; 412 | buildSettings = { 413 | }; 414 | name = "Release"; 415 | }; 416 | "OBJ_138" = { 417 | isa = "PBXTargetDependency"; 418 | target = "Poes::PoesTests"; 419 | }; 420 | "OBJ_14" = { 421 | isa = "PBXFileReference"; 422 | path = "Payload.swift"; 423 | sourceTree = ""; 424 | }; 425 | "OBJ_140" = { 426 | isa = "XCConfigurationList"; 427 | buildConfigurations = ( 428 | "OBJ_141", 429 | "OBJ_142" 430 | ); 431 | defaultConfigurationIsVisible = "0"; 432 | defaultConfigurationName = "Release"; 433 | }; 434 | "OBJ_141" = { 435 | isa = "XCBuildConfiguration"; 436 | buildSettings = { 437 | CLANG_ENABLE_MODULES = "YES"; 438 | EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES"; 439 | FRAMEWORK_SEARCH_PATHS = ( 440 | "$(inherited)", 441 | "$(PLATFORM_DIR)/Developer/Library/Frameworks" 442 | ); 443 | HEADER_SEARCH_PATHS = ( 444 | "$(inherited)" 445 | ); 446 | INFOPLIST_FILE = "Poes.xcodeproj/PoesTests_Info.plist"; 447 | IPHONEOS_DEPLOYMENT_TARGET = "8.0"; 448 | LD_RUNPATH_SEARCH_PATHS = ( 449 | "$(inherited)", 450 | "@loader_path/../Frameworks", 451 | "@loader_path/Frameworks" 452 | ); 453 | MACOSX_DEPLOYMENT_TARGET = "10.15"; 454 | OTHER_CFLAGS = ( 455 | "$(inherited)" 456 | ); 457 | OTHER_LDFLAGS = ( 458 | "$(inherited)" 459 | ); 460 | OTHER_SWIFT_FLAGS = ( 461 | "$(inherited)" 462 | ); 463 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( 464 | "$(inherited)" 465 | ); 466 | SWIFT_VERSION = "5.0"; 467 | TARGET_NAME = "PoesTests"; 468 | TVOS_DEPLOYMENT_TARGET = "9.0"; 469 | WATCHOS_DEPLOYMENT_TARGET = "2.0"; 470 | }; 471 | name = "Debug"; 472 | }; 473 | "OBJ_142" = { 474 | isa = "XCBuildConfiguration"; 475 | buildSettings = { 476 | CLANG_ENABLE_MODULES = "YES"; 477 | EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES"; 478 | FRAMEWORK_SEARCH_PATHS = ( 479 | "$(inherited)", 480 | "$(PLATFORM_DIR)/Developer/Library/Frameworks" 481 | ); 482 | HEADER_SEARCH_PATHS = ( 483 | "$(inherited)" 484 | ); 485 | INFOPLIST_FILE = "Poes.xcodeproj/PoesTests_Info.plist"; 486 | IPHONEOS_DEPLOYMENT_TARGET = "8.0"; 487 | LD_RUNPATH_SEARCH_PATHS = ( 488 | "$(inherited)", 489 | "@loader_path/../Frameworks", 490 | "@loader_path/Frameworks" 491 | ); 492 | MACOSX_DEPLOYMENT_TARGET = "10.15"; 493 | OTHER_CFLAGS = ( 494 | "$(inherited)" 495 | ); 496 | OTHER_LDFLAGS = ( 497 | "$(inherited)" 498 | ); 499 | OTHER_SWIFT_FLAGS = ( 500 | "$(inherited)" 501 | ); 502 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( 503 | "$(inherited)" 504 | ); 505 | SWIFT_VERSION = "5.0"; 506 | TARGET_NAME = "PoesTests"; 507 | TVOS_DEPLOYMENT_TARGET = "9.0"; 508 | WATCHOS_DEPLOYMENT_TARGET = "2.0"; 509 | }; 510 | name = "Release"; 511 | }; 512 | "OBJ_143" = { 513 | isa = "PBXSourcesBuildPhase"; 514 | files = ( 515 | "OBJ_144", 516 | "OBJ_145" 517 | ); 518 | }; 519 | "OBJ_144" = { 520 | isa = "PBXBuildFile"; 521 | fileRef = "OBJ_19"; 522 | }; 523 | "OBJ_145" = { 524 | isa = "PBXBuildFile"; 525 | fileRef = "OBJ_20"; 526 | }; 527 | "OBJ_146" = { 528 | isa = "PBXFrameworksBuildPhase"; 529 | files = ( 530 | "OBJ_147", 531 | "OBJ_148" 532 | ); 533 | }; 534 | "OBJ_147" = { 535 | isa = "PBXBuildFile"; 536 | fileRef = "Poes::PoesCore::Product"; 537 | }; 538 | "OBJ_148" = { 539 | isa = "PBXBuildFile"; 540 | fileRef = "swift-argument-parser::ArgumentParser::Product"; 541 | }; 542 | "OBJ_149" = { 543 | isa = "PBXTargetDependency"; 544 | target = "Poes::PoesCore"; 545 | }; 546 | "OBJ_15" = { 547 | isa = "PBXFileReference"; 548 | path = "Poes.swift"; 549 | sourceTree = ""; 550 | }; 551 | "OBJ_150" = { 552 | isa = "PBXTargetDependency"; 553 | target = "swift-argument-parser::ArgumentParser"; 554 | }; 555 | "OBJ_152" = { 556 | isa = "XCConfigurationList"; 557 | buildConfigurations = ( 558 | "OBJ_153", 559 | "OBJ_154" 560 | ); 561 | defaultConfigurationIsVisible = "0"; 562 | defaultConfigurationName = "Release"; 563 | }; 564 | "OBJ_153" = { 565 | isa = "XCBuildConfiguration"; 566 | buildSettings = { 567 | LD = "/usr/bin/true"; 568 | OTHER_SWIFT_FLAGS = ( 569 | "-swift-version", 570 | "5", 571 | "-I", 572 | "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", 573 | "-target", 574 | "x86_64-apple-macosx10.10", 575 | "-sdk", 576 | "/Users/antoinevanderlee/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", 577 | "-package-description-version", 578 | "5.1.0" 579 | ); 580 | SWIFT_VERSION = "5.0"; 581 | }; 582 | name = "Debug"; 583 | }; 584 | "OBJ_154" = { 585 | isa = "XCBuildConfiguration"; 586 | buildSettings = { 587 | LD = "/usr/bin/true"; 588 | OTHER_SWIFT_FLAGS = ( 589 | "-swift-version", 590 | "5", 591 | "-I", 592 | "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", 593 | "-target", 594 | "x86_64-apple-macosx10.10", 595 | "-sdk", 596 | "/Users/antoinevanderlee/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", 597 | "-package-description-version", 598 | "5.1.0" 599 | ); 600 | SWIFT_VERSION = "5.0"; 601 | }; 602 | name = "Release"; 603 | }; 604 | "OBJ_155" = { 605 | isa = "PBXSourcesBuildPhase"; 606 | files = ( 607 | "OBJ_156" 608 | ); 609 | }; 610 | "OBJ_156" = { 611 | isa = "PBXBuildFile"; 612 | fileRef = "OBJ_57"; 613 | }; 614 | "OBJ_16" = { 615 | isa = "PBXFileReference"; 616 | path = "Send.swift"; 617 | sourceTree = ""; 618 | }; 619 | "OBJ_17" = { 620 | isa = "PBXGroup"; 621 | children = ( 622 | "OBJ_18" 623 | ); 624 | name = "Tests"; 625 | path = ""; 626 | sourceTree = "SOURCE_ROOT"; 627 | }; 628 | "OBJ_18" = { 629 | isa = "PBXGroup"; 630 | children = ( 631 | "OBJ_19", 632 | "OBJ_20" 633 | ); 634 | name = "PoesTests"; 635 | path = "Tests/PoesTests"; 636 | sourceTree = "SOURCE_ROOT"; 637 | }; 638 | "OBJ_19" = { 639 | isa = "PBXFileReference"; 640 | path = "Mocks.swift"; 641 | sourceTree = ""; 642 | }; 643 | "OBJ_2" = { 644 | isa = "XCConfigurationList"; 645 | buildConfigurations = ( 646 | "OBJ_3", 647 | "OBJ_4" 648 | ); 649 | defaultConfigurationIsVisible = "0"; 650 | defaultConfigurationName = "Release"; 651 | }; 652 | "OBJ_20" = { 653 | isa = "PBXFileReference"; 654 | path = "PoesTests.swift"; 655 | sourceTree = ""; 656 | }; 657 | "OBJ_21" = { 658 | isa = "PBXGroup"; 659 | children = ( 660 | "OBJ_22" 661 | ); 662 | name = "Dependencies"; 663 | path = ""; 664 | sourceTree = ""; 665 | }; 666 | "OBJ_22" = { 667 | isa = "PBXGroup"; 668 | children = ( 669 | "OBJ_23", 670 | "OBJ_57" 671 | ); 672 | name = "swift-argument-parser 0.0.1"; 673 | path = ""; 674 | sourceTree = "SOURCE_ROOT"; 675 | }; 676 | "OBJ_23" = { 677 | isa = "PBXGroup"; 678 | children = ( 679 | "OBJ_24", 680 | "OBJ_32", 681 | "OBJ_37", 682 | "OBJ_49", 683 | "OBJ_54" 684 | ); 685 | name = "ArgumentParser"; 686 | path = ".build/checkouts/swift-argument-parser/Sources/ArgumentParser"; 687 | sourceTree = "SOURCE_ROOT"; 688 | }; 689 | "OBJ_24" = { 690 | isa = "PBXGroup"; 691 | children = ( 692 | "OBJ_25", 693 | "OBJ_26", 694 | "OBJ_27", 695 | "OBJ_28", 696 | "OBJ_29", 697 | "OBJ_30", 698 | "OBJ_31" 699 | ); 700 | name = "Parsable Properties"; 701 | path = "Parsable Properties"; 702 | sourceTree = ""; 703 | }; 704 | "OBJ_25" = { 705 | isa = "PBXFileReference"; 706 | path = "Argument.swift"; 707 | sourceTree = ""; 708 | }; 709 | "OBJ_26" = { 710 | isa = "PBXFileReference"; 711 | path = "ArgumentHelp.swift"; 712 | sourceTree = ""; 713 | }; 714 | "OBJ_27" = { 715 | isa = "PBXFileReference"; 716 | path = "Flag.swift"; 717 | sourceTree = ""; 718 | }; 719 | "OBJ_28" = { 720 | isa = "PBXFileReference"; 721 | path = "NameSpecification.swift"; 722 | sourceTree = ""; 723 | }; 724 | "OBJ_29" = { 725 | isa = "PBXFileReference"; 726 | path = "Option.swift"; 727 | sourceTree = ""; 728 | }; 729 | "OBJ_3" = { 730 | isa = "XCBuildConfiguration"; 731 | buildSettings = { 732 | CLANG_ENABLE_OBJC_ARC = "YES"; 733 | COMBINE_HIDPI_IMAGES = "YES"; 734 | COPY_PHASE_STRIP = "NO"; 735 | DEBUG_INFORMATION_FORMAT = "dwarf"; 736 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 737 | ENABLE_NS_ASSERTIONS = "YES"; 738 | GCC_OPTIMIZATION_LEVEL = "0"; 739 | GCC_PREPROCESSOR_DEFINITIONS = ( 740 | "$(inherited)", 741 | "SWIFT_PACKAGE=1", 742 | "DEBUG=1" 743 | ); 744 | MACOSX_DEPLOYMENT_TARGET = "10.10"; 745 | ONLY_ACTIVE_ARCH = "YES"; 746 | OTHER_SWIFT_FLAGS = ( 747 | "$(inherited)", 748 | "-DXcode" 749 | ); 750 | PRODUCT_NAME = "$(TARGET_NAME)"; 751 | SDKROOT = "macosx"; 752 | SUPPORTED_PLATFORMS = ( 753 | "macosx", 754 | "iphoneos", 755 | "iphonesimulator", 756 | "appletvos", 757 | "appletvsimulator", 758 | "watchos", 759 | "watchsimulator" 760 | ); 761 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( 762 | "$(inherited)", 763 | "SWIFT_PACKAGE", 764 | "DEBUG" 765 | ); 766 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 767 | USE_HEADERMAP = "NO"; 768 | }; 769 | name = "Debug"; 770 | }; 771 | "OBJ_30" = { 772 | isa = "PBXFileReference"; 773 | path = "OptionGroup.swift"; 774 | sourceTree = ""; 775 | }; 776 | "OBJ_31" = { 777 | isa = "PBXFileReference"; 778 | path = "ValidationError.swift"; 779 | sourceTree = ""; 780 | }; 781 | "OBJ_32" = { 782 | isa = "PBXGroup"; 783 | children = ( 784 | "OBJ_33", 785 | "OBJ_34", 786 | "OBJ_35", 787 | "OBJ_36" 788 | ); 789 | name = "Parsable Types"; 790 | path = "Parsable Types"; 791 | sourceTree = ""; 792 | }; 793 | "OBJ_33" = { 794 | isa = "PBXFileReference"; 795 | path = "CommandConfiguration.swift"; 796 | sourceTree = ""; 797 | }; 798 | "OBJ_34" = { 799 | isa = "PBXFileReference"; 800 | path = "ExpressibleByArgument.swift"; 801 | sourceTree = ""; 802 | }; 803 | "OBJ_35" = { 804 | isa = "PBXFileReference"; 805 | path = "ParsableArguments.swift"; 806 | sourceTree = ""; 807 | }; 808 | "OBJ_36" = { 809 | isa = "PBXFileReference"; 810 | path = "ParsableCommand.swift"; 811 | sourceTree = ""; 812 | }; 813 | "OBJ_37" = { 814 | isa = "PBXGroup"; 815 | children = ( 816 | "OBJ_38", 817 | "OBJ_39", 818 | "OBJ_40", 819 | "OBJ_41", 820 | "OBJ_42", 821 | "OBJ_43", 822 | "OBJ_44", 823 | "OBJ_45", 824 | "OBJ_46", 825 | "OBJ_47", 826 | "OBJ_48" 827 | ); 828 | name = "Parsing"; 829 | path = "Parsing"; 830 | sourceTree = ""; 831 | }; 832 | "OBJ_38" = { 833 | isa = "PBXFileReference"; 834 | path = "ArgumentDecoder.swift"; 835 | sourceTree = ""; 836 | }; 837 | "OBJ_39" = { 838 | isa = "PBXFileReference"; 839 | path = "ArgumentDefinition.swift"; 840 | sourceTree = ""; 841 | }; 842 | "OBJ_4" = { 843 | isa = "XCBuildConfiguration"; 844 | buildSettings = { 845 | CLANG_ENABLE_OBJC_ARC = "YES"; 846 | COMBINE_HIDPI_IMAGES = "YES"; 847 | COPY_PHASE_STRIP = "YES"; 848 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 849 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 850 | GCC_OPTIMIZATION_LEVEL = "s"; 851 | GCC_PREPROCESSOR_DEFINITIONS = ( 852 | "$(inherited)", 853 | "SWIFT_PACKAGE=1" 854 | ); 855 | MACOSX_DEPLOYMENT_TARGET = "10.10"; 856 | OTHER_SWIFT_FLAGS = ( 857 | "$(inherited)", 858 | "-DXcode" 859 | ); 860 | PRODUCT_NAME = "$(TARGET_NAME)"; 861 | SDKROOT = "macosx"; 862 | SUPPORTED_PLATFORMS = ( 863 | "macosx", 864 | "iphoneos", 865 | "iphonesimulator", 866 | "appletvos", 867 | "appletvsimulator", 868 | "watchos", 869 | "watchsimulator" 870 | ); 871 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( 872 | "$(inherited)", 873 | "SWIFT_PACKAGE" 874 | ); 875 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 876 | USE_HEADERMAP = "NO"; 877 | }; 878 | name = "Release"; 879 | }; 880 | "OBJ_40" = { 881 | isa = "PBXFileReference"; 882 | path = "ArgumentSet.swift"; 883 | sourceTree = ""; 884 | }; 885 | "OBJ_41" = { 886 | isa = "PBXFileReference"; 887 | path = "ArgumentSetSequence.swift"; 888 | sourceTree = ""; 889 | }; 890 | "OBJ_42" = { 891 | isa = "PBXFileReference"; 892 | path = "CommandParser.swift"; 893 | sourceTree = ""; 894 | }; 895 | "OBJ_43" = { 896 | isa = "PBXFileReference"; 897 | path = "InputOrigin.swift"; 898 | sourceTree = ""; 899 | }; 900 | "OBJ_44" = { 901 | isa = "PBXFileReference"; 902 | path = "Name.swift"; 903 | sourceTree = ""; 904 | }; 905 | "OBJ_45" = { 906 | isa = "PBXFileReference"; 907 | path = "Parsed.swift"; 908 | sourceTree = ""; 909 | }; 910 | "OBJ_46" = { 911 | isa = "PBXFileReference"; 912 | path = "ParsedValues.swift"; 913 | sourceTree = ""; 914 | }; 915 | "OBJ_47" = { 916 | isa = "PBXFileReference"; 917 | path = "ParserError.swift"; 918 | sourceTree = ""; 919 | }; 920 | "OBJ_48" = { 921 | isa = "PBXFileReference"; 922 | path = "SplitArguments.swift"; 923 | sourceTree = ""; 924 | }; 925 | "OBJ_49" = { 926 | isa = "PBXGroup"; 927 | children = ( 928 | "OBJ_50", 929 | "OBJ_51", 930 | "OBJ_52", 931 | "OBJ_53" 932 | ); 933 | name = "Usage"; 934 | path = "Usage"; 935 | sourceTree = ""; 936 | }; 937 | "OBJ_5" = { 938 | isa = "PBXGroup"; 939 | children = ( 940 | "OBJ_6", 941 | "OBJ_7", 942 | "OBJ_17", 943 | "OBJ_21", 944 | "OBJ_58", 945 | "OBJ_63", 946 | "OBJ_64", 947 | "OBJ_65", 948 | "OBJ_66", 949 | "OBJ_67", 950 | "OBJ_68", 951 | "OBJ_69" 952 | ); 953 | path = ""; 954 | sourceTree = ""; 955 | }; 956 | "OBJ_50" = { 957 | isa = "PBXFileReference"; 958 | path = "HelpCommand.swift"; 959 | sourceTree = ""; 960 | }; 961 | "OBJ_51" = { 962 | isa = "PBXFileReference"; 963 | path = "HelpGenerator.swift"; 964 | sourceTree = ""; 965 | }; 966 | "OBJ_52" = { 967 | isa = "PBXFileReference"; 968 | path = "MessageInfo.swift"; 969 | sourceTree = ""; 970 | }; 971 | "OBJ_53" = { 972 | isa = "PBXFileReference"; 973 | path = "UsageGenerator.swift"; 974 | sourceTree = ""; 975 | }; 976 | "OBJ_54" = { 977 | isa = "PBXGroup"; 978 | children = ( 979 | "OBJ_55", 980 | "OBJ_56" 981 | ); 982 | name = "Utilities"; 983 | path = "Utilities"; 984 | sourceTree = ""; 985 | }; 986 | "OBJ_55" = { 987 | isa = "PBXFileReference"; 988 | path = "StringExtensions.swift"; 989 | sourceTree = ""; 990 | }; 991 | "OBJ_56" = { 992 | isa = "PBXFileReference"; 993 | path = "Tree.swift"; 994 | sourceTree = ""; 995 | }; 996 | "OBJ_57" = { 997 | isa = "PBXFileReference"; 998 | explicitFileType = "sourcecode.swift"; 999 | name = "Package.swift"; 1000 | path = "/Users/antoinevanderlee/Documents/GIT-Projects/Eigen/Poes/.build/checkouts/swift-argument-parser/Package.swift"; 1001 | sourceTree = ""; 1002 | }; 1003 | "OBJ_58" = { 1004 | isa = "PBXGroup"; 1005 | children = ( 1006 | "Poes::Poes::Product", 1007 | "swift-argument-parser::ArgumentParser::Product", 1008 | "Poes::PoesCore::Product", 1009 | "Poes::PoesTests::Product" 1010 | ); 1011 | name = "Products"; 1012 | path = ""; 1013 | sourceTree = "BUILT_PRODUCTS_DIR"; 1014 | }; 1015 | "OBJ_6" = { 1016 | isa = "PBXFileReference"; 1017 | explicitFileType = "sourcecode.swift"; 1018 | path = "Package.swift"; 1019 | sourceTree = ""; 1020 | }; 1021 | "OBJ_63" = { 1022 | isa = "PBXFileReference"; 1023 | path = "Submodules"; 1024 | sourceTree = "SOURCE_ROOT"; 1025 | }; 1026 | "OBJ_64" = { 1027 | isa = "PBXFileReference"; 1028 | path = "fastlane"; 1029 | sourceTree = "SOURCE_ROOT"; 1030 | }; 1031 | "OBJ_65" = { 1032 | isa = "PBXFileReference"; 1033 | path = "LICENSE"; 1034 | sourceTree = ""; 1035 | }; 1036 | "OBJ_66" = { 1037 | isa = "PBXFileReference"; 1038 | path = "Changelog.md"; 1039 | sourceTree = ""; 1040 | }; 1041 | "OBJ_67" = { 1042 | isa = "PBXFileReference"; 1043 | path = "CODEOWNERS"; 1044 | sourceTree = ""; 1045 | }; 1046 | "OBJ_68" = { 1047 | isa = "PBXFileReference"; 1048 | path = "README.md"; 1049 | sourceTree = ""; 1050 | }; 1051 | "OBJ_69" = { 1052 | isa = "PBXFileReference"; 1053 | path = "Gemfile"; 1054 | sourceTree = ""; 1055 | }; 1056 | "OBJ_7" = { 1057 | isa = "PBXGroup"; 1058 | children = ( 1059 | "OBJ_8", 1060 | "OBJ_10" 1061 | ); 1062 | name = "Sources"; 1063 | path = ""; 1064 | sourceTree = "SOURCE_ROOT"; 1065 | }; 1066 | "OBJ_71" = { 1067 | isa = "XCConfigurationList"; 1068 | buildConfigurations = ( 1069 | "OBJ_72", 1070 | "OBJ_73" 1071 | ); 1072 | defaultConfigurationIsVisible = "0"; 1073 | defaultConfigurationName = "Release"; 1074 | }; 1075 | "OBJ_72" = { 1076 | isa = "XCBuildConfiguration"; 1077 | buildSettings = { 1078 | ENABLE_TESTABILITY = "YES"; 1079 | FRAMEWORK_SEARCH_PATHS = ( 1080 | "$(inherited)", 1081 | "$(PLATFORM_DIR)/Developer/Library/Frameworks" 1082 | ); 1083 | HEADER_SEARCH_PATHS = ( 1084 | "$(inherited)" 1085 | ); 1086 | INFOPLIST_FILE = "Poes.xcodeproj/ArgumentParser_Info.plist"; 1087 | IPHONEOS_DEPLOYMENT_TARGET = "8.0"; 1088 | LD_RUNPATH_SEARCH_PATHS = ( 1089 | "$(inherited)", 1090 | "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" 1091 | ); 1092 | MACOSX_DEPLOYMENT_TARGET = "10.10"; 1093 | OTHER_CFLAGS = ( 1094 | "$(inherited)" 1095 | ); 1096 | OTHER_LDFLAGS = ( 1097 | "$(inherited)" 1098 | ); 1099 | OTHER_SWIFT_FLAGS = ( 1100 | "$(inherited)" 1101 | ); 1102 | PRODUCT_BUNDLE_IDENTIFIER = "ArgumentParser"; 1103 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; 1104 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 1105 | SKIP_INSTALL = "YES"; 1106 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( 1107 | "$(inherited)" 1108 | ); 1109 | SWIFT_VERSION = "5.0"; 1110 | TARGET_NAME = "ArgumentParser"; 1111 | TVOS_DEPLOYMENT_TARGET = "9.0"; 1112 | WATCHOS_DEPLOYMENT_TARGET = "2.0"; 1113 | }; 1114 | name = "Debug"; 1115 | }; 1116 | "OBJ_73" = { 1117 | isa = "XCBuildConfiguration"; 1118 | buildSettings = { 1119 | ENABLE_TESTABILITY = "YES"; 1120 | FRAMEWORK_SEARCH_PATHS = ( 1121 | "$(inherited)", 1122 | "$(PLATFORM_DIR)/Developer/Library/Frameworks" 1123 | ); 1124 | HEADER_SEARCH_PATHS = ( 1125 | "$(inherited)" 1126 | ); 1127 | INFOPLIST_FILE = "Poes.xcodeproj/ArgumentParser_Info.plist"; 1128 | IPHONEOS_DEPLOYMENT_TARGET = "8.0"; 1129 | LD_RUNPATH_SEARCH_PATHS = ( 1130 | "$(inherited)", 1131 | "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" 1132 | ); 1133 | MACOSX_DEPLOYMENT_TARGET = "10.10"; 1134 | OTHER_CFLAGS = ( 1135 | "$(inherited)" 1136 | ); 1137 | OTHER_LDFLAGS = ( 1138 | "$(inherited)" 1139 | ); 1140 | OTHER_SWIFT_FLAGS = ( 1141 | "$(inherited)" 1142 | ); 1143 | PRODUCT_BUNDLE_IDENTIFIER = "ArgumentParser"; 1144 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; 1145 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 1146 | SKIP_INSTALL = "YES"; 1147 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( 1148 | "$(inherited)" 1149 | ); 1150 | SWIFT_VERSION = "5.0"; 1151 | TARGET_NAME = "ArgumentParser"; 1152 | TVOS_DEPLOYMENT_TARGET = "9.0"; 1153 | WATCHOS_DEPLOYMENT_TARGET = "2.0"; 1154 | }; 1155 | name = "Release"; 1156 | }; 1157 | "OBJ_74" = { 1158 | isa = "PBXSourcesBuildPhase"; 1159 | files = ( 1160 | "OBJ_75", 1161 | "OBJ_76", 1162 | "OBJ_77", 1163 | "OBJ_78", 1164 | "OBJ_79", 1165 | "OBJ_80", 1166 | "OBJ_81", 1167 | "OBJ_82", 1168 | "OBJ_83", 1169 | "OBJ_84", 1170 | "OBJ_85", 1171 | "OBJ_86", 1172 | "OBJ_87", 1173 | "OBJ_88", 1174 | "OBJ_89", 1175 | "OBJ_90", 1176 | "OBJ_91", 1177 | "OBJ_92", 1178 | "OBJ_93", 1179 | "OBJ_94", 1180 | "OBJ_95", 1181 | "OBJ_96", 1182 | "OBJ_97", 1183 | "OBJ_98", 1184 | "OBJ_99", 1185 | "OBJ_100", 1186 | "OBJ_101", 1187 | "OBJ_102" 1188 | ); 1189 | }; 1190 | "OBJ_75" = { 1191 | isa = "PBXBuildFile"; 1192 | fileRef = "OBJ_25"; 1193 | }; 1194 | "OBJ_76" = { 1195 | isa = "PBXBuildFile"; 1196 | fileRef = "OBJ_26"; 1197 | }; 1198 | "OBJ_77" = { 1199 | isa = "PBXBuildFile"; 1200 | fileRef = "OBJ_27"; 1201 | }; 1202 | "OBJ_78" = { 1203 | isa = "PBXBuildFile"; 1204 | fileRef = "OBJ_28"; 1205 | }; 1206 | "OBJ_79" = { 1207 | isa = "PBXBuildFile"; 1208 | fileRef = "OBJ_29"; 1209 | }; 1210 | "OBJ_8" = { 1211 | isa = "PBXGroup"; 1212 | children = ( 1213 | "OBJ_9" 1214 | ); 1215 | name = "Poes"; 1216 | path = "Sources/Poes"; 1217 | sourceTree = "SOURCE_ROOT"; 1218 | }; 1219 | "OBJ_80" = { 1220 | isa = "PBXBuildFile"; 1221 | fileRef = "OBJ_30"; 1222 | }; 1223 | "OBJ_81" = { 1224 | isa = "PBXBuildFile"; 1225 | fileRef = "OBJ_31"; 1226 | }; 1227 | "OBJ_82" = { 1228 | isa = "PBXBuildFile"; 1229 | fileRef = "OBJ_33"; 1230 | }; 1231 | "OBJ_83" = { 1232 | isa = "PBXBuildFile"; 1233 | fileRef = "OBJ_34"; 1234 | }; 1235 | "OBJ_84" = { 1236 | isa = "PBXBuildFile"; 1237 | fileRef = "OBJ_35"; 1238 | }; 1239 | "OBJ_85" = { 1240 | isa = "PBXBuildFile"; 1241 | fileRef = "OBJ_36"; 1242 | }; 1243 | "OBJ_86" = { 1244 | isa = "PBXBuildFile"; 1245 | fileRef = "OBJ_38"; 1246 | }; 1247 | "OBJ_87" = { 1248 | isa = "PBXBuildFile"; 1249 | fileRef = "OBJ_39"; 1250 | }; 1251 | "OBJ_88" = { 1252 | isa = "PBXBuildFile"; 1253 | fileRef = "OBJ_40"; 1254 | }; 1255 | "OBJ_89" = { 1256 | isa = "PBXBuildFile"; 1257 | fileRef = "OBJ_41"; 1258 | }; 1259 | "OBJ_9" = { 1260 | isa = "PBXFileReference"; 1261 | path = "main.swift"; 1262 | sourceTree = ""; 1263 | }; 1264 | "OBJ_90" = { 1265 | isa = "PBXBuildFile"; 1266 | fileRef = "OBJ_42"; 1267 | }; 1268 | "OBJ_91" = { 1269 | isa = "PBXBuildFile"; 1270 | fileRef = "OBJ_43"; 1271 | }; 1272 | "OBJ_92" = { 1273 | isa = "PBXBuildFile"; 1274 | fileRef = "OBJ_44"; 1275 | }; 1276 | "OBJ_93" = { 1277 | isa = "PBXBuildFile"; 1278 | fileRef = "OBJ_45"; 1279 | }; 1280 | "OBJ_94" = { 1281 | isa = "PBXBuildFile"; 1282 | fileRef = "OBJ_46"; 1283 | }; 1284 | "OBJ_95" = { 1285 | isa = "PBXBuildFile"; 1286 | fileRef = "OBJ_47"; 1287 | }; 1288 | "OBJ_96" = { 1289 | isa = "PBXBuildFile"; 1290 | fileRef = "OBJ_48"; 1291 | }; 1292 | "OBJ_97" = { 1293 | isa = "PBXBuildFile"; 1294 | fileRef = "OBJ_50"; 1295 | }; 1296 | "OBJ_98" = { 1297 | isa = "PBXBuildFile"; 1298 | fileRef = "OBJ_51"; 1299 | }; 1300 | "OBJ_99" = { 1301 | isa = "PBXBuildFile"; 1302 | fileRef = "OBJ_52"; 1303 | }; 1304 | "Poes::Poes" = { 1305 | isa = "PBXNativeTarget"; 1306 | buildConfigurationList = "OBJ_105"; 1307 | buildPhases = ( 1308 | "OBJ_108", 1309 | "OBJ_110" 1310 | ); 1311 | dependencies = ( 1312 | "OBJ_113", 1313 | "OBJ_115" 1314 | ); 1315 | name = "Poes"; 1316 | productName = "Poes"; 1317 | productReference = "Poes::Poes::Product"; 1318 | productType = "com.apple.product-type.tool"; 1319 | }; 1320 | "Poes::Poes::Product" = { 1321 | isa = "PBXFileReference"; 1322 | path = "Poes"; 1323 | sourceTree = "BUILT_PRODUCTS_DIR"; 1324 | }; 1325 | "Poes::PoesCore" = { 1326 | isa = "PBXNativeTarget"; 1327 | buildConfigurationList = "OBJ_116"; 1328 | buildPhases = ( 1329 | "OBJ_119", 1330 | "OBJ_125" 1331 | ); 1332 | dependencies = ( 1333 | "OBJ_127" 1334 | ); 1335 | name = "PoesCore"; 1336 | productName = "PoesCore"; 1337 | productReference = "Poes::PoesCore::Product"; 1338 | productType = "com.apple.product-type.framework"; 1339 | }; 1340 | "Poes::PoesCore::Product" = { 1341 | isa = "PBXFileReference"; 1342 | path = "PoesCore.framework"; 1343 | sourceTree = "BUILT_PRODUCTS_DIR"; 1344 | }; 1345 | "Poes::PoesPackageTests::ProductTarget" = { 1346 | isa = "PBXAggregateTarget"; 1347 | buildConfigurationList = "OBJ_135"; 1348 | buildPhases = ( 1349 | ); 1350 | dependencies = ( 1351 | "OBJ_138" 1352 | ); 1353 | name = "PoesPackageTests"; 1354 | productName = "PoesPackageTests"; 1355 | }; 1356 | "Poes::PoesTests" = { 1357 | isa = "PBXNativeTarget"; 1358 | buildConfigurationList = "OBJ_140"; 1359 | buildPhases = ( 1360 | "OBJ_143", 1361 | "OBJ_146" 1362 | ); 1363 | dependencies = ( 1364 | "OBJ_149", 1365 | "OBJ_150" 1366 | ); 1367 | name = "PoesTests"; 1368 | productName = "PoesTests"; 1369 | productReference = "Poes::PoesTests::Product"; 1370 | productType = "com.apple.product-type.bundle.unit-test"; 1371 | }; 1372 | "Poes::PoesTests::Product" = { 1373 | isa = "PBXFileReference"; 1374 | path = "PoesTests.xctest"; 1375 | sourceTree = "BUILT_PRODUCTS_DIR"; 1376 | }; 1377 | "Poes::SwiftPMPackageDescription" = { 1378 | isa = "PBXNativeTarget"; 1379 | buildConfigurationList = "OBJ_129"; 1380 | buildPhases = ( 1381 | "OBJ_132" 1382 | ); 1383 | dependencies = ( 1384 | ); 1385 | name = "PoesPackageDescription"; 1386 | productName = "PoesPackageDescription"; 1387 | productType = "com.apple.product-type.framework"; 1388 | }; 1389 | "swift-argument-parser::ArgumentParser" = { 1390 | isa = "PBXNativeTarget"; 1391 | buildConfigurationList = "OBJ_71"; 1392 | buildPhases = ( 1393 | "OBJ_74", 1394 | "OBJ_103" 1395 | ); 1396 | dependencies = ( 1397 | ); 1398 | name = "ArgumentParser"; 1399 | productName = "ArgumentParser"; 1400 | productReference = "swift-argument-parser::ArgumentParser::Product"; 1401 | productType = "com.apple.product-type.framework"; 1402 | }; 1403 | "swift-argument-parser::ArgumentParser::Product" = { 1404 | isa = "PBXFileReference"; 1405 | path = "ArgumentParser.framework"; 1406 | sourceTree = "BUILT_PRODUCTS_DIR"; 1407 | }; 1408 | "swift-argument-parser::SwiftPMPackageDescription" = { 1409 | isa = "PBXNativeTarget"; 1410 | buildConfigurationList = "OBJ_152"; 1411 | buildPhases = ( 1412 | "OBJ_155" 1413 | ); 1414 | dependencies = ( 1415 | ); 1416 | name = "swift-argument-parserPackageDescription"; 1417 | productName = "swift-argument-parserPackageDescription"; 1418 | productType = "com.apple.product-type.framework"; 1419 | }; 1420 | }; 1421 | rootObject = "OBJ_1"; 1422 | } 1423 | -------------------------------------------------------------------------------- /Poes.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Poes.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded 6 | 7 | 8 | -------------------------------------------------------------------------------- /Poes.xcodeproj/xcshareddata/xcschemes/Poes-Package.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 54 | 55 | 56 | 57 | 58 | 68 | 69 | 75 | 76 | 78 | 79 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Poes.xcodeproj/xcshareddata/xcschemes/Poes.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 71 | 72 | 74 | 75 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Poes 2 | A Swift command-line tool to easily send push notifications to the iOS simulator. 3 | 4 |

5 | 6 | 7 | 8 | 9 | Twitter: @twannl 10 | 11 |

12 | 13 | 14 | Poes helps you with: 15 | 16 | - [x] Generating a JSON payload for push notifications 17 | - [x] Sending and testing push notifications in the simulator 18 | 19 | ### Requirements 20 | - Xcode 11.4 beta 1 and up 21 | 22 | ### Usage 23 | 24 | ``` 25 | $ poes --help 26 | OVERVIEW: A Swift command-line tool to easily test push notifications to the 27 | iOS simulator 28 | 29 | USAGE: poes 30 | 31 | OPTIONS: 32 | -h, --help Show help information. 33 | 34 | SUBCOMMANDS: 35 | send Send a push notification to an app installed on the 36 | iOS Simulator 37 | ``` 38 | 39 | 40 | 41 | ``` 42 | $ poes send --help 43 | OVERVIEW: Send a push notification to an app installed on the iOS Simulator 44 | 45 | USAGE: poes send [--title ] [--body <body>] [--badge <badge>] [--is-mutable] [--verbose] 46 | 47 | ARGUMENTS: 48 | <bundle-identifier> The bundle identifier of the app to push to 49 | 50 | OPTIONS: 51 | -t, --title <title> The title of the Push notification (default: Default 52 | Title) 53 | -b, --body <body> The body of the Push notification (default: Default 54 | Body) 55 | -b, --badge <badge> The number to display in a badge on your app’s icon 56 | -i, --is-mutable Adds the mutable-content key to the payload 57 | --verbose Show extra logging for debugging purposes 58 | -h, --help Show help information. 59 | ``` 60 | 61 | The bundle identifier is mandatory, all others have a default value. The following command can be enough to send out a notification: 62 | 63 | ``` 64 | $ poes send com.wetransfer.app --verbose 65 | Generated payload: 66 | 67 | { 68 | "aps" : { 69 | "alert" : { 70 | "title" : "Default title", 71 | "body" : "Default body" 72 | }, 73 | "mutable-content" : false 74 | } 75 | } 76 | 77 | Sending push notification... 78 | Push notification sent successfully 79 | ``` 80 | 81 | ### Installation using [Mint](https://github.com/yonaskolb/mint) 82 | You can install Poes using Mint as follows: 83 | 84 | ``` 85 | $ mint install AvdLee/Poes 86 | ``` 87 | 88 | ### Development 89 | - `cd` into the repository 90 | - run `swift package generate-xcodeproj` (Generates an Xcode project for development) 91 | - Run the following command to try it out: 92 | 93 | ```bash 94 | swift run Poes --help 95 | ``` 96 | 97 | ## FAQ 98 | 99 | ### Why is it called "Poes"? 100 | 101 | Poes is a Dutch word for a female cat. The pronunciation is the same as "Push" and pushing notifications is what we're doing here! 102 | 103 | ### Why is there a `PoesCore` framework? 104 | This makes it really easy to eventually create a Mac App with a UI around it 🚀 105 | 106 | ### How do I create a Swift Package myself? 107 | Check out my blog post [Swift Package framework creation in Xcode](https://www.avanderlee.com/swift/creating-swift-package-manager-framework/). 108 | 109 | ### Can I learn more about testing Push Notifications on the iOS simulator? 110 | Yes! I've written a detailed blog post about this: [Testing push notifications on the iOS simulator](https://www.avanderlee.com/workflow/testing-push-notifications-ios-simulator/) 111 | -------------------------------------------------------------------------------- /Sources/Poes/main.swift: -------------------------------------------------------------------------------- 1 | import PoesCore 2 | 3 | Poes.main() 4 | -------------------------------------------------------------------------------- /Sources/PoesCore/Helpers/Log.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Log.swift 3 | // GitBuddyCore 4 | // 5 | // Created by Antoine van der Lee on 10/01/2020. 6 | // Copyright © 2020 AvdLee. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | enum Log { 12 | static var isVerbose: Bool = false 13 | 14 | static func debug(_ message: Any) { 15 | guard isVerbose else { return } 16 | print(message) 17 | } 18 | 19 | static func message(_ message: Any) { 20 | print(message) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sources/PoesCore/Helpers/Shell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Shell.swift 3 | // GitBuddyCore 4 | // 5 | // Created by Antoine van der Lee on 10/01/2020. 6 | // Copyright © 2020 AvdLee. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | enum ShellCommand { 12 | case push(bundleIdentifier: String, payloadPath: String) 13 | 14 | var rawValue: String { 15 | switch self { 16 | case .push(let bundleIdentifier, let payloadPath): 17 | return "xcrun simctl push booted \(bundleIdentifier) \(payloadPath)" 18 | } 19 | } 20 | } 21 | 22 | extension Process { 23 | func shell(_ command: ShellCommand) -> String { 24 | launchPath = "/bin/bash" 25 | arguments = ["-c", command.rawValue] 26 | 27 | let outputPipe = Pipe() 28 | standardOutput = outputPipe 29 | launch() 30 | 31 | let data = outputPipe.fileHandleForReading.readDataToEndOfFile() 32 | guard let outputData = String(data: data, encoding: String.Encoding.utf8) else { return "" } 33 | 34 | return outputData.reduce("") { (result, value) in 35 | return result + String(value) 36 | }.trimmingCharacters(in: .whitespacesAndNewlines) 37 | } 38 | } 39 | 40 | protocol ShellExecuting { 41 | @discardableResult static func execute(_ command: ShellCommand) -> String 42 | } 43 | 44 | private enum Shell: ShellExecuting { 45 | @discardableResult static func execute(_ command: ShellCommand) -> String { 46 | return Process().shell(command) 47 | } 48 | } 49 | 50 | /// Adds a `shell` property which defaults to `Shell.self`. 51 | protocol ShellInjectable { } 52 | 53 | extension ShellInjectable { 54 | static var shell: ShellExecuting.Type { ShellInjector.shell } 55 | } 56 | 57 | enum ShellInjector { 58 | static var shell: ShellExecuting.Type = Shell.self 59 | } 60 | -------------------------------------------------------------------------------- /Sources/PoesCore/Payload.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Payload.swift 3 | // PoesCore 4 | // 5 | // Created by Antoine van der Lee on 07/02/2020. 6 | // Copyright © 2020 AvdLee. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct Payload: Codable { 12 | let aps: APS 13 | 14 | init(title: String, body: String, isMutable: Bool, badge: Int? = nil) { 15 | aps = APS(alert: Alert(title: title, body: body), isMutable: isMutable, badge: badge) 16 | } 17 | } 18 | 19 | struct APS: Codable { 20 | enum CodingKeys: String, CodingKey { 21 | case alert 22 | case isMutable = "mutable-content" 23 | case badge = "badge" 24 | } 25 | 26 | let alert: Alert 27 | let isMutable: Bool 28 | let badge: Int? 29 | } 30 | 31 | struct Alert: Codable { 32 | let title: String 33 | let body: String 34 | } 35 | -------------------------------------------------------------------------------- /Sources/PoesCore/Poes.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Poes.swift 3 | // PoesCore 4 | // 5 | // Created by Antoine van der Lee on 07/02/2020. 6 | // Copyright © 2020 AvdLee. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import ArgumentParser 11 | 12 | public struct Poes: ParsableCommand { 13 | public static let configuration = CommandConfiguration( 14 | abstract: "A Swift command-line tool to easily test push notifications to the iOS simulator", 15 | subcommands: [Send.self]) 16 | 17 | public init() { } 18 | } 19 | -------------------------------------------------------------------------------- /Sources/PoesCore/Send.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Send.swift 3 | // PoesCore 4 | // 5 | // Created by Antoine van der Lee on 08/02/2020. 6 | // Copyright © 2020 AvdLee. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import ArgumentParser 11 | 12 | struct Send: ParsableCommand, ShellInjectable { 13 | 14 | public static let configuration = CommandConfiguration(abstract: "Send a push notification to an app installed on the iOS Simulator") 15 | 16 | @Argument(help: "The bundle identifier of the app to push to") 17 | private var bundleIdentifier: String 18 | 19 | @Option(name: .shortAndLong, default: "Default Title", help: "The title of the Push notification") 20 | private var title: String 21 | 22 | @Option(name: .shortAndLong, default: "Default Body", help: "The body of the Push notification") 23 | private var body: String 24 | 25 | @Option(name: .shortAndLong, help: "The number to display in a badge on your app’s icon") 26 | private var badge: Int? 27 | 28 | @Flag(name: .shortAndLong, help: "Adds the mutable-content key to the payload") 29 | private var isMutable: Bool 30 | 31 | @Flag(name: .long, help: "Show extra logging for debugging purposes") 32 | private var verbose: Bool 33 | 34 | func run() throws { 35 | Log.isVerbose = verbose 36 | 37 | let payload = Payload(title: title, body: body, isMutable: isMutable, badge: badge) 38 | let jsonData = try JSONEncoder().encode(payload) 39 | 40 | if Log.isVerbose, let object = try? JSONSerialization.jsonObject(with: jsonData, options: []), let jsonString = String(data: try! JSONSerialization.data(withJSONObject: object, options: .prettyPrinted), encoding: .utf8) { 41 | Log.debug("Generated payload:\n\n\(jsonString)\n") 42 | } 43 | 44 | let tempUrl = NSTemporaryDirectory() 45 | let payloadUrl = Foundation.URL(fileURLWithPath: tempUrl, isDirectory: true).appendingPathComponent("payload.json") 46 | FileManager.default.createFile(atPath: payloadUrl.path, contents: jsonData, attributes: nil) 47 | 48 | Log.message("Sending push notification...") 49 | Self.shell.execute(.push(bundleIdentifier: bundleIdentifier, payloadPath: payloadUrl.path)) 50 | Log.message("Push notification sent successfully") 51 | try FileManager.default.removeItem(at: payloadUrl) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | fatalError("Running tests like this is unsupported. Run the tests again by using `swift test --enable-test-discovery`") 2 | -------------------------------------------------------------------------------- /Tests/PoesTests/Mocks.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mocks.swift 3 | // PoesTests 4 | // 5 | // Created by Antoine van der Lee on 08/02/2020. 6 | // Copyright © 2020 AvdLee. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | @testable import PoesCore 11 | 12 | struct MockedShell: ShellExecuting { 13 | 14 | static var commandMocks: [String: String] = [:] 15 | static private(set) var executedCommand: ShellCommand? 16 | 17 | @discardableResult static func execute(_ command: ShellCommand) -> String { 18 | executedCommand = command 19 | return commandMocks[command.rawValue] ?? "" 20 | } 21 | 22 | static func mock(_ command: ShellCommand, value: String) { 23 | commandMocks[command.rawValue] = value 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Tests/PoesTests/PoesTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PoesTests.swift 3 | // PoesTests 4 | // 5 | // Created by Antoine van der Lee on 07/02/2020. 6 | // Copyright © 2020 AvdLee. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import PoesCore 11 | 12 | final class PoesTests: XCTestCase { 13 | 14 | override class func setUp() { 15 | super.setUp() 16 | 17 | ShellInjector.shell = MockedShell.self 18 | } 19 | 20 | /// It should correctly generate a JSON payload for sending push notifications. 21 | func testSendCommand() throws { 22 | let expectedBundleIdentifier = "com.example.app" 23 | let title = "Notification title" 24 | let body = "Notification body" 25 | let badge = 2 26 | let isMutable = true 27 | 28 | let arguments = ["send", expectedBundleIdentifier, "--title", title, "--body", body, "--badge", "\(badge)", "--is-mutable"] 29 | 30 | let poesCommand = try Poes.parseAsRoot(arguments) 31 | try poesCommand.run() 32 | 33 | let command = try XCTUnwrap(MockedShell.executedCommand) 34 | 35 | guard case let ShellCommand.push(bundleIdentifier, payloadPath) = command else { 36 | XCTFail("Command is not executed") 37 | return 38 | } 39 | 40 | XCTAssertEqual(expectedBundleIdentifier, bundleIdentifier) 41 | 42 | let jsonData = try Data(contentsOf: URL(fileURLWithPath: payloadPath)) 43 | let payload = try JSONDecoder().decode(Payload.self, from: jsonData) 44 | 45 | XCTAssertEqual(payload.aps.alert.title, title) 46 | XCTAssertEqual(payload.aps.alert.body, body) 47 | XCTAssertEqual(payload.aps.isMutable, isMutable) 48 | XCTAssertEqual(payload.aps.badge, badge) 49 | 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /fastlane/.gitignore: -------------------------------------------------------------------------------- 1 | installer/ 2 | test_output/ 3 | README.md 4 | report.xml -------------------------------------------------------------------------------- /fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | # Fastlane requirements 2 | fastlane_version "1.109.0" 3 | 4 | import "./../Submodules/WeTransfer-iOS-CI/Fastlane/Fastfile" 5 | 6 | desc "Run the tests and prepare for Danger" 7 | lane :test do |options| 8 | spm(command: "generate-xcodeproj") 9 | test_project( 10 | project_name: "Poes", 11 | scheme: "Poes-Package", 12 | device: nil, 13 | destination: "platform=macOS") 14 | end 15 | --------------------------------------------------------------------------------