├── .gitignore ├── .swift-version ├── .swiftpm └── xcode │ └── package.xcworkspace │ └── contents.xcworkspacedata ├── Example ├── Example.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── Example.xcworkspace │ └── contents.xcworkspacedata ├── Example │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── ExampleTests │ ├── ExampleTests.swift │ └── Info.plist ├── Podfile └── Podfile.lock ├── LICENSE ├── Package.resolved ├── Package.swift ├── README.md ├── Sources └── RxStoreKit │ ├── RxSKPaymentTransactionObserver.swift │ ├── RxStoreKit.swift │ ├── SKPaymentQueue+Rx.swift │ ├── SKProductsRequest+Rx.swift │ ├── SKProductsRequestDelegateProxy.swift │ ├── SKReceiptRefreshRequest+Rx.swift │ └── SKReceiptRefreshRequestDelegateProxy.swift └── Tests ├── LinuxMain.swift └── RxStoreKitTests ├── RxStoreKitTests.swift └── XCTestManifests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Mac 6 | .DS_Store 7 | 8 | ## Build generated 9 | build/ 10 | DerivedData 11 | 12 | ## Various settings 13 | *.pbxuser 14 | !default.pbxuser 15 | *.mode1v3 16 | !default.mode1v3 17 | *.mode2v3 18 | !default.mode2v3 19 | *.perspectivev3 20 | !default.perspectivev3 21 | xcuserdata 22 | 23 | ## Other 24 | *.xccheckout 25 | *.moved-aside 26 | *.xcuserstate 27 | *.xcscmblueprint 28 | 29 | ## Obj-C/Swift specific 30 | *.hmap 31 | *.ipa 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 | .build/ 42 | 43 | # CocoaPods 44 | # 45 | # We recommend against adding the Pods directory to your .gitignore. However 46 | # you should judge for yourself, the pros and cons are mentioned at: 47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 48 | # 49 | 50 | Pods/ 51 | 52 | # Carthage 53 | # 54 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 55 | # Carthage/Checkouts 56 | 57 | Carthage/Build 58 | 59 | # fastlane 60 | # 61 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 62 | # screenshots whenever they are needed. 63 | # For more information about the recommended setup visit: 64 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 65 | 66 | fastlane/report.xml 67 | fastlane/screenshots 68 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 5.0 2 | -------------------------------------------------------------------------------- /.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 56F33F8B44245CF7A6B05971 /* Pods_ExampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 64F8455E16C4B9D67DE5FB2C /* Pods_ExampleTests.framework */; }; 11 | 71E5E42570B8F4A51487A10E /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E6ECDAEC5BAEB9555A78C66 /* Pods_Example.framework */; }; 12 | DAE4328A1EFA17060025C54B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE432891EFA17060025C54B /* AppDelegate.swift */; }; 13 | DAE4328C1EFA17060025C54B /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE4328B1EFA17060025C54B /* ViewController.swift */; }; 14 | DAE4328F1EFA17060025C54B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAE4328D1EFA17060025C54B /* Main.storyboard */; }; 15 | DAE432911EFA17060025C54B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DAE432901EFA17060025C54B /* Assets.xcassets */; }; 16 | DAE432941EFA17060025C54B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAE432921EFA17060025C54B /* LaunchScreen.storyboard */; }; 17 | DAE4329F1EFA17060025C54B /* ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE4329E1EFA17060025C54B /* ExampleTests.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | DAE4329B1EFA17060025C54B /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = DAE4327E1EFA17060025C54B /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = DAE432851EFA17060025C54B; 26 | remoteInfo = Example; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 10FD716BA0B0979BAA50C128 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; 32 | 580D942A85E3268B561369D1 /* Pods-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.debug.xcconfig"; sourceTree = ""; }; 33 | 5E6ECDAEC5BAEB9555A78C66 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 64F8455E16C4B9D67DE5FB2C /* Pods_ExampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | C127D306F67C4FED709A60BB /* Pods-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.release.xcconfig"; sourceTree = ""; }; 36 | DAE432861EFA17060025C54B /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | DAE432891EFA17060025C54B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 38 | DAE4328B1EFA17060025C54B /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 39 | DAE4328E1EFA17060025C54B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 40 | DAE432901EFA17060025C54B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 41 | DAE432931EFA17060025C54B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 42 | DAE432951EFA17060025C54B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | DAE4329A1EFA17060025C54B /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | DAE4329E1EFA17060025C54B /* ExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleTests.swift; sourceTree = ""; }; 45 | DAE432A01EFA17060025C54B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | E98AD5E8BFBABB85E6638EB5 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; 47 | /* End PBXFileReference section */ 48 | 49 | /* Begin PBXFrameworksBuildPhase section */ 50 | DAE432831EFA17060025C54B /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | 71E5E42570B8F4A51487A10E /* Pods_Example.framework in Frameworks */, 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | DAE432971EFA17060025C54B /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | 56F33F8B44245CF7A6B05971 /* Pods_ExampleTests.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 3A1DDFEE602E152C23D36F44 /* Pods */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | E98AD5E8BFBABB85E6638EB5 /* Pods-Example.debug.xcconfig */, 73 | 10FD716BA0B0979BAA50C128 /* Pods-Example.release.xcconfig */, 74 | 580D942A85E3268B561369D1 /* Pods-ExampleTests.debug.xcconfig */, 75 | C127D306F67C4FED709A60BB /* Pods-ExampleTests.release.xcconfig */, 76 | ); 77 | name = Pods; 78 | sourceTree = ""; 79 | }; 80 | DAE4327D1EFA17060025C54B = { 81 | isa = PBXGroup; 82 | children = ( 83 | DAE432881EFA17060025C54B /* Example */, 84 | DAE4329D1EFA17060025C54B /* ExampleTests */, 85 | DAE432871EFA17060025C54B /* Products */, 86 | 3A1DDFEE602E152C23D36F44 /* Pods */, 87 | E989E2D2618B100938BDE573 /* Frameworks */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | DAE432871EFA17060025C54B /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | DAE432861EFA17060025C54B /* Example.app */, 95 | DAE4329A1EFA17060025C54B /* ExampleTests.xctest */, 96 | ); 97 | name = Products; 98 | sourceTree = ""; 99 | }; 100 | DAE432881EFA17060025C54B /* Example */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | DAE432891EFA17060025C54B /* AppDelegate.swift */, 104 | DAE4328B1EFA17060025C54B /* ViewController.swift */, 105 | DAE4328D1EFA17060025C54B /* Main.storyboard */, 106 | DAE432901EFA17060025C54B /* Assets.xcassets */, 107 | DAE432921EFA17060025C54B /* LaunchScreen.storyboard */, 108 | DAE432951EFA17060025C54B /* Info.plist */, 109 | ); 110 | path = Example; 111 | sourceTree = ""; 112 | }; 113 | DAE4329D1EFA17060025C54B /* ExampleTests */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | DAE4329E1EFA17060025C54B /* ExampleTests.swift */, 117 | DAE432A01EFA17060025C54B /* Info.plist */, 118 | ); 119 | path = ExampleTests; 120 | sourceTree = ""; 121 | }; 122 | E989E2D2618B100938BDE573 /* Frameworks */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 5E6ECDAEC5BAEB9555A78C66 /* Pods_Example.framework */, 126 | 64F8455E16C4B9D67DE5FB2C /* Pods_ExampleTests.framework */, 127 | ); 128 | name = Frameworks; 129 | sourceTree = ""; 130 | }; 131 | /* End PBXGroup section */ 132 | 133 | /* Begin PBXNativeTarget section */ 134 | DAE432851EFA17060025C54B /* Example */ = { 135 | isa = PBXNativeTarget; 136 | buildConfigurationList = DAE432A31EFA17060025C54B /* Build configuration list for PBXNativeTarget "Example" */; 137 | buildPhases = ( 138 | 69C1DBA3EA61A40309EAA8CB /* [CP] Check Pods Manifest.lock */, 139 | DAE432821EFA17060025C54B /* Sources */, 140 | DAE432831EFA17060025C54B /* Frameworks */, 141 | DAE432841EFA17060025C54B /* Resources */, 142 | 9744F163D9198FE3D04A1A91 /* [CP] Embed Pods Frameworks */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Example; 149 | productName = Example; 150 | productReference = DAE432861EFA17060025C54B /* Example.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | DAE432991EFA17060025C54B /* ExampleTests */ = { 154 | isa = PBXNativeTarget; 155 | buildConfigurationList = DAE432A61EFA17060025C54B /* Build configuration list for PBXNativeTarget "ExampleTests" */; 156 | buildPhases = ( 157 | A31FC653526E2660B6C17324 /* [CP] Check Pods Manifest.lock */, 158 | DAE432961EFA17060025C54B /* Sources */, 159 | DAE432971EFA17060025C54B /* Frameworks */, 160 | DAE432981EFA17060025C54B /* Resources */, 161 | ); 162 | buildRules = ( 163 | ); 164 | dependencies = ( 165 | DAE4329C1EFA17060025C54B /* PBXTargetDependency */, 166 | ); 167 | name = ExampleTests; 168 | productName = ExampleTests; 169 | productReference = DAE4329A1EFA17060025C54B /* ExampleTests.xctest */; 170 | productType = "com.apple.product-type.bundle.unit-test"; 171 | }; 172 | /* End PBXNativeTarget section */ 173 | 174 | /* Begin PBXProject section */ 175 | DAE4327E1EFA17060025C54B /* Project object */ = { 176 | isa = PBXProject; 177 | attributes = { 178 | LastSwiftUpdateCheck = 0830; 179 | LastUpgradeCheck = 1020; 180 | ORGANIZATIONNAME = "Taisuke Fujita"; 181 | TargetAttributes = { 182 | DAE432851EFA17060025C54B = { 183 | CreatedOnToolsVersion = 8.3.3; 184 | DevelopmentTeam = HUVJ3972SJ; 185 | LastSwiftMigration = 1020; 186 | ProvisioningStyle = Automatic; 187 | }; 188 | DAE432991EFA17060025C54B = { 189 | CreatedOnToolsVersion = 8.3.3; 190 | LastSwiftMigration = 1020; 191 | ProvisioningStyle = Manual; 192 | TestTargetID = DAE432851EFA17060025C54B; 193 | }; 194 | }; 195 | }; 196 | buildConfigurationList = DAE432811EFA17060025C54B /* Build configuration list for PBXProject "Example" */; 197 | compatibilityVersion = "Xcode 3.2"; 198 | developmentRegion = English; 199 | hasScannedForEncodings = 0; 200 | knownRegions = ( 201 | en, 202 | Base, 203 | ); 204 | mainGroup = DAE4327D1EFA17060025C54B; 205 | productRefGroup = DAE432871EFA17060025C54B /* Products */; 206 | projectDirPath = ""; 207 | projectRoot = ""; 208 | targets = ( 209 | DAE432851EFA17060025C54B /* Example */, 210 | DAE432991EFA17060025C54B /* ExampleTests */, 211 | ); 212 | }; 213 | /* End PBXProject section */ 214 | 215 | /* Begin PBXResourcesBuildPhase section */ 216 | DAE432841EFA17060025C54B /* Resources */ = { 217 | isa = PBXResourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | DAE432941EFA17060025C54B /* LaunchScreen.storyboard in Resources */, 221 | DAE432911EFA17060025C54B /* Assets.xcassets in Resources */, 222 | DAE4328F1EFA17060025C54B /* Main.storyboard in Resources */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | DAE432981EFA17060025C54B /* Resources */ = { 227 | isa = PBXResourcesBuildPhase; 228 | buildActionMask = 2147483647; 229 | files = ( 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | }; 233 | /* End PBXResourcesBuildPhase section */ 234 | 235 | /* Begin PBXShellScriptBuildPhase section */ 236 | 69C1DBA3EA61A40309EAA8CB /* [CP] Check Pods Manifest.lock */ = { 237 | isa = PBXShellScriptBuildPhase; 238 | buildActionMask = 2147483647; 239 | files = ( 240 | ); 241 | inputPaths = ( 242 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 243 | "${PODS_ROOT}/Manifest.lock", 244 | ); 245 | name = "[CP] Check Pods Manifest.lock"; 246 | outputPaths = ( 247 | "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt", 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | shellPath = /bin/sh; 251 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 252 | showEnvVarsInLog = 0; 253 | }; 254 | 9744F163D9198FE3D04A1A91 /* [CP] Embed Pods Frameworks */ = { 255 | isa = PBXShellScriptBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | ); 259 | inputPaths = ( 260 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh", 261 | "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework", 262 | "${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework", 263 | "${BUILT_PRODUCTS_DIR}/RxStoreKit/RxStoreKit.framework", 264 | "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", 265 | ); 266 | name = "[CP] Embed Pods Frameworks"; 267 | outputPaths = ( 268 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", 269 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework", 270 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxStoreKit.framework", 271 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", 272 | ); 273 | runOnlyForDeploymentPostprocessing = 0; 274 | shellPath = /bin/sh; 275 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; 276 | showEnvVarsInLog = 0; 277 | }; 278 | A31FC653526E2660B6C17324 /* [CP] Check Pods Manifest.lock */ = { 279 | isa = PBXShellScriptBuildPhase; 280 | buildActionMask = 2147483647; 281 | files = ( 282 | ); 283 | inputPaths = ( 284 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 285 | "${PODS_ROOT}/Manifest.lock", 286 | ); 287 | name = "[CP] Check Pods Manifest.lock"; 288 | outputPaths = ( 289 | "$(DERIVED_FILE_DIR)/Pods-ExampleTests-checkManifestLockResult.txt", 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | shellPath = /bin/sh; 293 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 294 | showEnvVarsInLog = 0; 295 | }; 296 | /* End PBXShellScriptBuildPhase section */ 297 | 298 | /* Begin PBXSourcesBuildPhase section */ 299 | DAE432821EFA17060025C54B /* Sources */ = { 300 | isa = PBXSourcesBuildPhase; 301 | buildActionMask = 2147483647; 302 | files = ( 303 | DAE4328C1EFA17060025C54B /* ViewController.swift in Sources */, 304 | DAE4328A1EFA17060025C54B /* AppDelegate.swift in Sources */, 305 | ); 306 | runOnlyForDeploymentPostprocessing = 0; 307 | }; 308 | DAE432961EFA17060025C54B /* Sources */ = { 309 | isa = PBXSourcesBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | DAE4329F1EFA17060025C54B /* ExampleTests.swift in Sources */, 313 | ); 314 | runOnlyForDeploymentPostprocessing = 0; 315 | }; 316 | /* End PBXSourcesBuildPhase section */ 317 | 318 | /* Begin PBXTargetDependency section */ 319 | DAE4329C1EFA17060025C54B /* PBXTargetDependency */ = { 320 | isa = PBXTargetDependency; 321 | target = DAE432851EFA17060025C54B /* Example */; 322 | targetProxy = DAE4329B1EFA17060025C54B /* PBXContainerItemProxy */; 323 | }; 324 | /* End PBXTargetDependency section */ 325 | 326 | /* Begin PBXVariantGroup section */ 327 | DAE4328D1EFA17060025C54B /* Main.storyboard */ = { 328 | isa = PBXVariantGroup; 329 | children = ( 330 | DAE4328E1EFA17060025C54B /* Base */, 331 | ); 332 | name = Main.storyboard; 333 | sourceTree = ""; 334 | }; 335 | DAE432921EFA17060025C54B /* LaunchScreen.storyboard */ = { 336 | isa = PBXVariantGroup; 337 | children = ( 338 | DAE432931EFA17060025C54B /* Base */, 339 | ); 340 | name = LaunchScreen.storyboard; 341 | sourceTree = ""; 342 | }; 343 | /* End PBXVariantGroup section */ 344 | 345 | /* Begin XCBuildConfiguration section */ 346 | DAE432A11EFA17060025C54B /* Debug */ = { 347 | isa = XCBuildConfiguration; 348 | buildSettings = { 349 | ALWAYS_SEARCH_USER_PATHS = NO; 350 | CLANG_ANALYZER_NONNULL = YES; 351 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 352 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 353 | CLANG_CXX_LIBRARY = "libc++"; 354 | CLANG_ENABLE_MODULES = YES; 355 | CLANG_ENABLE_OBJC_ARC = YES; 356 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 357 | CLANG_WARN_BOOL_CONVERSION = YES; 358 | CLANG_WARN_COMMA = YES; 359 | CLANG_WARN_CONSTANT_CONVERSION = YES; 360 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 361 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 362 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 363 | CLANG_WARN_EMPTY_BODY = YES; 364 | CLANG_WARN_ENUM_CONVERSION = YES; 365 | CLANG_WARN_INFINITE_RECURSION = YES; 366 | CLANG_WARN_INT_CONVERSION = YES; 367 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 368 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 369 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 370 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 371 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 372 | CLANG_WARN_STRICT_PROTOTYPES = YES; 373 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 374 | CLANG_WARN_UNREACHABLE_CODE = YES; 375 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 376 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 377 | COPY_PHASE_STRIP = NO; 378 | DEBUG_INFORMATION_FORMAT = dwarf; 379 | ENABLE_STRICT_OBJC_MSGSEND = YES; 380 | ENABLE_TESTABILITY = YES; 381 | GCC_C_LANGUAGE_STANDARD = gnu99; 382 | GCC_DYNAMIC_NO_PIC = NO; 383 | GCC_NO_COMMON_BLOCKS = YES; 384 | GCC_OPTIMIZATION_LEVEL = 0; 385 | GCC_PREPROCESSOR_DEFINITIONS = ( 386 | "DEBUG=1", 387 | "$(inherited)", 388 | ); 389 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 390 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 391 | GCC_WARN_UNDECLARED_SELECTOR = YES; 392 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 393 | GCC_WARN_UNUSED_FUNCTION = YES; 394 | GCC_WARN_UNUSED_VARIABLE = YES; 395 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 396 | MTL_ENABLE_DEBUG_INFO = YES; 397 | ONLY_ACTIVE_ARCH = YES; 398 | SDKROOT = iphoneos; 399 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 400 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 401 | }; 402 | name = Debug; 403 | }; 404 | DAE432A21EFA17060025C54B /* Release */ = { 405 | isa = XCBuildConfiguration; 406 | buildSettings = { 407 | ALWAYS_SEARCH_USER_PATHS = NO; 408 | CLANG_ANALYZER_NONNULL = YES; 409 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 410 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 411 | CLANG_CXX_LIBRARY = "libc++"; 412 | CLANG_ENABLE_MODULES = YES; 413 | CLANG_ENABLE_OBJC_ARC = YES; 414 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 415 | CLANG_WARN_BOOL_CONVERSION = YES; 416 | CLANG_WARN_COMMA = YES; 417 | CLANG_WARN_CONSTANT_CONVERSION = YES; 418 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 419 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 420 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 421 | CLANG_WARN_EMPTY_BODY = YES; 422 | CLANG_WARN_ENUM_CONVERSION = YES; 423 | CLANG_WARN_INFINITE_RECURSION = YES; 424 | CLANG_WARN_INT_CONVERSION = YES; 425 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 426 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 427 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 428 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 429 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 430 | CLANG_WARN_STRICT_PROTOTYPES = YES; 431 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 432 | CLANG_WARN_UNREACHABLE_CODE = YES; 433 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 434 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 435 | COPY_PHASE_STRIP = NO; 436 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 437 | ENABLE_NS_ASSERTIONS = NO; 438 | ENABLE_STRICT_OBJC_MSGSEND = YES; 439 | GCC_C_LANGUAGE_STANDARD = gnu99; 440 | GCC_NO_COMMON_BLOCKS = YES; 441 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 442 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 443 | GCC_WARN_UNDECLARED_SELECTOR = YES; 444 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 445 | GCC_WARN_UNUSED_FUNCTION = YES; 446 | GCC_WARN_UNUSED_VARIABLE = YES; 447 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 448 | MTL_ENABLE_DEBUG_INFO = NO; 449 | SDKROOT = iphoneos; 450 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 451 | VALIDATE_PRODUCT = YES; 452 | }; 453 | name = Release; 454 | }; 455 | DAE432A41EFA17060025C54B /* Debug */ = { 456 | isa = XCBuildConfiguration; 457 | baseConfigurationReference = E98AD5E8BFBABB85E6638EB5 /* Pods-Example.debug.xcconfig */; 458 | buildSettings = { 459 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 460 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 461 | CODE_SIGN_STYLE = Automatic; 462 | DEVELOPMENT_TEAM = HUVJ3972SJ; 463 | INFOPLIST_FILE = Example/Info.plist; 464 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 465 | PRODUCT_BUNDLE_IDENTIFIER = com.9revolution9.Example; 466 | PRODUCT_NAME = "$(TARGET_NAME)"; 467 | PROVISIONING_PROFILE_SPECIFIER = ""; 468 | SWIFT_VERSION = 5.0; 469 | }; 470 | name = Debug; 471 | }; 472 | DAE432A51EFA17060025C54B /* Release */ = { 473 | isa = XCBuildConfiguration; 474 | baseConfigurationReference = 10FD716BA0B0979BAA50C128 /* Pods-Example.release.xcconfig */; 475 | buildSettings = { 476 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 477 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 478 | CODE_SIGN_STYLE = Automatic; 479 | DEVELOPMENT_TEAM = HUVJ3972SJ; 480 | INFOPLIST_FILE = Example/Info.plist; 481 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 482 | PRODUCT_BUNDLE_IDENTIFIER = com.9revolution9.Example; 483 | PRODUCT_NAME = "$(TARGET_NAME)"; 484 | PROVISIONING_PROFILE_SPECIFIER = ""; 485 | SWIFT_VERSION = 5.0; 486 | }; 487 | name = Release; 488 | }; 489 | DAE432A71EFA17060025C54B /* Debug */ = { 490 | isa = XCBuildConfiguration; 491 | baseConfigurationReference = 580D942A85E3268B561369D1 /* Pods-ExampleTests.debug.xcconfig */; 492 | buildSettings = { 493 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 494 | BUNDLE_LOADER = "$(TEST_HOST)"; 495 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 496 | CODE_SIGN_STYLE = Manual; 497 | DEVELOPMENT_TEAM = ""; 498 | INFOPLIST_FILE = ExampleTests/Info.plist; 499 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 500 | PRODUCT_BUNDLE_IDENTIFIER = com.9revolution9.ExampleTests; 501 | PRODUCT_NAME = "$(TARGET_NAME)"; 502 | PROVISIONING_PROFILE_SPECIFIER = ""; 503 | SWIFT_VERSION = 5.0; 504 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 505 | }; 506 | name = Debug; 507 | }; 508 | DAE432A81EFA17060025C54B /* Release */ = { 509 | isa = XCBuildConfiguration; 510 | baseConfigurationReference = C127D306F67C4FED709A60BB /* Pods-ExampleTests.release.xcconfig */; 511 | buildSettings = { 512 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 513 | BUNDLE_LOADER = "$(TEST_HOST)"; 514 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 515 | CODE_SIGN_STYLE = Manual; 516 | DEVELOPMENT_TEAM = ""; 517 | INFOPLIST_FILE = ExampleTests/Info.plist; 518 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 519 | PRODUCT_BUNDLE_IDENTIFIER = com.9revolution9.ExampleTests; 520 | PRODUCT_NAME = "$(TARGET_NAME)"; 521 | PROVISIONING_PROFILE_SPECIFIER = ""; 522 | SWIFT_VERSION = 5.0; 523 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 524 | }; 525 | name = Release; 526 | }; 527 | /* End XCBuildConfiguration section */ 528 | 529 | /* Begin XCConfigurationList section */ 530 | DAE432811EFA17060025C54B /* Build configuration list for PBXProject "Example" */ = { 531 | isa = XCConfigurationList; 532 | buildConfigurations = ( 533 | DAE432A11EFA17060025C54B /* Debug */, 534 | DAE432A21EFA17060025C54B /* Release */, 535 | ); 536 | defaultConfigurationIsVisible = 0; 537 | defaultConfigurationName = Release; 538 | }; 539 | DAE432A31EFA17060025C54B /* Build configuration list for PBXNativeTarget "Example" */ = { 540 | isa = XCConfigurationList; 541 | buildConfigurations = ( 542 | DAE432A41EFA17060025C54B /* Debug */, 543 | DAE432A51EFA17060025C54B /* Release */, 544 | ); 545 | defaultConfigurationIsVisible = 0; 546 | defaultConfigurationName = Release; 547 | }; 548 | DAE432A61EFA17060025C54B /* Build configuration list for PBXNativeTarget "ExampleTests" */ = { 549 | isa = XCConfigurationList; 550 | buildConfigurations = ( 551 | DAE432A71EFA17060025C54B /* Debug */, 552 | DAE432A81EFA17060025C54B /* Release */, 553 | ); 554 | defaultConfigurationIsVisible = 0; 555 | defaultConfigurationName = Release; 556 | }; 557 | /* End XCConfigurationList section */ 558 | }; 559 | rootObject = DAE4327E1EFA17060025C54B /* Project object */; 560 | } 561 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example 4 | // 5 | // Created by taisuke fujita on 2017/06/21. 6 | // Copyright © 2017年 Taisuke Fujita. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Example/Example/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/Example/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Example/Example/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Example 4 | // 5 | // Created by taisuke fujita on 2017/06/21. 6 | // Copyright © 2017年 Taisuke Fujita. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RxStoreKit 11 | 12 | class ViewController: UIViewController { 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | // Do any additional setup after loading the view, typically from a nib. 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /Example/ExampleTests/ExampleTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleTests.swift 3 | // ExampleTests 4 | // 5 | // Created by taisuke fujita on 2017/06/21. 6 | // Copyright © 2017年 Taisuke Fujita. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Example 11 | 12 | class ExampleTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Example/ExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '11.0' 3 | 4 | swift_version= '5.0' 5 | 6 | target 'Example' do 7 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 8 | use_frameworks! 9 | 10 | source 'https://github.com/CocoaPods/Specs.git' 11 | 12 | # Pods for RxStoreKit 13 | pod 'RxStoreKit', :path => '../' 14 | 15 | target 'ExampleTests' do 16 | inherit! :search_paths 17 | # Pods for testing 18 | end 19 | 20 | end 21 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - RxCocoa (5.0.0): 3 | - RxRelay (~> 5) 4 | - RxSwift (~> 5) 5 | - RxRelay (5.0.0): 6 | - RxSwift (~> 5) 7 | - RxStoreKit (1.2.3): 8 | - RxCocoa (~> 5.0) 9 | - RxSwift (~> 5.0) 10 | - RxSwift (5.0.0) 11 | 12 | DEPENDENCIES: 13 | - RxStoreKit (from `../`) 14 | 15 | SPEC REPOS: 16 | https://github.com/cocoapods/specs.git: 17 | - RxCocoa 18 | - RxRelay 19 | - RxSwift 20 | 21 | EXTERNAL SOURCES: 22 | RxStoreKit: 23 | :path: "../" 24 | 25 | SPEC CHECKSUMS: 26 | RxCocoa: fcf32050ac00d801f34a7f71d5e8e7f23026dcd8 27 | RxRelay: 4f7409406a51a55cd88483f21ed898c234d60f18 28 | RxStoreKit: 0f87dd2c4e2b1ff6a291ba5295a631a1915b60b7 29 | RxSwift: 8b0671caa829a763bbce7271095859121cbd895f 30 | 31 | PODFILE CHECKSUM: 4d1a295319263e2f7b50b7e6acd02b74d16db169 32 | 33 | COCOAPODS: 1.7.5 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Taisuke Fujita 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": "RxSwift", 6 | "repositoryURL": "https://github.com/ReactiveX/RxSwift.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "c8742ed97fc2f0c015a5ea5eddefb064cd7532d2", 10 | "version": "6.0.0" 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 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "RxStoreKit", 8 | products: [ 9 | // Products define the executables and libraries produced by a package, and make them visible to other packages. 10 | .library( 11 | name: "RxStoreKit", 12 | targets: ["RxStoreKit"]), 13 | ], 14 | dependencies: [ 15 | .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "6.0.0"), 16 | ], 17 | targets: [ 18 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 19 | // Targets can depend on other targets in this package, and on products in packages which this package depends on. 20 | .target( 21 | name: "RxStoreKit", 22 | dependencies: ["RxSwift", "RxCocoa"]), 23 | .testTarget( 24 | name: "RxStoreKitTests", 25 | dependencies: ["RxStoreKit"]), 26 | ] 27 | ) 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RxStoreKit 2 | 3 | RxStoreKit is lightweight and easy to use Rx support for StoreKit(In-App Purchases). 4 | 5 | ## Usage 6 | 7 | ### Request Products 8 | 9 | ```swift 10 | import StoreKit 11 | import RxSwift 12 | import RxStoreKit 13 | 14 | let disposeBag = DisposeBag() 15 | 16 | let productRequest = SKProductsRequest(productIdentifiers: Set(["your app product id"])) 17 | productRequest.rx.productsRequest 18 | .subscribe(onNext: { product in 19 | print(product) 20 | }).disposed(by: disposeBag) 21 | productRequest.start() 22 | ``` 23 | 24 | ### Restore Transactions 25 | 26 | ```swift 27 | SKPaymentQueue.default().rx.restoreCompletedTransactions() 28 | .subscribe(onNext: { queue in 29 | // paymentQueueRestoreCompletedTransactionsFinished 30 | print(queue) 31 | }, onError: { error in 32 | // restoreCompletedTransactionsFailedWithError 33 | print(queue) 34 | }).disposed(by: disposeBag) 35 | ``` 36 | 37 | ### Request payment 38 | 39 | ```swift 40 | let productRequest = SKProductsRequest(productIdentifiers: Set(["xxx.xxx.xxx"])) 41 | productRequest.rx.productsRequest 42 | .flatMap { response -> Observable in 43 | return Observable.from(response.products) 44 | } 45 | .flatMap { product -> Observable in 46 | return SKPaymentQueue.default().rx.add(product: product) 47 | } 48 | .subscribe(onNext: { transaction in 49 | print(transaction) 50 | }).disposed(by: disposeBag) 51 | productRequest.start() 52 | ``` 53 | 54 | ### Request receipt refresh 55 | ```swift 56 | let receiptRefreshRequest = SKReceiptRefreshRequest() 57 | receiptRefreshRequest.rx.request 58 | .subscribe(onCompleted: { 59 | // Refreshed receipt is available 60 | }, onError: { error in 61 | print(error) 62 | }).disposed(by: disposeBag) 63 | receiptRefreshRequest.start() 64 | ``` 65 | 66 | ### Download hosting contents 67 | Download In-App Purchase Contents 68 | ```swift 69 | let productRequest = SKProductsRequest(productIdentifiers: Set(["xxx.xxx.xxx"])) 70 | productRequest.rx.productsRequest 71 | .flatMap { response -> Observable in 72 | return Observable.from(response.products) 73 | } 74 | .flatMap { product -> Observable in 75 | return SKPaymentQueue.default().rx.add(product: product) 76 | } 77 | .flatMap { transaction -> Observable in 78 | return SKPaymentQueue.default().rx.start(downloads: transaction.downloads) 79 | } 80 | .subscribe(onNext: { download in 81 | print(download) 82 | }).disposed(by: disposeBag) 83 | productRequest.start() 84 | ``` 85 | 86 | ## Installation 87 | 88 | This library depends on both __RxSwift__ and __RxCocoa__ 89 | 90 | ### Swift Package Manager 91 | Create a Package.swift file. 92 | ```swift 93 | import PackageDescription 94 | 95 | let package = Package( 96 | name: "RxTestProject", 97 | dependencies: [ 98 | .package(url: "https://github.com/glassonion1/RxStoreKit.git", from: "1.3.0") 99 | ], 100 | targets: [ 101 | .target(name: "RxTestProject", dependencies: ["RxStoreKit"]) 102 | ] 103 | ) 104 | ``` 105 | 106 | ## License 107 | 108 | RxStoreKit is available under the MIT license. See the LICENSE file for more info. 109 | -------------------------------------------------------------------------------- /Sources/RxStoreKit/RxSKPaymentTransactionObserver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RxSKPaymentTransactionObserver.swift 3 | // RxStoreKit 4 | // 5 | // Created by taisuke fujita on 2017/06/21. 6 | // Copyright © 2017年 Taisuke Fujita. All rights reserved. 7 | // 8 | 9 | import StoreKit 10 | #if !RX_NO_MODULE 11 | import RxSwift 12 | import RxCocoa 13 | #endif 14 | 15 | public class RxSKPaymentTransactionObserver { 16 | 17 | static let shared = RxSKPaymentTransactionObserver() 18 | 19 | private init() { 20 | SKPaymentQueue.default().add(observer) 21 | } 22 | 23 | deinit { 24 | SKPaymentQueue.default().remove(observer) 25 | } 26 | 27 | let observer = Observer() 28 | 29 | class Observer: NSObject, SKPaymentTransactionObserver { 30 | 31 | let updatedTransactionSubject = PublishSubject() 32 | let removedTransactionSubject = PublishSubject() 33 | let restoreCompletedTransactionsFailedWithErrorSubject = PublishSubject<(SKPaymentQueue, Error)>() 34 | let paymentQueueRestoreCompletedTransactionsFinishedSubject = PublishSubject() 35 | let updatedDownloadSubject = PublishSubject() 36 | 37 | public func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) { 38 | transactions.forEach({ transaction in 39 | updatedTransactionSubject.onNext(transaction) 40 | }) 41 | } 42 | 43 | public func paymentQueue(_ queue: SKPaymentQueue, removedTransactions transactions: [SKPaymentTransaction]) { 44 | transactions.forEach({ transaction in 45 | removedTransactionSubject.onNext(transaction) 46 | }) 47 | } 48 | 49 | public func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: Error) { 50 | restoreCompletedTransactionsFailedWithErrorSubject.onNext((queue, error)) 51 | } 52 | 53 | public func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) { 54 | paymentQueueRestoreCompletedTransactionsFinishedSubject.onNext(queue) 55 | } 56 | 57 | public func paymentQueue(_ queue: SKPaymentQueue, updatedDownloads downloads: [SKDownload]) { 58 | downloads.forEach({ download in 59 | updatedDownloadSubject.onNext(download) 60 | }) 61 | } 62 | 63 | } 64 | 65 | public var rx_updatedTransaction: Observable { 66 | return observer.updatedTransactionSubject 67 | } 68 | 69 | var rx_removedTransaction: Observable { 70 | return observer.removedTransactionSubject 71 | } 72 | 73 | var rx_restoreCompletedTransactionsFailedWithError: Observable<(SKPaymentQueue, Error)> { 74 | return observer.restoreCompletedTransactionsFailedWithErrorSubject 75 | } 76 | 77 | var rx_paymentQueueRestoreCompletedTransactionsFinished: Observable { 78 | return observer.paymentQueueRestoreCompletedTransactionsFinishedSubject 79 | } 80 | 81 | var rx_updatedDownload: Observable { 82 | return observer.updatedDownloadSubject 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Sources/RxStoreKit/RxStoreKit.swift: -------------------------------------------------------------------------------- 1 | struct RxStoreKit { 2 | var text = "Hello, World!" 3 | } 4 | -------------------------------------------------------------------------------- /Sources/RxStoreKit/SKPaymentQueue+Rx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SKPaymentQueue+Rx.swift 3 | // RxStoreKit 4 | // 5 | // Created by taisuke fujita on 2017/06/21. 6 | // Copyright © 2017年 Taisuke Fujita. All rights reserved. 7 | // 8 | 9 | import StoreKit 10 | #if !RX_NO_MODULE 11 | import RxSwift 12 | import RxCocoa 13 | #endif 14 | 15 | public enum ReceiptError: Error { 16 | case invalid(code: Int) 17 | case illegal 18 | } 19 | 20 | extension ReceiptError: CustomStringConvertible { 21 | 22 | public var description: String { 23 | let message: String 24 | switch self { 25 | case .invalid(21000): 26 | message = "The App Store could not read the JSON object you provided." 27 | case .invalid(21002): 28 | message = "The data in the receipt-data property was malformed or missing." 29 | case .invalid(21003): 30 | message = "The receipt could not be authenticated." 31 | case .invalid(21004): 32 | message = "The shared secret you provided does not match the shared secret on file for your account." 33 | case .invalid(21005): 34 | message = "The receipt server is not currently available." 35 | case .invalid(21006): 36 | message = "This receipt is valid but the subscription has expired. When this status code is returned to your server, the receipt data is also decoded and returned as part of the response." 37 | case .invalid(21007): 38 | message = "This receipt is from the test environment, but it was sent to the production environment for verification. Send it to the test environment instead." 39 | case .invalid(21008): 40 | message = "This receipt is from the production environment, but it was sent to the test environment for verification. Send it to the production environment instead." 41 | default: 42 | message = "Unknown error occured." 43 | } 44 | return message 45 | } 46 | } 47 | 48 | extension SKPaymentQueue { 49 | func verifyReceipt(transaction: SKPaymentTransaction, excludeOldTransaction: Bool = false) -> Observable { 50 | #if DEBUG 51 | let verifyReceiptURLString = "https://sandbox.itunes.apple.com/verifyReceipt" 52 | #else 53 | let verifyReceiptURLString = "https://buy.itunes.apple.com/verifyReceipt" 54 | #endif 55 | let url = URL(string: verifyReceiptURLString)! 56 | do { 57 | let receiptURL = Bundle.main.appStoreReceiptURL 58 | let data = try Data(contentsOf: receiptURL!, options: []) 59 | let base64 = data.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0)) 60 | let json = try JSONSerialization.data(withJSONObject: 61 | [ 62 | "receipt-data": base64, 63 | "exclude-old-transactions": excludeOldTransaction 64 | ], options: []) 65 | 66 | var request = URLRequest(url: url, cachePolicy: .reloadIgnoringCacheData) 67 | request.httpMethod = "POST" 68 | request.addValue("application/json", forHTTPHeaderField: "Content-Type") 69 | request.httpBody = json 70 | let scheduler = ConcurrentDispatchQueueScheduler(qos: .background) 71 | return URLSession.shared.rx.json(request: request).timeout(.seconds(30), scheduler: scheduler) 72 | .flatMapLatest({ [unowned self] response -> Observable in 73 | self.verificationResult(for: transaction, response: response) 74 | }) 75 | } catch let error { 76 | return Observable.error(error) 77 | } 78 | } 79 | 80 | func verificationResult(for transaction: SKPaymentTransaction, response: Any) -> Observable { 81 | let json = response as! [String: AnyObject] 82 | let state = json["status"] as! Int 83 | if state == 0 { 84 | print(json) 85 | let receipt = json["receipt"]! 86 | let inApp = receipt["in_app"] as! [[String: Any]] 87 | let contains = inApp.contains { element -> Bool in 88 | let productId = element["product_id"] as! String 89 | return productId == transaction.payment.productIdentifier 90 | } 91 | if contains { 92 | return Observable.of(transaction) 93 | } else { 94 | return Observable.error(ReceiptError.illegal) 95 | } 96 | } else { 97 | let error = ReceiptError.invalid(code: state) 98 | return Observable.error(error) 99 | } 100 | } 101 | } 102 | 103 | extension Reactive where Base: SKPaymentQueue { 104 | 105 | public var transactionObserver: RxSKPaymentTransactionObserver { 106 | return RxSKPaymentTransactionObserver.shared 107 | } 108 | 109 | 110 | public func restoreCompletedTransactions() -> Observable { 111 | 112 | let success = transactionObserver.rx_paymentQueueRestoreCompletedTransactionsFinished 113 | 114 | let error = transactionObserver.rx_restoreCompletedTransactionsFailedWithError 115 | .map { (queue, error) -> SKPaymentQueue in 116 | throw SKError(_nsError: error as NSError) 117 | } 118 | 119 | let observable = Observable.create { observer in 120 | 121 | let disposable = success.amb(error).subscribe(observer) 122 | 123 | self.base.restoreCompletedTransactions() 124 | 125 | return Disposables.create { 126 | disposable.dispose() 127 | } 128 | } 129 | 130 | return observable 131 | } 132 | 133 | public func add(product: SKProduct, shouldVerify: Bool) -> Observable { 134 | 135 | let payment = SKPayment(product: product) 136 | 137 | if shouldVerify { 138 | let observable = Observable.create { observer in 139 | 140 | let disposable = self.transactionObserver.rx_updatedTransaction 141 | .flatMapLatest({ transaction -> Observable in 142 | switch transaction.transactionState { 143 | case .purchased: 144 | return self.base.verifyReceipt(transaction: transaction) 145 | default: print("transaction state = \(transaction.transactionState)") 146 | } 147 | return Observable.of(transaction) 148 | }) 149 | .bind(to: observer) 150 | 151 | self.base.add(payment) 152 | 153 | return Disposables.create { 154 | disposable.dispose() 155 | } 156 | } 157 | 158 | return observable 159 | } 160 | 161 | return Observable.create { observer in 162 | 163 | let disposable = self.transactionObserver.rx_updatedTransaction 164 | .subscribe(onNext:{ transaction in 165 | 166 | 167 | switch transaction.transactionState { 168 | case .purchased: 169 | SKPaymentQueue.default().finishTransaction(transaction) 170 | 171 | observer.onNext(transaction) 172 | observer.onCompleted() 173 | 174 | case .failed: 175 | SKPaymentQueue.default().finishTransaction(transaction) 176 | if let err = transaction.error { 177 | 178 | observer.onError(err) 179 | } else { 180 | observer.onNext(transaction) 181 | observer.onCompleted() 182 | } 183 | 184 | case .restored: 185 | SKPaymentQueue.default().finishTransaction(transaction) 186 | observer.onNext(transaction) 187 | 188 | default: 189 | observer.onNext(transaction) 190 | } 191 | }) 192 | 193 | self.base.add(payment) 194 | 195 | return Disposables.create() { 196 | disposable.dispose() 197 | } 198 | } 199 | } 200 | 201 | @available(iOS 12.0, *) 202 | public func start(downloads: [SKDownload]) -> Observable { 203 | 204 | let observable = Observable.create { observer in 205 | 206 | let disposable = self.transactionObserver.rx_updatedDownload.subscribe(onNext: { download in 207 | switch (download.state) { 208 | case .waiting: 209 | print("waiting") 210 | case .active: 211 | print("active") 212 | case .finished: 213 | observer.onNext(download) 214 | case .failed: 215 | if let downloadError = download.error { 216 | observer.onError(downloadError) 217 | } 218 | case .cancelled: 219 | observer.onCompleted() 220 | case .paused: 221 | print("paused") 222 | } 223 | }) 224 | 225 | self.base.start(downloads) 226 | 227 | return Disposables.create { 228 | disposable.dispose() 229 | } 230 | } 231 | 232 | return observable 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /Sources/RxStoreKit/SKProductsRequest+Rx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SKProductsRequest+Rx.swift 3 | // RxStoreKit 4 | // 5 | // Created by taisuke fujita on 2017/06/21. 6 | // Copyright © 2017年 Taisuke Fujita. All rights reserved. 7 | // 8 | 9 | import StoreKit 10 | #if !RX_NO_MODULE 11 | import RxSwift 12 | import RxCocoa 13 | #endif 14 | 15 | extension SKProductsRequest { 16 | 17 | public func createRxDelegateProxy() -> SKProductsRequestDelegateProxy { 18 | return SKProductsRequestDelegateProxy(parentObject: self) 19 | } 20 | 21 | } 22 | 23 | extension Reactive where Base: SKProductsRequest { 24 | 25 | public var delegate: DelegateProxy { 26 | return SKProductsRequestDelegateProxy.proxy(for: base) 27 | } 28 | 29 | public var productsRequest: Observable { 30 | return SKProductsRequestDelegateProxy.proxy(for: base).responseSubject.asObservable() 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Sources/RxStoreKit/SKProductsRequestDelegateProxy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SKProductsRequestDelegateProxy.swift 3 | // RxStoreKit 4 | // 5 | // Created by taisuke fujita on 2017/06/21. 6 | // Copyright © 2017年 Taisuke Fujita. All rights reserved. 7 | // 8 | 9 | import StoreKit 10 | #if !RX_NO_MODULE 11 | import RxSwift 12 | import RxCocoa 13 | #endif 14 | 15 | public class SKProductsRequestDelegateProxy 16 | : DelegateProxy 17 | , DelegateProxyType 18 | , SKProductsRequestDelegate { 19 | 20 | public init(parentObject: SKProductsRequest) { 21 | super.init(parentObject: parentObject, delegateProxy: SKProductsRequestDelegateProxy.self) 22 | } 23 | 24 | public static func registerKnownImplementations() { 25 | self.register { SKProductsRequestDelegateProxy(parentObject: $0) } 26 | } 27 | 28 | public static func currentDelegate(for object: SKProductsRequest) -> SKProductsRequestDelegate? { 29 | return object.delegate 30 | } 31 | 32 | public static func setCurrentDelegate(_ delegate: SKProductsRequestDelegate?, to object: SKProductsRequest) { 33 | object.delegate = delegate 34 | } 35 | 36 | let responseSubject = PublishSubject() 37 | 38 | public func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) { 39 | _forwardToDelegate?.productsRequest(request, didReceive: response) 40 | responseSubject.onNext(response) 41 | } 42 | 43 | public func request(_ request: SKRequest, didFailWithError error: Error) { 44 | _forwardToDelegate?.request?(request, didFailWithError: error) 45 | responseSubject.onError(error) 46 | } 47 | 48 | deinit { 49 | responseSubject.on(.completed) 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Sources/RxStoreKit/SKReceiptRefreshRequest+Rx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SKReceiptRefreshRequest+Rx.swift 3 | // Pods-Example 4 | // 5 | // Created by François Boulais on 16/12/2017. 6 | // 7 | 8 | import Foundation 9 | 10 | import StoreKit 11 | #if !RX_NO_MODULE 12 | import RxSwift 13 | import RxCocoa 14 | #endif 15 | 16 | extension SKReceiptRefreshRequest { 17 | 18 | public func createRxDelegateProxy() -> SKReceiptRefreshRequestDelegateProxy { 19 | return SKReceiptRefreshRequestDelegateProxy(parentObject: self) 20 | } 21 | 22 | } 23 | 24 | extension Reactive where Base: SKReceiptRefreshRequest { 25 | 26 | public var delegate: DelegateProxy { 27 | return SKReceiptRefreshRequestDelegateProxy.proxy(for: base) 28 | } 29 | 30 | public var request: Completable { 31 | return SKReceiptRefreshRequestDelegateProxy.proxy(for: base).responseSubject.ignoreElements().asCompletable() 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Sources/RxStoreKit/SKReceiptRefreshRequestDelegateProxy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SKReceiptRefreshRequestDelegateProxy.swift 3 | // Pods-Example 4 | // 5 | // Created by François Boulais on 16/12/2017. 6 | // 7 | 8 | import StoreKit 9 | #if !RX_NO_MODULE 10 | import RxSwift 11 | import RxCocoa 12 | #endif 13 | 14 | public class SKReceiptRefreshRequestDelegateProxy 15 | : DelegateProxy 16 | , DelegateProxyType 17 | , SKRequestDelegate { 18 | 19 | public init(parentObject: SKReceiptRefreshRequest) { 20 | super.init(parentObject: parentObject, delegateProxy: SKReceiptRefreshRequestDelegateProxy.self) 21 | } 22 | 23 | public static func registerKnownImplementations() { 24 | self.register { SKReceiptRefreshRequestDelegateProxy(parentObject: $0) } 25 | } 26 | 27 | public static func currentDelegate(for object: SKReceiptRefreshRequest) -> SKRequestDelegate? { 28 | return object.delegate 29 | } 30 | 31 | public static func setCurrentDelegate(_ delegate: SKRequestDelegate?, to object: SKReceiptRefreshRequest) { 32 | object.delegate = delegate 33 | } 34 | 35 | let responseSubject = PublishSubject() 36 | 37 | public func requestDidFinish(_ request: SKRequest) { 38 | _forwardToDelegate?.requestDidFinish?(request) 39 | responseSubject.onCompleted() 40 | } 41 | 42 | public func request(_ request: SKRequest, didFailWithError error: Error) { 43 | _forwardToDelegate?.request?(request, didFailWithError: error) 44 | responseSubject.onError(error) 45 | } 46 | 47 | deinit { 48 | responseSubject.on(.completed) 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | import RxStoreKitTests 4 | 5 | var tests = [XCTestCaseEntry]() 6 | tests += RxStoreKitTests.allTests() 7 | XCTMain(tests) 8 | -------------------------------------------------------------------------------- /Tests/RxStoreKitTests/RxStoreKitTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import RxStoreKit 3 | 4 | final class RxStoreKitTests: XCTestCase { 5 | func testExample() { 6 | // This is an example of a functional test case. 7 | // Use XCTAssert and related functions to verify your tests produce the correct 8 | // results. 9 | XCTAssertEqual(RxStoreKit().text, "Hello, World!") 10 | } 11 | 12 | static var allTests = [ 13 | ("testExample", testExample), 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /Tests/RxStoreKitTests/XCTestManifests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | #if !canImport(ObjectiveC) 4 | public func allTests() -> [XCTestCaseEntry] { 5 | return [ 6 | testCase(RxStoreKitTests.allTests), 7 | ] 8 | } 9 | #endif 10 | --------------------------------------------------------------------------------