├── .circleci └── config.yml ├── .gitignore ├── .jazzy.yaml ├── .travis.yml ├── Blockstack.podspec ├── Blockstack ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── Auth.swift │ ├── BigInt.swift │ ├── Blockstack.swift │ ├── DataTypes.swift │ ├── Encryption.swift │ ├── Errors.swift │ ├── Extensions.swift │ ├── Gaia.swift │ ├── GaiaHubSession.swift │ ├── JS Bridge │ ├── BitcoinJS.swift │ ├── BlockstackJS.swift │ ├── EllipticJS.swift │ ├── EncryptionJS.swift │ ├── JSONTokensJS.swift │ ├── KeysJS.swift │ └── ProfileProofsJS.swift │ ├── Keys.swift │ ├── ObjC Bridge │ ├── Auth+ObjC.swift │ ├── Blockstack+ObjC.swift │ └── DataTypes+ObjC.swift │ └── ProfileHelper.swift ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Example ├── Blockstack.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Blockstack-Example.xcscheme ├── Blockstack.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Blockstack │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift ├── Podfile ├── Podfile.lock ├── Pods │ ├── CryptoSwift │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ └── CryptoSwift │ │ │ ├── AEAD │ │ │ ├── AEAD.swift │ │ │ └── AEADChaCha20Poly1305.swift │ │ │ ├── AES.Cryptors.swift │ │ │ ├── AES.swift │ │ │ ├── Array+Extension.swift │ │ │ ├── Authenticator.swift │ │ │ ├── BatchedCollection.swift │ │ │ ├── Bit.swift │ │ │ ├── BlockCipher.swift │ │ │ ├── BlockDecryptor.swift │ │ │ ├── BlockEncryptor.swift │ │ │ ├── BlockMode │ │ │ ├── BlockMode.swift │ │ │ ├── BlockModeOptions.swift │ │ │ ├── CBC.swift │ │ │ ├── CCM.swift │ │ │ ├── CFB.swift │ │ │ ├── CTR.swift │ │ │ ├── CipherModeWorker.swift │ │ │ ├── ECB.swift │ │ │ ├── GCM.swift │ │ │ ├── OFB.swift │ │ │ └── PCBC.swift │ │ │ ├── Blowfish.swift │ │ │ ├── CBCMAC.swift │ │ │ ├── CMAC.swift │ │ │ ├── ChaCha20.swift │ │ │ ├── Checksum.swift │ │ │ ├── Cipher.swift │ │ │ ├── Collection+Extension.swift │ │ │ ├── CompactMap.swift │ │ │ ├── Cryptor.swift │ │ │ ├── Cryptors.swift │ │ │ ├── Digest.swift │ │ │ ├── DigestType.swift │ │ │ ├── Foundation │ │ │ ├── AES+Foundation.swift │ │ │ ├── Array+Foundation.swift │ │ │ ├── Blowfish+Foundation.swift │ │ │ ├── ChaCha20+Foundation.swift │ │ │ ├── Data+Extension.swift │ │ │ ├── HMAC+Foundation.swift │ │ │ ├── Rabbit+Foundation.swift │ │ │ ├── String+FoundationExtension.swift │ │ │ └── Utils+Foundation.swift │ │ │ ├── Generics.swift │ │ │ ├── HKDF.swift │ │ │ ├── HMAC.swift │ │ │ ├── Int+Extension.swift │ │ │ ├── MD5.swift │ │ │ ├── NoPadding.swift │ │ │ ├── Operators.swift │ │ │ ├── PKCS │ │ │ ├── PBKDF1.swift │ │ │ ├── PBKDF2.swift │ │ │ ├── PKCS5.swift │ │ │ ├── PKCS7.swift │ │ │ └── PKCS7Padding.swift │ │ │ ├── Padding.swift │ │ │ ├── Poly1305.swift │ │ │ ├── Rabbit.swift │ │ │ ├── RandomBytesSequence.swift │ │ │ ├── SHA1.swift │ │ │ ├── SHA2.swift │ │ │ ├── SHA3.swift │ │ │ ├── Scrypt.swift │ │ │ ├── SecureBytes.swift │ │ │ ├── StreamDecryptor.swift │ │ │ ├── StreamEncryptor.swift │ │ │ ├── String+Extension.swift │ │ │ ├── UInt128.swift │ │ │ ├── UInt16+Extension.swift │ │ │ ├── UInt32+Extension.swift │ │ │ ├── UInt64+Extension.swift │ │ │ ├── UInt8+Extension.swift │ │ │ ├── Updatable.swift │ │ │ ├── Utils.swift │ │ │ └── ZeroPadding.swift │ ├── Local Podspecs │ │ └── Blockstack.podspec.json │ ├── Manifest.lock │ ├── Nimble │ │ ├── Carthage │ │ │ └── Checkouts │ │ │ │ └── CwlPreconditionTesting │ │ │ │ ├── Dependencies │ │ │ │ └── CwlCatchException │ │ │ │ │ └── Sources │ │ │ │ │ ├── CwlCatchException │ │ │ │ │ └── CwlCatchException.swift │ │ │ │ │ └── CwlCatchExceptionSupport │ │ │ │ │ ├── CwlCatchException.m │ │ │ │ │ └── include │ │ │ │ │ └── CwlCatchException.h │ │ │ │ └── Sources │ │ │ │ ├── CwlMachBadInstructionHandler │ │ │ │ ├── CwlMachBadInstructionHandler.m │ │ │ │ ├── include │ │ │ │ │ └── CwlMachBadInstructionHandler.h │ │ │ │ ├── mach_excServer.c │ │ │ │ └── mach_excServer.h │ │ │ │ └── CwlPreconditionTesting │ │ │ │ ├── CwlBadInstructionException.swift │ │ │ │ ├── CwlCatchBadInstruction.swift │ │ │ │ ├── CwlDarwinDefinitions.swift │ │ │ │ └── include │ │ │ │ └── CwlPreconditionTesting.h │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ ├── Nimble │ │ │ ├── Adapters │ │ │ │ ├── AdapterProtocols.swift │ │ │ │ ├── AssertionDispatcher.swift │ │ │ │ ├── AssertionRecorder.swift │ │ │ │ ├── NMBExpectation.swift │ │ │ │ ├── NMBObjCMatcher.swift │ │ │ │ ├── NimbleEnvironment.swift │ │ │ │ └── NimbleXCTestHandler.swift │ │ │ ├── DSL+Wait.swift │ │ │ ├── DSL.swift │ │ │ ├── Expectation.swift │ │ │ ├── ExpectationMessage.swift │ │ │ ├── Expression.swift │ │ │ ├── FailureMessage.swift │ │ │ ├── Matchers │ │ │ │ ├── AllPass.swift │ │ │ │ ├── Async.swift │ │ │ │ ├── BeAKindOf.swift │ │ │ │ ├── BeAnInstanceOf.swift │ │ │ │ ├── BeCloseTo.swift │ │ │ │ ├── BeEmpty.swift │ │ │ │ ├── BeGreaterThan.swift │ │ │ │ ├── BeGreaterThanOrEqualTo.swift │ │ │ │ ├── BeIdenticalTo.swift │ │ │ │ ├── BeLessThan.swift │ │ │ │ ├── BeLessThanOrEqual.swift │ │ │ │ ├── BeLogical.swift │ │ │ │ ├── BeNil.swift │ │ │ │ ├── BeVoid.swift │ │ │ │ ├── BeginWith.swift │ │ │ │ ├── Contain.swift │ │ │ │ ├── ContainElementSatisfying.swift │ │ │ │ ├── ElementsEqual.swift │ │ │ │ ├── EndWith.swift │ │ │ │ ├── Equal.swift │ │ │ │ ├── HaveCount.swift │ │ │ │ ├── Match.swift │ │ │ │ ├── MatchError.swift │ │ │ │ ├── MatcherFunc.swift │ │ │ │ ├── MatcherProtocols.swift │ │ │ │ ├── PostNotification.swift │ │ │ │ ├── Predicate.swift │ │ │ │ ├── RaisesException.swift │ │ │ │ ├── SatisfyAllOf.swift │ │ │ │ ├── SatisfyAnyOf.swift │ │ │ │ ├── ThrowAssertion.swift │ │ │ │ ├── ThrowError.swift │ │ │ │ └── ToSucceed.swift │ │ │ ├── Nimble.h │ │ │ └── Utils │ │ │ │ ├── Await.swift │ │ │ │ ├── Errors.swift │ │ │ │ ├── Functional.swift │ │ │ │ ├── SourceLocation.swift │ │ │ │ └── Stringers.swift │ │ │ └── NimbleObjectiveC │ │ │ ├── DSL.h │ │ │ ├── DSL.m │ │ │ ├── NMBExceptionCapture.h │ │ │ ├── NMBExceptionCapture.m │ │ │ ├── NMBStringify.h │ │ │ ├── NMBStringify.m │ │ │ └── XCTestObservationCenter+Register.m │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── PromisesObjC │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ └── FBLPromises │ │ │ ├── FBLPromise+All.m │ │ │ ├── FBLPromise+Always.m │ │ │ ├── FBLPromise+Any.m │ │ │ ├── FBLPromise+Async.m │ │ │ ├── FBLPromise+Await.m │ │ │ ├── FBLPromise+Catch.m │ │ │ ├── FBLPromise+Delay.m │ │ │ ├── FBLPromise+Do.m │ │ │ ├── FBLPromise+Race.m │ │ │ ├── FBLPromise+Recover.m │ │ │ ├── FBLPromise+Reduce.m │ │ │ ├── FBLPromise+Retry.m │ │ │ ├── FBLPromise+Testing.m │ │ │ ├── FBLPromise+Then.m │ │ │ ├── FBLPromise+Timeout.m │ │ │ ├── FBLPromise+Validate.m │ │ │ ├── FBLPromise+Wrap.m │ │ │ ├── FBLPromise.m │ │ │ ├── FBLPromiseError.m │ │ │ └── include │ │ │ ├── FBLPromise+All.h │ │ │ ├── FBLPromise+Always.h │ │ │ ├── FBLPromise+Any.h │ │ │ ├── FBLPromise+Async.h │ │ │ ├── FBLPromise+Await.h │ │ │ ├── FBLPromise+Catch.h │ │ │ ├── FBLPromise+Delay.h │ │ │ ├── FBLPromise+Do.h │ │ │ ├── FBLPromise+Race.h │ │ │ ├── FBLPromise+Recover.h │ │ │ ├── FBLPromise+Reduce.h │ │ │ ├── FBLPromise+Retry.h │ │ │ ├── FBLPromise+Testing.h │ │ │ ├── FBLPromise+Then.h │ │ │ ├── FBLPromise+Timeout.h │ │ │ ├── FBLPromise+Validate.h │ │ │ ├── FBLPromise+Wrap.h │ │ │ ├── FBLPromise.h │ │ │ ├── FBLPromiseError.h │ │ │ ├── FBLPromisePrivate.h │ │ │ └── FBLPromises.h │ ├── PromisesSwift │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ └── Promises │ │ │ ├── Promise+All.swift │ │ │ ├── Promise+Always.swift │ │ │ ├── Promise+Any.swift │ │ │ ├── Promise+Async.swift │ │ │ ├── Promise+Await.swift │ │ │ ├── Promise+Catch.swift │ │ │ ├── Promise+Delay.swift │ │ │ ├── Promise+Do.swift │ │ │ ├── Promise+Race.swift │ │ │ ├── Promise+Recover.swift │ │ │ ├── Promise+Reduce.swift │ │ │ ├── Promise+Retry.swift │ │ │ ├── Promise+Testing.swift │ │ │ ├── Promise+Then.swift │ │ │ ├── Promise+Timeout.swift │ │ │ ├── Promise+Validate.swift │ │ │ ├── Promise+Wrap.swift │ │ │ ├── Promise.swift │ │ │ └── PromiseError.swift │ ├── Quick │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ ├── Quick │ │ │ ├── Behavior.swift │ │ │ ├── Callsite.swift │ │ │ ├── Configuration │ │ │ │ ├── Configuration.swift │ │ │ │ └── QuickConfiguration.swift │ │ │ ├── DSL │ │ │ │ ├── DSL.swift │ │ │ │ └── World+DSL.swift │ │ │ ├── ErrorUtility.swift │ │ │ ├── Example.swift │ │ │ ├── ExampleGroup.swift │ │ │ ├── ExampleMetadata.swift │ │ │ ├── Filter.swift │ │ │ ├── Hooks │ │ │ │ ├── Closures.swift │ │ │ │ ├── ExampleHooks.swift │ │ │ │ ├── HooksPhase.swift │ │ │ │ └── SuiteHooks.swift │ │ │ ├── NSBundle+CurrentTestBundle.swift │ │ │ ├── QuickSelectedTestSuiteBuilder.swift │ │ │ ├── QuickTestSuite.swift │ │ │ ├── String+C99ExtendedIdentifier.swift │ │ │ ├── URL+FileName.swift │ │ │ └── World.swift │ │ │ ├── QuickObjectiveC │ │ │ ├── Configuration │ │ │ │ ├── QuickConfiguration.h │ │ │ │ └── QuickConfiguration.m │ │ │ ├── DSL │ │ │ │ ├── QCKDSL.h │ │ │ │ └── QCKDSL.m │ │ │ ├── Quick.h │ │ │ ├── QuickSpec.h │ │ │ ├── QuickSpec.m │ │ │ └── XCTestSuite+QuickTestSuiteBuilder.m │ │ │ └── QuickSpecBase │ │ │ ├── QuickSpecBase.m │ │ │ └── include │ │ │ └── QuickSpecBase.h │ ├── STRegex │ │ ├── LICENSE.txt │ │ ├── README.md │ │ └── Source │ │ │ └── Regex │ │ │ ├── Foundation+Ranges.swift │ │ │ ├── MatchResult.swift │ │ │ ├── Options.swift │ │ │ ├── Regex.swift │ │ │ ├── String+ReplaceMatching.swift │ │ │ └── ThreadLocal.swift │ └── Target Support Files │ │ ├── Blockstack │ │ ├── Blockstack-Info.plist │ │ ├── Blockstack-dummy.m │ │ ├── Blockstack-prefix.pch │ │ ├── Blockstack-umbrella.h │ │ ├── Blockstack.modulemap │ │ ├── Blockstack.xcconfig │ │ └── ResourceBundle-Blockstack-Blockstack-Info.plist │ │ ├── CryptoSwift │ │ ├── CryptoSwift-Info.plist │ │ ├── CryptoSwift-dummy.m │ │ ├── CryptoSwift-prefix.pch │ │ ├── CryptoSwift-umbrella.h │ │ ├── CryptoSwift.modulemap │ │ └── CryptoSwift.xcconfig │ │ ├── Nimble │ │ ├── Nimble-Info.plist │ │ ├── Nimble-dummy.m │ │ ├── Nimble-prefix.pch │ │ ├── Nimble-umbrella.h │ │ ├── Nimble.modulemap │ │ └── Nimble.xcconfig │ │ ├── Pods-Blockstack_Example │ │ ├── Pods-Blockstack_Example-Info.plist │ │ ├── Pods-Blockstack_Example-acknowledgements.markdown │ │ ├── Pods-Blockstack_Example-acknowledgements.plist │ │ ├── Pods-Blockstack_Example-dummy.m │ │ ├── Pods-Blockstack_Example-frameworks.sh │ │ ├── Pods-Blockstack_Example-umbrella.h │ │ ├── Pods-Blockstack_Example.debug.xcconfig │ │ ├── Pods-Blockstack_Example.modulemap │ │ └── Pods-Blockstack_Example.release.xcconfig │ │ ├── Pods-Blockstack_Tests │ │ ├── Pods-Blockstack_Tests-Info.plist │ │ ├── Pods-Blockstack_Tests-acknowledgements.markdown │ │ ├── Pods-Blockstack_Tests-acknowledgements.plist │ │ ├── Pods-Blockstack_Tests-dummy.m │ │ ├── Pods-Blockstack_Tests-frameworks.sh │ │ ├── Pods-Blockstack_Tests-umbrella.h │ │ ├── Pods-Blockstack_Tests.debug.xcconfig │ │ ├── Pods-Blockstack_Tests.modulemap │ │ └── Pods-Blockstack_Tests.release.xcconfig │ │ ├── PromisesObjC │ │ ├── PromisesObjC-Info.plist │ │ ├── PromisesObjC-dummy.m │ │ ├── PromisesObjC-umbrella.h │ │ ├── PromisesObjC.modulemap │ │ └── PromisesObjC.xcconfig │ │ ├── PromisesSwift │ │ ├── PromisesSwift-Info.plist │ │ ├── PromisesSwift-dummy.m │ │ ├── PromisesSwift-prefix.pch │ │ ├── PromisesSwift-umbrella.h │ │ ├── PromisesSwift.modulemap │ │ └── PromisesSwift.xcconfig │ │ ├── Quick │ │ ├── Quick-Info.plist │ │ ├── Quick-dummy.m │ │ ├── Quick-prefix.pch │ │ ├── Quick-umbrella.h │ │ ├── Quick.modulemap │ │ └── Quick.xcconfig │ │ └── STRegex │ │ ├── STRegex-Info.plist │ │ ├── STRegex-dummy.m │ │ ├── STRegex-prefix.pch │ │ ├── STRegex-umbrella.h │ │ ├── STRegex.modulemap │ │ └── STRegex.xcconfig └── Tests │ ├── EncryptionTests.swift │ ├── GaiaTests.swift │ ├── Info.plist │ └── ProfileTests.swift ├── Javascript ├── bigi.js ├── bitcoinjs.js ├── blockstack.js ├── elliptic.js ├── encryption.js ├── jsontokens.js ├── keys.js └── profileProofs.js ├── LICENSE.md ├── README.md ├── Tools └── Blockstack-webapp │ ├── .editorconfig │ ├── .gitignore │ ├── firebase.json │ ├── package.json │ ├── public │ ├── _headers │ ├── app.css │ ├── app.js │ ├── bootstrap.min.css │ ├── bundle.js │ ├── icon-192x192.png │ ├── index.html │ ├── manifest.json │ ├── redirect.html │ └── robots.txt │ ├── requires.js │ └── server.js ├── _Pods.xcodeproj └── docs ├── Classes.html ├── Classes ├── BitcoinJS.html ├── Blockstack.html ├── EllipticJS.html ├── EncryptionJS.html ├── JSONTokens.html ├── Keys.html ├── KeysJS.html ├── ObjCAuthResult.html ├── ObjCDecryptedValue.html ├── ObjCProfile.html ├── ObjCUserData.html ├── ProfileHelper.html ├── ProfileProofsJS.html └── UserData.html ├── Enums.html ├── Enums ├── AuthError.html ├── AuthResult.html ├── BlockstackConstants.html ├── GaiaError.html └── OperationResult.html ├── Extensions.html ├── Extensions └── URL.html ├── Structs.html ├── Structs ├── Content.html ├── DecryptedValue.html ├── ExternalAccount.html ├── ExternalAccountProof.html ├── GaiaConfig.html ├── Profile.html ├── ProfileToken.html ├── ProfileTokenFile.html ├── ProfileTokenPayload.html ├── UserData.html └── _BigInt.html ├── Typealiases.html ├── badge.svg ├── css ├── highlight.css └── jazzy.css ├── docsets ├── Blockstack.docset │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ ├── Documents │ │ ├── Classes.html │ │ ├── Classes │ │ │ ├── BitcoinJS.html │ │ │ ├── Blockstack.html │ │ │ ├── EllipticJS.html │ │ │ ├── EncryptionJS.html │ │ │ ├── JSONTokens.html │ │ │ ├── Keys.html │ │ │ ├── KeysJS.html │ │ │ ├── ObjCAuthResult.html │ │ │ ├── ObjCDecryptedValue.html │ │ │ ├── ObjCProfile.html │ │ │ ├── ObjCUserData.html │ │ │ ├── ProfileHelper.html │ │ │ ├── ProfileProofsJS.html │ │ │ └── UserData.html │ │ ├── Enums.html │ │ ├── Enums │ │ │ ├── AuthError.html │ │ │ ├── AuthResult.html │ │ │ ├── BlockstackConstants.html │ │ │ ├── GaiaError.html │ │ │ └── OperationResult.html │ │ ├── Extensions.html │ │ ├── Extensions │ │ │ └── URL.html │ │ ├── Structs.html │ │ ├── Structs │ │ │ ├── Content.html │ │ │ ├── DecryptedValue.html │ │ │ ├── ExternalAccount.html │ │ │ ├── ExternalAccountProof.html │ │ │ ├── GaiaConfig.html │ │ │ ├── Profile.html │ │ │ ├── ProfileToken.html │ │ │ ├── ProfileTokenFile.html │ │ │ ├── ProfileTokenPayload.html │ │ │ ├── UserData.html │ │ │ └── _BigInt.html │ │ ├── Typealiases.html │ │ ├── badge.svg │ │ ├── css │ │ │ ├── highlight.css │ │ │ └── jazzy.css │ │ ├── img │ │ │ ├── carat.png │ │ │ ├── dash.png │ │ │ └── gh.png │ │ ├── index.html │ │ ├── js │ │ │ ├── jazzy.js │ │ │ └── jquery.min.js │ │ ├── search.json │ │ └── undocumented.json │ │ └── docSet.dsidx └── Blockstack.tgz ├── img ├── carat.png ├── dash.png └── gh.png ├── index.html ├── js ├── jazzy.js └── jquery.min.js ├── search.json └── undocumented.json /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | 5 | # Specify the Xcode version to use 6 | macos: 7 | xcode: "11.1.0" 8 | 9 | steps: 10 | - checkout 11 | 12 | # Install CocoaPods 13 | - run: 14 | name: Install CocoaPods 15 | command: pod install 16 | working_directory: Example 17 | 18 | # Build the app and run tests 19 | - run: 20 | name: Build and run tests 21 | command: fastlane scan 22 | working_directory: Example 23 | environment: 24 | SCAN_DEVICE: iPhone 11 25 | SCAN_SCHEME: Blockstack-Example 26 | SCAN_OUTPUT_DIRECTORY: ./test_output 27 | SCAN_OUTPUT_TYPES: junit 28 | SCAN_OUTPUT_FILES: report.xml 29 | 30 | # Collect XML test results data to show in the UI, 31 | # and save the same XML files under test-results folder 32 | # in the Artifacts tab 33 | - store_test_results: 34 | path: "./Example/test_output" 35 | - store_artifacts: 36 | path: "./Example/test_output" 37 | destination: scan-test-results 38 | - store_artifacts: 39 | path: ~/Library/Logs/scan 40 | destination: scan-logs 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | # Package.resolved 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 | # Pods/ 50 | 51 | # Carthage 52 | # 53 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 54 | # Carthage/Checkouts 55 | 56 | Carthage/Build 57 | 58 | # fastlane 59 | # 60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 61 | # screenshots whenever they are needed. 62 | # For more information about the recommended setup visit: 63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 64 | 65 | fastlane/report.xml 66 | fastlane/Preview.html 67 | fastlane/screenshots 68 | fastlane/test_output 69 | .DS_Store 70 | Example/Blockstack.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings 71 | Tools/Blockstack-webapp/package-lock.json 72 | -------------------------------------------------------------------------------- /.jazzy.yaml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - './Blockstack/Classes/JS\ Bridge/*' 3 | - './Blockstack/Classes/ObjC\ Bridge/*' 4 | - "./Blockstack/Classes/Extensions.swift" 5 | 6 | undocumented_text: "" 7 | copyright: "" 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/Blockstack.xcworkspace -scheme Blockstack-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Blockstack.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint Blockstack.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'Blockstack' 11 | s.version = '1.1.0' 12 | s.summary = 'The Blockstack iOS SDK' 13 | s.swift_version = '4.0' 14 | 15 | # This description is used to generate tags and improve search results. 16 | # * Think: What does it do? Why did you write it? What is the focus? 17 | # * Try to keep it short, snappy and to the point. 18 | # * Write the description between the DESC delimiters below. 19 | # * Finally, don't worry about the indent, CocoaPods strips it! 20 | 21 | s.description = 'The Blockstack iOS library for authentication, encryption, and storage.' 22 | 23 | s.homepage = 'https://github.com/blockstack/blockstack-ios' 24 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 25 | s.license = { :type => 'MIT', :file => 'LICENSE.md' } 26 | s.author = { 'yknl' => 'yukanliao@gmail.com' } 27 | s.source = { :git => 'https://github.com/blockstack/blockstack-ios.git', :tag => "v#{s.version.to_s}" } 28 | 29 | s.social_media_url = 'https://twitter.com/blockstack' 30 | s.ios.deployment_target = '11.0' 31 | s.source_files = 'Blockstack/Classes/**/*' 32 | 33 | s.resource_bundles = { 34 | 'Blockstack' => ['Javascript/*.js'] 35 | # 'Blockstack' => ['Blockstack/Assets/*.png'] 36 | } 37 | 38 | s.dependency 'CryptoSwift', '0.15.0' 39 | s.dependency 'PromisesSwift' 40 | s.dependency 'STRegex' 41 | end 42 | -------------------------------------------------------------------------------- /Blockstack/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacks-archive/blockstack-ios/fceaf60d409a3a28640849a76cf9d01eec592da1/Blockstack/Assets/.gitkeep -------------------------------------------------------------------------------- /Blockstack/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacks-archive/blockstack-ios/fceaf60d409a3a28640849a76cf9d01eec592da1/Blockstack/Classes/.gitkeep -------------------------------------------------------------------------------- /Blockstack/Classes/Errors.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Errors.swift 3 | // Blockstack 4 | // 5 | // Created by Yukan Liao on 2018-04-11. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum AuthError: Error { 11 | case invalidResponse 12 | } 13 | 14 | @objc public enum GaiaError: Int, Error { 15 | case requestError 16 | case invalidResponse 17 | case connectionError 18 | case configurationError 19 | case signatureVerificationError 20 | case itemNotFoundError 21 | case serverError 22 | } 23 | -------------------------------------------------------------------------------- /Blockstack/Classes/ObjC Bridge/Auth+ObjC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Auth+ObjC.swift 3 | // Blockstack 4 | // 5 | // Created by Shreyas Thiagaraj on 9/7/18. 6 | // 7 | 8 | import Foundation 9 | 10 | @objc(AuthResult) 11 | @objcMembers public class ObjCAuthResult: NSObject { 12 | public let result: OperationResult 13 | public let userData: ObjCUserData? 14 | public let error: Error? 15 | 16 | init(_ authResult: AuthResult) { 17 | switch authResult { 18 | case let .success(data): 19 | self.result = .success 20 | self.userData = ObjCUserData(data) 21 | self.error = nil 22 | case let .failed(error): 23 | self.result = .failed 24 | self.userData = nil 25 | self.error = error 26 | case .cancelled: 27 | self.result = .cancelled 28 | self.userData = nil 29 | self.error = nil 30 | } 31 | } 32 | } 33 | 34 | @objc public enum OperationResult: Int { 35 | case success, failed, cancelled 36 | } 37 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to become a contributor and submit your own code 2 | 3 | We'd love to accept your patches! Before we can take them, we 4 | have to jump a couple of legal hurdles. 5 | 6 | ## Contributor License Agreements 7 | 8 | Please sign the [Contributor License Agreement(CLA)](https://cla-assistant.io/blockstack/blockstack-ios) 9 | 10 | Follow the links above to access the CLA and sign with your github account. Once that is done, we'll be able to 11 | accept your pull requests. 12 | 13 | ## Contributing A Patch 14 | 15 | 1. Submit an issue describing your proposed change. 16 | 1. The repo owner will respond to your issue promptly. 17 | 1. If your proposed change is accepted, and you haven't already done so, sign a 18 | Contributor License Agreement (see details above). 19 | 1. Fork the desired repo, develop and test your code changes. 20 | 1. Ensure that your code adheres to the existing style in the repo to which 21 | you are contributing. 22 | 1. Ensure that your code has an appropriate set of unit and/or integration tests which all pass. 23 | 1. Submit a pull request. 24 | -------------------------------------------------------------------------------- /Example/Blockstack.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Blockstack.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Blockstack.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Blockstack/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Blockstack 4 | // 5 | // Created by Yukan Liao on 03/27/2018. 6 | // 7 | 8 | import UIKit 9 | 10 | @UIApplicationMain 11 | class AppDelegate: UIResponder, UIApplicationDelegate { 12 | var window: UIWindow? 13 | 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Example/Blockstack/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/Blockstack/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 | CFBundleSignature 20 | ???? 21 | CFBundleURLTypes 22 | 23 | 24 | CFBundleTypeRole 25 | Editor 26 | CFBundleURLName 27 | MyBlockstackApp 28 | CFBundleURLSchemes 29 | 30 | myblockstackapp 31 | 32 | 33 | 34 | CFBundleVersion 35 | 1 36 | LSRequiresIPhoneOS 37 | 38 | NSAppTransportSecurity 39 | 40 | NSAllowsArbitraryLoads 41 | 42 | 43 | UILaunchStoryboardName 44 | LaunchScreen 45 | UIMainStoryboardFile 46 | Main 47 | UIRequiredDeviceCapabilities 48 | 49 | armv7 50 | 51 | UISupportedInterfaceOrientations 52 | 53 | UIInterfaceOrientationPortrait 54 | UIInterfaceOrientationLandscapeLeft 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '11.0' 2 | use_frameworks! 3 | 4 | target 'Blockstack_Example' do 5 | pod 'Blockstack', :path => '../' 6 | end 7 | 8 | target 'Blockstack_Tests' do 9 | inherit! :search_paths 10 | 11 | pod 'Blockstack', :path => '../' 12 | pod 'Quick' 13 | pod 'Nimble' 14 | end 15 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Blockstack (1.0.2): 3 | - CryptoSwift (= 0.15.0) 4 | - PromisesSwift 5 | - STRegex 6 | - CryptoSwift (0.15.0) 7 | - Nimble (8.0.4) 8 | - PromisesObjC (1.2.8) 9 | - PromisesSwift (1.2.8): 10 | - PromisesObjC (= 1.2.8) 11 | - Quick (2.2.0) 12 | - STRegex (2.1.0) 13 | 14 | DEPENDENCIES: 15 | - Blockstack (from `../`) 16 | - Nimble 17 | - Quick 18 | 19 | SPEC REPOS: 20 | https://github.com/cocoapods/specs.git: 21 | - CryptoSwift 22 | - Nimble 23 | - PromisesObjC 24 | - PromisesSwift 25 | - Quick 26 | - STRegex 27 | 28 | EXTERNAL SOURCES: 29 | Blockstack: 30 | :path: "../" 31 | 32 | SPEC CHECKSUMS: 33 | Blockstack: 92afca677f95b9e14cfa391a335d148fa566ca1c 34 | CryptoSwift: 769f58a9e89f64e8796c2e59ce5f002dc81a2438 35 | Nimble: 18d5360282923225d62b09d781f63abc1a0111fc 36 | PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6 37 | PromisesSwift: 37bad6f4daddb02f7c9c531efe91e8b21c13ee2f 38 | Quick: 7fb19e13be07b5dfb3b90d4f9824c855a11af40e 39 | STRegex: dfa420d93d8c1402956233b3879ec1fc14b45fbe 40 | 41 | PODFILE CHECKSUM: 1d2d7656aa128511a226291cbed4b48588571614 42 | 43 | COCOAPODS: 1.6.1 44 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014-2017 Marcin Krzyżanowski 2 | This software is provided 'as-is', without any express or implied warranty. 3 | 4 | In no event will the authors be held liable for any damages arising from the use of this software. 5 | 6 | Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 7 | 8 | - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 9 | - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 10 | - This notice may not be removed or altered from any source or binary distribution. 11 | - Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AEAD.swift 3 | // CryptoSwift 4 | // 5 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 11 | // 12 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 13 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 14 | // - This notice may not be removed or altered from any source or binary distribution. 15 | // 16 | // 17 | 18 | // https://www.iana.org/assignments/aead-parameters/aead-parameters.xhtml 19 | 20 | /// Authenticated Encryption with Associated Data (AEAD) 21 | public protocol AEAD { 22 | static var kLen: Int { get } // key length 23 | static var ivRange: Range { get } // nonce length 24 | } 25 | 26 | extension AEAD { 27 | static func calculateAuthenticationTag(authenticator: Authenticator, cipherText: Array, authenticationHeader: Array) throws -> Array { 28 | let headerPadding = ((16 - (authenticationHeader.count & 0xf)) & 0xf) 29 | let cipherPadding = ((16 - (cipherText.count & 0xf)) & 0xf) 30 | 31 | var mac = authenticationHeader 32 | mac += Array(repeating: 0, count: headerPadding) 33 | mac += cipherText 34 | mac += Array(repeating: 0, count: cipherPadding) 35 | mac += UInt64(bigEndian: UInt64(authenticationHeader.count)).bytes() 36 | mac += UInt64(bigEndian: UInt64(cipherText.count)).bytes() 37 | 38 | return try authenticator.authenticate(mac) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | // MARK: Cryptors 17 | 18 | extension AES: Cryptors { 19 | public func makeEncryptor() throws -> Cryptor & Updatable { 20 | let worker = try blockMode.worker(blockSize: AES.blockSize, cipherOperation: encrypt) 21 | if worker is StreamModeWorker { 22 | return try StreamEncryptor(blockSize: AES.blockSize, padding: padding, worker) 23 | } 24 | return try BlockEncryptor(blockSize: AES.blockSize, padding: padding, worker) 25 | } 26 | 27 | public func makeDecryptor() throws -> Cryptor & Updatable { 28 | let cipherOperation: CipherOperationOnBlock = blockMode.options.contains(.useEncryptToDecrypt) == true ? encrypt : decrypt 29 | let worker = try blockMode.worker(blockSize: AES.blockSize, cipherOperation: cipherOperation) 30 | if worker is StreamModeWorker { 31 | return try StreamDecryptor(blockSize: AES.blockSize, padding: padding, worker) 32 | } 33 | return try BlockDecryptor(blockSize: AES.blockSize, padding: padding, worker) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | /// Message authentication code. 17 | public protocol Authenticator { 18 | /// Calculate Message Authentication Code (MAC) for message. 19 | func authenticate(_ bytes: Array) throws -> Array 20 | } 21 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | public enum Bit: Int { 17 | case zero 18 | case one 19 | } 20 | 21 | extension Bit { 22 | func inverted() -> Bit { 23 | return self == .zero ? .one : .zero 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | protocol BlockCipher: Cipher { 17 | static var blockSize: Int { get } 18 | } 19 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | public typealias CipherOperationOnBlock = (_ block: ArraySlice) -> Array? 17 | 18 | public protocol BlockMode { 19 | var options: BlockModeOption { get } 20 | //TODO: doesn't have to be public 21 | func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker 22 | } 23 | 24 | typealias StreamMode = BlockMode 25 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | public struct BlockModeOption: OptionSet { 17 | public let rawValue: Int 18 | 19 | public init(rawValue: Int) { 20 | self.rawValue = rawValue 21 | } 22 | 23 | static let none = BlockModeOption(rawValue: 1 << 0) 24 | static let initializationVectorRequired = BlockModeOption(rawValue: 1 << 1) 25 | static let paddingRequired = BlockModeOption(rawValue: 1 << 2) 26 | static let useEncryptToDecrypt = BlockModeOption(rawValue: 1 << 3) 27 | } 28 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/CMAC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | public final class CMAC: CBCMAC { 17 | override func process(lastBlock: ArraySlice, with x: [UInt8]) -> [UInt8] { 18 | return xor(lastBlock, x) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | public enum CipherError: Error { 17 | case encrypt 18 | case decrypt 19 | } 20 | 21 | public protocol Cipher: class { 22 | var keySize: Int { get } 23 | 24 | /// Encrypt given bytes at once 25 | /// 26 | /// - parameter bytes: Plaintext data 27 | /// - returns: Encrypted data 28 | func encrypt(_ bytes: ArraySlice) throws -> Array 29 | func encrypt(_ bytes: Array) throws -> Array 30 | 31 | /// Decrypt given bytes at once 32 | /// 33 | /// - parameter bytes: Ciphertext data 34 | /// - returns: Plaintext data 35 | func decrypt(_ bytes: ArraySlice) throws -> Array 36 | func decrypt(_ bytes: Array) throws -> Array 37 | } 38 | 39 | extension Cipher { 40 | public func encrypt(_ bytes: Array) throws -> Array { 41 | return try encrypt(bytes.slice) 42 | } 43 | 44 | public func decrypt(_ bytes: Array) throws -> Array { 45 | return try decrypt(bytes.slice) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | extension Collection where Self.Element == UInt8, Self.Index == Int { 16 | // Big endian order 17 | func toUInt32Array() -> Array { 18 | if isEmpty { 19 | return [] 20 | } 21 | 22 | var result = Array(reserveCapacity: 16) 23 | for idx in stride(from: startIndex, to: endIndex, by: 4) { 24 | let val = UInt32(bytes: self, fromIndex: idx).bigEndian 25 | result.append(val) 26 | } 27 | 28 | return result 29 | } 30 | 31 | // Big endian order 32 | func toUInt64Array() -> Array { 33 | if isEmpty { 34 | return [] 35 | } 36 | 37 | var result = Array(reserveCapacity: 32) 38 | for idx in stride(from: startIndex, to: endIndex, by: 8) { 39 | let val = UInt64(bytes: self, fromIndex: idx).bigEndian 40 | result.append(val) 41 | } 42 | 43 | return result 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift: -------------------------------------------------------------------------------- 1 | //// CryptoSwift 2 | // 3 | // Copyright (C) 2014-2018 Marcin Krzyżanowski 4 | // This software is provided 'as-is', without any express or implied warranty. 5 | // 6 | // In no event will the authors be held liable for any damages arising from the use of this software. 7 | // 8 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 9 | // 10 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 11 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 12 | // - This notice may not be removed or altered from any source or binary distribution. 13 | // 14 | 15 | #if swift(>=4.1) 16 | // TODO: remove this file when Xcode 9.2 is no longer used 17 | #else 18 | extension Sequence { 19 | public func compactMap(_ transform: (Element) throws -> ElementOfResult?) rethrows -> [ElementOfResult] { 20 | return try flatMap(transform) 21 | } 22 | } 23 | #endif 24 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | /// Cryptor (Encryptor or Decryptor) 17 | public protocol Cryptor { 18 | /// Seek to position in file, if block mode allows random access. 19 | /// 20 | /// - parameter to: new value of counter 21 | mutating func seek(to: Int) throws 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | #if canImport(Darwin) 17 | import Darwin 18 | #else 19 | import Glibc 20 | #endif 21 | 22 | /// Worker cryptor/decryptor of `Updatable` types 23 | public protocol Cryptors: class { 24 | 25 | /// Cryptor suitable for encryption 26 | func makeEncryptor() throws -> Cryptor & Updatable 27 | 28 | /// Cryptor suitable for decryption 29 | func makeDecryptor() throws -> Cryptor & Updatable 30 | 31 | /// Generate array of random bytes. Helper function. 32 | static func randomIV(_ blockSize: Int) -> Array 33 | } 34 | 35 | extension Cryptors { 36 | public static func randomIV(_ blockSize: Int) -> Array { 37 | var randomIV: Array = Array() 38 | randomIV.reserveCapacity(blockSize) 39 | for randomByte in RandomBytesSequence(size: blockSize) { 40 | randomIV.append(randomByte) 41 | } 42 | return randomIV 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | internal protocol DigestType { 17 | func calculate(for bytes: Array) -> Array 18 | } 19 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | import Foundation 17 | 18 | extension AES { 19 | /// Initialize with CBC block mode. 20 | public convenience init(key: String, iv: String, padding: Padding = .pkcs7) throws { 21 | try self.init(key: key.bytes, blockMode: CBC(iv: iv.bytes), padding: padding) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | import Foundation 17 | 18 | public extension Array where Element == UInt8 { 19 | func toBase64() -> String? { 20 | return Data( self).base64EncodedString() 21 | } 22 | 23 | init(base64: String) { 24 | self.init() 25 | 26 | guard let decodedData = Data(base64Encoded: base64) else { 27 | return 28 | } 29 | 30 | append(contentsOf: decodedData.bytes) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | import Foundation 17 | 18 | extension Blowfish { 19 | /// Initialize with CBC block mode. 20 | public convenience init(key: String, iv: String, padding: Padding = .pkcs7) throws { 21 | try self.init(key: key.bytes, blockMode: CBC(iv: iv.bytes), padding: padding) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | import Foundation 17 | 18 | extension ChaCha20 { 19 | public convenience init(key: String, iv: String) throws { 20 | try self.init(key: key.bytes, iv: iv.bytes) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | import Foundation 17 | 18 | extension HMAC { 19 | public convenience init(key: String, variant: HMAC.Variant = .md5) throws { 20 | self.init(key: key.bytes, variant: variant) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | import Foundation 17 | 18 | extension Rabbit { 19 | public convenience init(key: String) throws { 20 | try self.init(key: key.bytes) 21 | } 22 | 23 | public convenience init(key: String, iv: String) throws { 24 | try self.init(key: key.bytes, iv: iv.bytes) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | import Foundation 17 | 18 | extension String { 19 | /// Return Base64 back to String 20 | public func decryptBase64ToString(cipher: Cipher) throws -> String { 21 | guard let decodedData = Data(base64Encoded: self, options: []) else { 22 | throw CipherError.decrypt 23 | } 24 | 25 | let decrypted = try decodedData.decrypt(cipher: cipher) 26 | 27 | if let decryptedString = String(data: decrypted, encoding: String.Encoding.utf8) { 28 | return decryptedString 29 | } 30 | 31 | throw CipherError.decrypt 32 | } 33 | 34 | public func decryptBase64(cipher: Cipher) throws -> Array { 35 | guard let decodedData = Data(base64Encoded: self, options: []) else { 36 | throw CipherError.decrypt 37 | } 38 | 39 | return try decodedData.decrypt(cipher: cipher).bytes 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | import Foundation 17 | 18 | func perf(_ text: String, closure: () -> Void) { 19 | let measurementStart = Date() 20 | 21 | closure() 22 | 23 | let measurementStop = Date() 24 | let executionTime = measurementStop.timeIntervalSince(measurementStart) 25 | 26 | print("\(text) \(executionTime)") 27 | } 28 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Created by Marcin Krzyzanowski on 12/08/14. 5 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 11 | // 12 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 13 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 14 | // - This notice may not be removed or altered from any source or binary distribution. 15 | // 16 | 17 | #if canImport(Darwin) 18 | import Darwin 19 | #else 20 | import Glibc 21 | #endif 22 | 23 | /* array of bits */ 24 | extension Int { 25 | init(bits: [Bit]) { 26 | self.init(bitPattern: integerFrom(bits) as UInt) 27 | } 28 | } 29 | 30 | extension FixedWidthInteger { 31 | @_transparent 32 | func bytes(totalBytes: Int = MemoryLayout.size) -> Array { 33 | return arrayOfBytes(value: self.littleEndian, length: totalBytes) 34 | // TODO: adjust bytes order 35 | // var value = self.littleEndian 36 | // return withUnsafeBytes(of: &value, Array.init).reversed() 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | struct NoPadding: PaddingProtocol { 17 | init() { 18 | } 19 | 20 | func add(to data: Array, blockSize _: Int) -> Array { 21 | return data 22 | } 23 | 24 | func remove(from data: Array, blockSize _: Int?) -> Array { 25 | return data 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | /* 17 | Bit shifting with overflow protection using overflow operator "&". 18 | Approach is consistent with standard overflow operators &+, &-, &*, &/ 19 | and introduce new overflow operators for shifting: &<<, &>> 20 | 21 | Note: Works with unsigned integers values only 22 | 23 | Usage 24 | 25 | var i = 1 // init 26 | var j = i &<< 2 //shift left 27 | j &<<= 2 //shift left and assign 28 | 29 | @see: https://medium.com/@krzyzanowskim/swiftly-shift-bits-and-protect-yourself-be33016ce071 30 | 31 | This fuctonality is now implemented as part of Swift 3, SE-0104 https://github.com/apple/swift-evolution/blob/master/proposals/0104-improved-integers.md 32 | */ 33 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS5.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | // PKCS is a group of public-key cryptography standards devised 17 | // and published by RSA Security Inc, starting in the early 1990s. 18 | // 19 | 20 | public enum PKCS5 { 21 | typealias Padding = PKCS7Padding 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | public enum PKCS7 { 17 | typealias Padding = PKCS7Padding 18 | } 19 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/RandomBytesSequence.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | #if canImport(Darwin) 17 | import Darwin 18 | #else 19 | import Glibc 20 | #endif 21 | 22 | struct RandomBytesSequence: Sequence { 23 | let size: Int 24 | 25 | func makeIterator() -> AnyIterator { 26 | var count = 0 27 | return AnyIterator.init { () -> UInt8? in 28 | guard count < self.size else { 29 | return nil 30 | } 31 | count = count + 1 32 | 33 | #if os(Linux) || os(Android) || os(FreeBSD) 34 | let fd = open("/dev/urandom", O_RDONLY) 35 | if fd <= 0 { 36 | return nil 37 | } 38 | 39 | var value: UInt8 = 0 40 | let result = read(fd, &value, MemoryLayout.size) 41 | precondition(result == 1) 42 | 43 | close(fd) 44 | return value 45 | #else 46 | return UInt8(arc4random_uniform(UInt32(UInt8.max) + 1)) 47 | #endif 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | /** array of bytes */ 17 | extension UInt16 { 18 | @_specialize(exported: true, where T == ArraySlice) 19 | init(bytes: T) where T.Element == UInt8, T.Index == Int { 20 | self = UInt16(bytes: bytes, fromIndex: bytes.startIndex) 21 | } 22 | 23 | @_specialize(exported: true, where T == ArraySlice) 24 | init(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int { 25 | if bytes.isEmpty { 26 | self = 0 27 | return 28 | } 29 | 30 | let count = bytes.count 31 | 32 | let val0 = count > 0 ? UInt16(bytes[index.advanced(by: 0)]) << 8 : 0 33 | let val1 = count > 1 ? UInt16(bytes[index.advanced(by: 1)]) : 0 34 | 35 | self = val0 | val1 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CryptoSwift 3 | // 4 | // Copyright (C) 2014-2017 Marcin Krzyżanowski 5 | // This software is provided 'as-is', without any express or implied warranty. 6 | // 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 10 | // 11 | // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. 12 | // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | // - This notice may not be removed or altered from any source or binary distribution. 14 | // 15 | 16 | /// All the bytes that are required to be padded are padded with zero. 17 | /// Zero padding may not be reversible if the original file ends with one or more zero bytes. 18 | struct ZeroPadding: PaddingProtocol { 19 | init() { 20 | } 21 | 22 | func add(to bytes: Array, blockSize: Int) -> Array { 23 | let paddingCount = blockSize - (bytes.count % blockSize) 24 | if paddingCount > 0 { 25 | return bytes + Array(repeating: 0, count: paddingCount) 26 | } 27 | return bytes 28 | } 29 | 30 | func remove(from bytes: Array, blockSize _: Int?) -> Array { 31 | for (idx, value) in bytes.reversed().enumerated() { 32 | if value != 0 { 33 | return Array(bytes[0..(_ type: T.Type, block: @escaping () -> Void) -> T? { 28 | return catchExceptionOfKind(type, block) as? T 29 | } 30 | 31 | extension NSException { 32 | public static func catchException(in block: @escaping () -> Void) -> Self? { 33 | return catchReturnTypeConverter(self, block: block) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m: -------------------------------------------------------------------------------- 1 | // 2 | // CwlCatchException.m 3 | // CwlAssertionTesting 4 | // 5 | // Created by Matt Gallagher on 2016/01/10. 6 | // Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. 7 | // 8 | // Permission to use, copy, modify, and/or distribute this software for any 9 | // purpose with or without fee is hereby granted, provided that the above 10 | // copyright notice and this permission notice appear in all copies. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 15 | // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 18 | // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 | // 20 | 21 | #import "CwlCatchException.h" 22 | 23 | NSException* __nullable catchExceptionOfKind(Class __nonnull type, void (^ __nonnull inBlock)(void)) { 24 | @try { 25 | inBlock(); 26 | } @catch (NSException *exception) { 27 | if ([exception isKindOfClass:type]) { 28 | return exception; 29 | } else { 30 | @throw; 31 | } 32 | } 33 | return nil; 34 | } 35 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h: -------------------------------------------------------------------------------- 1 | // 2 | // CwlCatchException.h 3 | // CwlCatchException 4 | // 5 | // Created by Matt Gallagher on 2016/01/10. 6 | // Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. 7 | // 8 | // Permission to use, copy, modify, and/or distribute this software for any 9 | // purpose with or without fee is hereby granted, provided that the above 10 | // copyright notice and this permission notice appear in all copies. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 15 | // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 18 | // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 | // 20 | 21 | #import 22 | 23 | //! Project version number for CwlCatchException. 24 | FOUNDATION_EXPORT double CwlCatchExceptionVersionNumber; 25 | 26 | //! Project version string for CwlCatchException. 27 | FOUNDATION_EXPORT const unsigned char CwlCatchExceptionVersionString[]; 28 | 29 | NSException* __nullable catchExceptionOfKind(Class __nonnull type, void (^ __nonnull inBlock)(void)); 30 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/include/CwlPreconditionTesting.h: -------------------------------------------------------------------------------- 1 | // 2 | // CwlPreconditionTesting.h 3 | // CwlPreconditionTesting 4 | // 5 | // Created by Matt Gallagher on 2016/01/10. 6 | // Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. 7 | // 8 | // Permission to use, copy, modify, and/or distribute this software for any 9 | // purpose with or without fee is hereby granted, provided that the above 10 | // copyright notice and this permission notice appear in all copies. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 15 | // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 18 | // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 | // 20 | 21 | #import 22 | 23 | //! Project version number for CwlUtils. 24 | FOUNDATION_EXPORT double CwlPreconditionTestingVersionNumber; 25 | 26 | //! Project version string for CwlUtils. 27 | FOUNDATION_EXPORT const unsigned char CwlAssertingTestingVersionString[]; 28 | 29 | #import "CwlMachBadInstructionHandler.h" 30 | 31 | #if TARGET_OS_OSX || TARGET_OS_IOS 32 | #import "CwlCatchException.h" 33 | #elif !TARGET_OS_TV 34 | #error Unsupported platform. 35 | #endif 36 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Protocol for the assertion handler that Nimble uses for all expectations. 4 | public protocol AssertionHandler { 5 | func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) 6 | } 7 | 8 | /// Global backing interface for assertions that Nimble creates. 9 | /// Defaults to a private test handler that passes through to XCTest. 10 | /// 11 | /// If XCTest is not available, you must assign your own assertion handler 12 | /// before using any matchers, otherwise Nimble will abort the program. 13 | /// 14 | /// @see AssertionHandler 15 | public var NimbleAssertionHandler: AssertionHandler = { () -> AssertionHandler in 16 | // swiftlint:disable:previous identifier_name 17 | return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler() 18 | }() 19 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift: -------------------------------------------------------------------------------- 1 | /// AssertionDispatcher allows multiple AssertionHandlers to receive 2 | /// assertion messages. 3 | /// 4 | /// @warning Does not fully dispatch if one of the handlers raises an exception. 5 | /// This is possible with XCTest-based assertion handlers. 6 | /// 7 | public class AssertionDispatcher: AssertionHandler { 8 | let handlers: [AssertionHandler] 9 | 10 | public init(handlers: [AssertionHandler]) { 11 | self.handlers = handlers 12 | } 13 | 14 | public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { 15 | for handler in handlers { 16 | handler.assert(assertion, message: message, location: location) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift: -------------------------------------------------------------------------------- 1 | import Dispatch 2 | import Foundation 3 | 4 | /// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this 5 | /// class' existence 6 | internal class NimbleEnvironment: NSObject { 7 | static var activeInstance: NimbleEnvironment { 8 | get { 9 | let env = Thread.current.threadDictionary["NimbleEnvironment"] 10 | if let env = env as? NimbleEnvironment { 11 | return env 12 | } else { 13 | let newEnv = NimbleEnvironment() 14 | self.activeInstance = newEnv 15 | return newEnv 16 | } 17 | } 18 | set { 19 | Thread.current.threadDictionary["NimbleEnvironment"] = newValue 20 | } 21 | } 22 | 23 | // swiftlint:disable:next todo 24 | // TODO: eventually migrate the global to this environment value 25 | var assertionHandler: AssertionHandler { 26 | get { return NimbleAssertionHandler } 27 | set { NimbleAssertionHandler = newValue } 28 | } 29 | 30 | var suppressTVOSAssertionWarning: Bool = false 31 | var awaiter: Awaiter 32 | 33 | override init() { 34 | let timeoutQueue = DispatchQueue.global(qos: .userInitiated) 35 | awaiter = Awaiter( 36 | waitLock: AssertionWaitLock(), 37 | asyncQueue: .main, 38 | timeoutQueue: timeoutQueue 39 | ) 40 | 41 | super.init() 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is greater than the expected value. 4 | public func beGreaterThan(_ expectedValue: T?) -> Predicate { 5 | let errorMessage = "be greater than <\(stringify(expectedValue))>" 6 | return Predicate.simple(errorMessage) { actualExpression in 7 | if let actual = try actualExpression.evaluate(), let expected = expectedValue { 8 | return PredicateStatus(bool: actual > expected) 9 | } 10 | return .fail 11 | } 12 | } 13 | 14 | public func >(lhs: Expectation, rhs: T) { 15 | lhs.to(beGreaterThan(rhs)) 16 | } 17 | 18 | #if canImport(Darwin) || !compiler(>=5.1) 19 | /// A Nimble matcher that succeeds when the actual value is greater than the expected value. 20 | public func beGreaterThan(_ expectedValue: NMBComparable?) -> Predicate { 21 | let errorMessage = "be greater than <\(stringify(expectedValue))>" 22 | return Predicate.simple(errorMessage) { actualExpression in 23 | let actualValue = try actualExpression.evaluate() 24 | let matches = actualValue != nil 25 | && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending 26 | return PredicateStatus(bool: matches) 27 | } 28 | } 29 | 30 | public func > (lhs: Expectation, rhs: NMBComparable?) { 31 | lhs.to(beGreaterThan(rhs)) 32 | } 33 | #endif 34 | 35 | #if canImport(Darwin) 36 | extension NMBObjCMatcher { 37 | @objc public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBMatcher { 38 | return NMBPredicate { actualExpression in 39 | let expr = actualExpression.cast { $0 as? NMBComparable } 40 | return try beGreaterThan(expected).satisfies(expr).toObjectiveC() 41 | } 42 | } 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is greater than 4 | /// or equal to the expected value. 5 | public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { 6 | let message = "be greater than or equal to <\(stringify(expectedValue))>" 7 | return Predicate.simple(message) { actualExpression in 8 | let actualValue = try actualExpression.evaluate() 9 | if let actual = actualValue, let expected = expectedValue { 10 | return PredicateStatus(bool: actual >= expected) 11 | } 12 | return .fail 13 | } 14 | } 15 | 16 | public func >=(lhs: Expectation, rhs: T) { 17 | lhs.to(beGreaterThanOrEqualTo(rhs)) 18 | } 19 | 20 | #if canImport(Darwin) || !compiler(>=5.1) 21 | /// A Nimble matcher that succeeds when the actual value is greater than 22 | /// or equal to the expected value. 23 | public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { 24 | let message = "be greater than or equal to <\(stringify(expectedValue))>" 25 | return Predicate.simple(message) { actualExpression in 26 | let actualValue = try actualExpression.evaluate() 27 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedAscending 28 | return PredicateStatus(bool: matches) 29 | } 30 | } 31 | 32 | public func >=(lhs: Expectation, rhs: T) { 33 | lhs.to(beGreaterThanOrEqualTo(rhs)) 34 | } 35 | #endif 36 | 37 | #if canImport(Darwin) 38 | extension NMBObjCMatcher { 39 | @objc public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBMatcher { 40 | return NMBPredicate { actualExpression in 41 | let expr = actualExpression.cast { $0 as? NMBComparable } 42 | return try beGreaterThanOrEqualTo(expected).satisfies(expr).toObjectiveC() 43 | } 44 | } 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is the same instance 4 | /// as the expected instance. 5 | public func beIdenticalTo(_ expected: Any?) -> Predicate { 6 | return Predicate.define { actualExpression in 7 | let actual = try actualExpression.evaluate() as AnyObject? 8 | 9 | let bool = actual === (expected as AnyObject?) && actual !== nil 10 | return PredicateResult( 11 | bool: bool, 12 | message: .expectedCustomValueTo( 13 | "be identical to \(identityAsString(expected))", 14 | "\(identityAsString(actual))" 15 | ) 16 | ) 17 | } 18 | } 19 | 20 | public func === (lhs: Expectation, rhs: Any?) { 21 | lhs.to(beIdenticalTo(rhs)) 22 | } 23 | public func !== (lhs: Expectation, rhs: Any?) { 24 | lhs.toNot(beIdenticalTo(rhs)) 25 | } 26 | 27 | /// A Nimble matcher that succeeds when the actual value is the same instance 28 | /// as the expected instance. 29 | /// 30 | /// Alias for "beIdenticalTo". 31 | public func be(_ expected: Any?) -> Predicate { 32 | return beIdenticalTo(expected) 33 | } 34 | 35 | #if canImport(Darwin) 36 | extension NMBObjCMatcher { 37 | @objc public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBMatcher { 38 | return NMBPredicate { actualExpression in 39 | let aExpr = actualExpression.cast { $0 as Any? } 40 | return try beIdenticalTo(expected).satisfies(aExpr).toObjectiveC() 41 | } 42 | } 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is less than the expected value. 4 | public func beLessThan(_ expectedValue: T?) -> Predicate { 5 | let message = "be less than <\(stringify(expectedValue))>" 6 | return Predicate.simple(message) { actualExpression in 7 | if let actual = try actualExpression.evaluate(), let expected = expectedValue { 8 | return PredicateStatus(bool: actual < expected) 9 | } 10 | return .fail 11 | } 12 | } 13 | 14 | public func <(lhs: Expectation, rhs: T) { 15 | lhs.to(beLessThan(rhs)) 16 | } 17 | 18 | #if canImport(Darwin) || !compiler(>=5.1) 19 | /// A Nimble matcher that succeeds when the actual value is less than the expected value. 20 | public func beLessThan(_ expectedValue: NMBComparable?) -> Predicate { 21 | let message = "be less than <\(stringify(expectedValue))>" 22 | return Predicate.simple(message) { actualExpression in 23 | let actualValue = try actualExpression.evaluate() 24 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedAscending 25 | return PredicateStatus(bool: matches) 26 | } 27 | } 28 | 29 | public func < (lhs: Expectation, rhs: NMBComparable?) { 30 | lhs.to(beLessThan(rhs)) 31 | } 32 | #endif 33 | 34 | #if canImport(Darwin) 35 | extension NMBObjCMatcher { 36 | @objc public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBMatcher { 37 | return NMBPredicate { actualExpression in 38 | let expr = actualExpression.cast { $0 as? NMBComparable } 39 | return try beLessThan(expected).satisfies(expr).toObjectiveC() 40 | } 41 | } 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is less than 4 | /// or equal to the expected value. 5 | public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { 6 | return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in 7 | if let actual = try actualExpression.evaluate(), let expected = expectedValue { 8 | return PredicateStatus(bool: actual <= expected) 9 | } 10 | return .fail 11 | } 12 | } 13 | 14 | public func <=(lhs: Expectation, rhs: T) { 15 | lhs.to(beLessThanOrEqualTo(rhs)) 16 | } 17 | 18 | #if canImport(Darwin) || !compiler(>=5.1) 19 | /// A Nimble matcher that succeeds when the actual value is less than 20 | /// or equal to the expected value. 21 | public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { 22 | return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in 23 | let actualValue = try actualExpression.evaluate() 24 | let matches = actualValue.map { $0.NMB_compare(expectedValue) != .orderedDescending } ?? false 25 | return PredicateStatus(bool: matches) 26 | } 27 | } 28 | 29 | public func <=(lhs: Expectation, rhs: T) { 30 | lhs.to(beLessThanOrEqualTo(rhs)) 31 | } 32 | #endif 33 | 34 | #if canImport(Darwin) 35 | extension NMBObjCMatcher { 36 | @objc public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBMatcher { 37 | return NMBPredicate { actualExpression in 38 | let expr = actualExpression.cast { $0 as? NMBComparable } 39 | return try beLessThanOrEqualTo(expected).satisfies(expr).toObjectiveC() 40 | } 41 | } 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is nil. 4 | public func beNil() -> Predicate { 5 | return Predicate.simpleNilable("be nil") { actualExpression in 6 | let actualValue = try actualExpression.evaluate() 7 | return PredicateStatus(bool: actualValue == nil) 8 | } 9 | } 10 | 11 | #if canImport(Darwin) 12 | extension NMBObjCMatcher { 13 | @objc public class func beNilMatcher() -> NMBMatcher { 14 | return NMBPredicate { actualExpression in 15 | return try beNil().satisfies(actualExpression).toObjectiveC() 16 | } 17 | } 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is Void. 4 | public func beVoid() -> Predicate<()> { 5 | return Predicate.simpleNilable("be void") { actualExpression in 6 | let actualValue: ()? = try actualExpression.evaluate() 7 | return PredicateStatus(bool: actualValue != nil) 8 | } 9 | } 10 | 11 | extension Expectation where T == () { 12 | public static func == (lhs: Expectation<()>, rhs: ()) { 13 | lhs.to(beVoid()) 14 | } 15 | 16 | public static func != (lhs: Expectation<()>, rhs: ()) { 17 | lhs.toNot(beVoid()) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift: -------------------------------------------------------------------------------- 1 | /// A Nimble matcher that succeeds when the actual sequence contain the same elements in the same order to the exepected sequence. 2 | public func elementsEqual(_ expectedValue: S?) -> Predicate where S.Element: Equatable { 3 | // A matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2949668-elementsequal 4 | return Predicate.define("elementsEqual <\(stringify(expectedValue))>") { (actualExpression, msg) in 5 | let actualValue = try actualExpression.evaluate() 6 | switch (expectedValue, actualValue) { 7 | case (nil, _?): 8 | return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) 9 | case (nil, nil), (_, nil): 10 | return PredicateResult(status: .fail, message: msg) 11 | case (let expected?, let actual?): 12 | let matches = expected.elementsEqual(actual) 13 | return PredicateResult(bool: matches, message: msg) 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual string satisfies the regular expression 4 | /// described by the expected string. 5 | public func match(_ expectedValue: String?) -> Predicate { 6 | return Predicate.simple("match <\(stringify(expectedValue))>") { actualExpression in 7 | if let actual = try actualExpression.evaluate() { 8 | if let regexp = expectedValue { 9 | let bool = actual.range(of: regexp, options: .regularExpression) != nil 10 | return PredicateStatus(bool: bool) 11 | } 12 | } 13 | 14 | return .fail 15 | } 16 | } 17 | 18 | #if canImport(Darwin) 19 | 20 | extension NMBObjCMatcher { 21 | @objc public class func matchMatcher(_ expected: NSString) -> NMBMatcher { 22 | return NMBPredicate { actualExpression in 23 | let actual = actualExpression.cast { $0 as? String } 24 | return try match(expected.description).satisfies(actual).toObjectiveC() 25 | } 26 | } 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift: -------------------------------------------------------------------------------- 1 | /** 2 | Used by the `toSucceed` matcher. 3 | 4 | This is the return type for the closure. 5 | */ 6 | public enum ToSucceedResult { 7 | case succeeded 8 | case failed(reason: String) 9 | } 10 | 11 | /** 12 | A Nimble matcher that takes in a closure for validation. 13 | 14 | Return `.succeeded` when the validation succeeds. 15 | Return `.failed` with a failure reason when the validation fails. 16 | */ 17 | public func succeed() -> Predicate<() -> ToSucceedResult> { 18 | return Predicate.define { actualExpression in 19 | let optActual = try actualExpression.evaluate() 20 | guard let actual = optActual else { 21 | return PredicateResult(status: .fail, message: .fail("expected a closure, got ")) 22 | } 23 | 24 | switch actual() { 25 | case .succeeded: 26 | return PredicateResult( 27 | bool: true, 28 | message: .expectedCustomValueTo("succeed", "") 29 | ) 30 | case .failed(let reason): 31 | return PredicateResult( 32 | bool: false, 33 | message: .expectedCustomValueTo("succeed", " because <\(reason)>") 34 | ) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Nimble.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NMBExceptionCapture.h" 3 | #import "NMBStringify.h" 4 | #import "DSL.h" 5 | 6 | #import "CwlPreconditionTesting.h" 7 | 8 | FOUNDATION_EXPORT double NimbleVersionNumber; 9 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; 10 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // Generic 4 | 5 | internal func setFailureMessageForError( 6 | _ failureMessage: FailureMessage, 7 | postfixMessageVerb: String = "throw", 8 | actualError: Error?, 9 | error: T? = nil, 10 | errorType: T.Type? = nil, 11 | closure: ((T) -> Void)? = nil) { 12 | failureMessage.postfixMessage = "\(postfixMessageVerb) error" 13 | 14 | if let error = error { 15 | failureMessage.postfixMessage += " <\(error)>" 16 | } else if errorType != nil || closure != nil { 17 | failureMessage.postfixMessage += " from type <\(T.self)>" 18 | } 19 | if closure != nil { 20 | failureMessage.postfixMessage += " that satisfies block" 21 | } 22 | if error == nil && errorType == nil && closure == nil { 23 | failureMessage.postfixMessage = "\(postfixMessageVerb) any error" 24 | } 25 | 26 | if let actualError = actualError { 27 | failureMessage.actualValue = "<\(actualError)>" 28 | } else { 29 | failureMessage.actualValue = "no error" 30 | } 31 | } 32 | 33 | internal func errorMatchesExpectedError( 34 | _ actualError: Error, 35 | expectedError: T) -> Bool { 36 | return actualError._domain == expectedError._domain 37 | && actualError._code == expectedError._code 38 | } 39 | 40 | // Non-generic 41 | 42 | internal func setFailureMessageForError( 43 | _ failureMessage: FailureMessage, 44 | actualError: Error?, 45 | closure: ((Error) -> Void)?) { 46 | failureMessage.postfixMessage = "throw error" 47 | 48 | if closure != nil { 49 | failureMessage.postfixMessage += " that satisfies block" 50 | } else { 51 | failureMessage.postfixMessage = "throw any error" 52 | } 53 | 54 | if let actualError = actualError { 55 | failureMessage.actualValue = "<\(actualError)>" 56 | } else { 57 | failureMessage.actualValue = "no error" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if !swift(>=4.2) 4 | extension Sequence { 5 | internal func allSatisfy(_ predicate: (Element) throws -> Bool) rethrows -> Bool { 6 | for item in self { 7 | if try !predicate(item) { 8 | return false 9 | } 10 | } 11 | return true 12 | } 13 | } 14 | #endif 15 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // Ideally we would always use `StaticString` as the type for tracking the file name 4 | // that expectations originate from, for consistency with `assert` etc. from the 5 | // stdlib, and because recent versions of the XCTest overlay require `StaticString` 6 | // when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we 7 | // have to use `String` instead because StaticString can't be generated from Objective-C 8 | #if SWIFT_PACKAGE 9 | public typealias FileString = StaticString 10 | #else 11 | public typealias FileString = String 12 | #endif 13 | 14 | public final class SourceLocation: NSObject { 15 | public let file: FileString 16 | public let line: UInt 17 | 18 | override init() { 19 | file = "Unknown File" 20 | line = 0 21 | } 22 | 23 | init(file: FileString, line: UInt) { 24 | self.file = file 25 | self.line = line 26 | } 27 | 28 | override public var description: String { 29 | return "\(file):\(line)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface NMBExceptionCapture : NSObject 5 | 6 | - (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally; 7 | - (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); 8 | 9 | @end 10 | 11 | typedef void(^NMBSourceCallbackBlock)(BOOL successful); 12 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m: -------------------------------------------------------------------------------- 1 | #import "NMBExceptionCapture.h" 2 | 3 | @interface NMBExceptionCapture () 4 | @property (nonatomic, copy) void(^ _Nullable handler)(NSException * _Nullable); 5 | @property (nonatomic, copy) void(^ _Nullable finally)(void); 6 | @end 7 | 8 | @implementation NMBExceptionCapture 9 | 10 | - (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally { 11 | self = [super init]; 12 | if (self) { 13 | self.handler = handler; 14 | self.finally = finally; 15 | } 16 | return self; 17 | } 18 | 19 | - (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock { 20 | @try { 21 | unsafeBlock(); 22 | } 23 | @catch (NSException *exception) { 24 | if (self.handler) { 25 | self.handler(exception); 26 | } 27 | } 28 | @finally { 29 | if (self.finally) { 30 | self.finally(); 31 | } 32 | } 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h: -------------------------------------------------------------------------------- 1 | @class NSString; 2 | 3 | /** 4 | * Returns a string appropriate for displaying in test output 5 | * from the provided value. 6 | * 7 | * @param anyObject A value that will show up in a test's output. 8 | * 9 | * @return The string that is returned can be 10 | * customized per type by conforming a type to the `TestOutputStringConvertible` 11 | * protocol. When stringifying a non-`TestOutputStringConvertible` type, this 12 | * function will return the value's debug description and then its 13 | * normal description if available and in that order. Otherwise it 14 | * will return the result of constructing a string from the value. 15 | * 16 | * @see `TestOutputStringConvertible` 17 | */ 18 | extern NSString *_Nonnull NMBStringify(id _Nullable anyObject) __attribute__((warn_unused_result)); 19 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m: -------------------------------------------------------------------------------- 1 | #import "NMBStringify.h" 2 | 3 | #if __has_include("Nimble-Swift.h") 4 | #import "Nimble-Swift.h" 5 | #else 6 | #import 7 | #endif 8 | 9 | NSString *_Nonnull NMBStringify(id _Nullable anyObject) { 10 | return [NMBStringer stringify:anyObject]; 11 | } 12 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/FBLPromise+Always.m: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromise+Always.h" 18 | 19 | #import "FBLPromisePrivate.h" 20 | 21 | @implementation FBLPromise (AlwaysAdditions) 22 | 23 | - (FBLPromise *)always:(FBLPromiseAlwaysWorkBlock)work { 24 | return [self onQueue:FBLPromise.defaultDispatchQueue always:work]; 25 | } 26 | 27 | - (FBLPromise *)onQueue:(dispatch_queue_t)queue always:(FBLPromiseAlwaysWorkBlock)work { 28 | NSParameterAssert(queue); 29 | NSParameterAssert(work); 30 | 31 | return [self chainOnQueue:queue 32 | chainedFulfill:^id(id value) { 33 | work(); 34 | return value; 35 | } 36 | chainedReject:^id(NSError *error) { 37 | work(); 38 | return error; 39 | }]; 40 | } 41 | 42 | @end 43 | 44 | @implementation FBLPromise (DotSyntax_AlwaysAdditions) 45 | 46 | - (FBLPromise * (^)(FBLPromiseAlwaysWorkBlock))always { 47 | return ^(FBLPromiseAlwaysWorkBlock work) { 48 | return [self always:work]; 49 | }; 50 | } 51 | 52 | - (FBLPromise * (^)(dispatch_queue_t, FBLPromiseAlwaysWorkBlock))alwaysOn { 53 | return ^(dispatch_queue_t queue, FBLPromiseAlwaysWorkBlock work) { 54 | return [self onQueue:queue always:work]; 55 | }; 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/FBLPromise+Await.m: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromise+Await.h" 18 | 19 | #import "FBLPromisePrivate.h" 20 | 21 | id __nullable FBLPromiseAwait(FBLPromise *promise, NSError **outError) { 22 | assert(promise); 23 | 24 | static dispatch_once_t onceToken; 25 | static dispatch_queue_t queue; 26 | dispatch_once(&onceToken, ^{ 27 | queue = dispatch_queue_create("com.google.FBLPromises.Await", DISPATCH_QUEUE_CONCURRENT); 28 | }); 29 | dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); 30 | id __block resolution; 31 | NSError __block *blockError; 32 | [promise chainOnQueue:queue 33 | chainedFulfill:^id(id value) { 34 | resolution = value; 35 | dispatch_semaphore_signal(semaphore); 36 | return value; 37 | } 38 | chainedReject:^id(NSError *error) { 39 | blockError = error; 40 | dispatch_semaphore_signal(semaphore); 41 | return error; 42 | }]; 43 | dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); 44 | if (outError) { 45 | *outError = blockError; 46 | } 47 | return resolution; 48 | } 49 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/FBLPromise+Catch.m: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromise+Catch.h" 18 | 19 | #import "FBLPromisePrivate.h" 20 | 21 | @implementation FBLPromise (CatchAdditions) 22 | 23 | - (FBLPromise *)catch:(FBLPromiseCatchWorkBlock)reject { 24 | return [self onQueue:FBLPromise.defaultDispatchQueue catch:reject]; 25 | } 26 | 27 | - (FBLPromise *)onQueue:(dispatch_queue_t)queue catch:(FBLPromiseCatchWorkBlock)reject { 28 | NSParameterAssert(queue); 29 | NSParameterAssert(reject); 30 | 31 | return [self chainOnQueue:queue 32 | chainedFulfill:nil 33 | chainedReject:^id(NSError *error) { 34 | reject(error); 35 | return error; 36 | }]; 37 | } 38 | 39 | @end 40 | 41 | @implementation FBLPromise (DotSyntax_CatchAdditions) 42 | 43 | - (FBLPromise* (^)(FBLPromiseCatchWorkBlock))catch { 44 | return ^(FBLPromiseCatchWorkBlock catch) { 45 | return [self catch:catch]; 46 | }; 47 | } 48 | 49 | - (FBLPromise* (^)(dispatch_queue_t, FBLPromiseCatchWorkBlock))catchOn { 50 | return ^(dispatch_queue_t queue, FBLPromiseCatchWorkBlock catch) { 51 | return [self onQueue:queue catch:catch]; 52 | }; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/FBLPromise+Delay.m: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromise+Delay.h" 18 | 19 | #import "FBLPromisePrivate.h" 20 | 21 | @implementation FBLPromise (DelayAdditions) 22 | 23 | - (FBLPromise *)delay:(NSTimeInterval)interval { 24 | return [self onQueue:FBLPromise.defaultDispatchQueue delay:interval]; 25 | } 26 | 27 | - (FBLPromise *)onQueue:(dispatch_queue_t)queue delay:(NSTimeInterval)interval { 28 | NSParameterAssert(queue); 29 | 30 | FBLPromise *promise = [[FBLPromise alloc] initPending]; 31 | [self observeOnQueue:queue 32 | fulfill:^(id __nullable value) { 33 | dispatch_after(dispatch_time(0, (int64_t)(interval * NSEC_PER_SEC)), queue, ^{ 34 | [promise fulfill:value]; 35 | }); 36 | } 37 | reject:^(NSError *error) { 38 | [promise reject:error]; 39 | }]; 40 | return promise; 41 | } 42 | 43 | @end 44 | 45 | @implementation FBLPromise (DotSyntax_DelayAdditions) 46 | 47 | - (FBLPromise * (^)(NSTimeInterval))delay { 48 | return ^(NSTimeInterval interval) { 49 | return [self delay:interval]; 50 | }; 51 | } 52 | 53 | - (FBLPromise * (^)(dispatch_queue_t, NSTimeInterval))delayOn { 54 | return ^(dispatch_queue_t queue, NSTimeInterval interval) { 55 | return [self onQueue:queue delay:interval]; 56 | }; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/FBLPromise+Do.m: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromise+Do.h" 18 | 19 | #import "FBLPromisePrivate.h" 20 | 21 | @implementation FBLPromise (DoAdditions) 22 | 23 | + (instancetype)do:(FBLPromiseDoWorkBlock)work { 24 | return [self onQueue:self.defaultDispatchQueue do:work]; 25 | } 26 | 27 | + (instancetype)onQueue:(dispatch_queue_t)queue do:(FBLPromiseDoWorkBlock)work { 28 | NSParameterAssert(queue); 29 | NSParameterAssert(work); 30 | 31 | FBLPromise *promise = [[FBLPromise alloc] initPending]; 32 | dispatch_group_async(FBLPromise.dispatchGroup, queue, ^{ 33 | id value = work(); 34 | if ([value isKindOfClass:[FBLPromise class]]) { 35 | [(FBLPromise *)value observeOnQueue:queue 36 | fulfill:^(id __nullable value) { 37 | [promise fulfill:value]; 38 | } 39 | reject:^(NSError *error) { 40 | [promise reject:error]; 41 | }]; 42 | } else { 43 | [promise fulfill:value]; 44 | } 45 | }); 46 | return promise; 47 | } 48 | 49 | @end 50 | 51 | @implementation FBLPromise (DotSyntax_DoAdditions) 52 | 53 | + (FBLPromise* (^)(dispatch_queue_t, FBLPromiseDoWorkBlock))doOn { 54 | return ^(dispatch_queue_t queue, FBLPromiseDoWorkBlock work) { 55 | return [self onQueue:queue do:work]; 56 | }; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/FBLPromise+Recover.m: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromise+Recover.h" 18 | 19 | #import "FBLPromisePrivate.h" 20 | 21 | @implementation FBLPromise (RecoverAdditions) 22 | 23 | - (FBLPromise *)recover:(FBLPromiseRecoverWorkBlock)recovery { 24 | return [self onQueue:FBLPromise.defaultDispatchQueue recover:recovery]; 25 | } 26 | 27 | - (FBLPromise *)onQueue:(dispatch_queue_t)queue recover:(FBLPromiseRecoverWorkBlock)recovery { 28 | NSParameterAssert(queue); 29 | NSParameterAssert(recovery); 30 | 31 | return [self chainOnQueue:queue 32 | chainedFulfill:nil 33 | chainedReject:^id(NSError *error) { 34 | return recovery(error); 35 | }]; 36 | } 37 | 38 | @end 39 | 40 | @implementation FBLPromise (DotSyntax_RecoverAdditions) 41 | 42 | - (FBLPromise * (^)(FBLPromiseRecoverWorkBlock))recover { 43 | return ^(FBLPromiseRecoverWorkBlock recovery) { 44 | return [self recover:recovery]; 45 | }; 46 | } 47 | 48 | - (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRecoverWorkBlock))recoverOn { 49 | return ^(dispatch_queue_t queue, FBLPromiseRecoverWorkBlock recovery) { 50 | return [self onQueue:queue recover:recovery]; 51 | }; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/FBLPromise+Then.m: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromise+Then.h" 18 | 19 | #import "FBLPromisePrivate.h" 20 | 21 | @implementation FBLPromise (ThenAdditions) 22 | 23 | - (FBLPromise *)then:(FBLPromiseThenWorkBlock)work { 24 | return [self onQueue:FBLPromise.defaultDispatchQueue then:work]; 25 | } 26 | 27 | - (FBLPromise *)onQueue:(dispatch_queue_t)queue then:(FBLPromiseThenWorkBlock)work { 28 | NSParameterAssert(queue); 29 | NSParameterAssert(work); 30 | 31 | return [self chainOnQueue:queue chainedFulfill:work chainedReject:nil]; 32 | } 33 | 34 | @end 35 | 36 | @implementation FBLPromise (DotSyntax_ThenAdditions) 37 | 38 | - (FBLPromise* (^)(FBLPromiseThenWorkBlock))then { 39 | return ^(FBLPromiseThenWorkBlock work) { 40 | return [self then:work]; 41 | }; 42 | } 43 | 44 | - (FBLPromise* (^)(dispatch_queue_t, FBLPromiseThenWorkBlock))thenOn { 45 | return ^(dispatch_queue_t queue, FBLPromiseThenWorkBlock work) { 46 | return [self onQueue:queue then:work]; 47 | }; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/FBLPromiseError.m: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromiseError.h" 18 | 19 | NSErrorDomain const FBLPromiseErrorDomain = @"com.google.FBLPromises.Error"; 20 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/include/FBLPromise+Always.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromise.h" 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | @interface FBLPromise(AlwaysAdditions) 22 | 23 | typedef void (^FBLPromiseAlwaysWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); 24 | 25 | /** 26 | @param work A block that always executes, no matter if the receiver is rejected or fulfilled. 27 | @return A new pending promise to be resolved with same resolution as the receiver. 28 | */ 29 | - (FBLPromise *)always:(FBLPromiseAlwaysWorkBlock)work NS_SWIFT_UNAVAILABLE(""); 30 | 31 | /** 32 | @param queue A queue to dispatch on. 33 | @param work A block that always executes, no matter if the receiver is rejected or fulfilled. 34 | @return A new pending promise to be resolved with same resolution as the receiver. 35 | */ 36 | - (FBLPromise *)onQueue:(dispatch_queue_t)queue 37 | always:(FBLPromiseAlwaysWorkBlock)work NS_REFINED_FOR_SWIFT; 38 | 39 | @end 40 | 41 | /** 42 | Convenience dot-syntax wrappers for `FBLPromise` `always` operators. 43 | Usage: promise.always(^{...}) 44 | */ 45 | @interface FBLPromise(DotSyntax_AlwaysAdditions) 46 | 47 | - (FBLPromise* (^)(FBLPromiseAlwaysWorkBlock))always FBL_PROMISES_DOT_SYNTAX 48 | NS_SWIFT_UNAVAILABLE(""); 49 | - (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAlwaysWorkBlock))alwaysOn FBL_PROMISES_DOT_SYNTAX 50 | NS_SWIFT_UNAVAILABLE(""); 51 | 52 | @end 53 | 54 | NS_ASSUME_NONNULL_END 55 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/include/FBLPromise+Await.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromise.h" 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | /** 22 | Waits for promise resolution. The current thread blocks until the promise is resolved. 23 | 24 | @param promise Promise to wait for. 25 | @param error Error the promise was rejected with, or `nil` if the promise was fulfilled. 26 | @return Value the promise was fulfilled with. If the promise was rejected, the return value 27 | is always `nil`, but the error out arg is not. 28 | */ 29 | FOUNDATION_EXTERN id __nullable FBLPromiseAwait(FBLPromise *promise, 30 | NSError **error) NS_REFINED_FOR_SWIFT; 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/include/FBLPromise+Do.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromise.h" 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | @interface FBLPromise(DoAdditions) 22 | 23 | typedef id __nullable (^FBLPromiseDoWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); 24 | 25 | /** 26 | Creates a pending promise and executes `work` block asynchronously. 27 | 28 | @param work A block that returns a value or an error used to resolve the promise. 29 | @return A new pending promise. 30 | */ 31 | + (instancetype)do:(FBLPromiseDoWorkBlock)work NS_SWIFT_UNAVAILABLE(""); 32 | 33 | /** 34 | Creates a pending promise and executes `work` block asynchronously on the given queue. 35 | 36 | @param queue A queue to invoke the `work` block on. 37 | @param work A block that returns a value or an error used to resolve the promise. 38 | @return A new pending promise. 39 | */ 40 | + (instancetype)onQueue:(dispatch_queue_t)queue do:(FBLPromiseDoWorkBlock)work NS_REFINED_FOR_SWIFT; 41 | 42 | @end 43 | 44 | /** 45 | Convenience dot-syntax wrappers for `FBLPromise` `do` operators. 46 | Usage: FBLPromise.doOn(queue, ^(NSError *error) { ... }) 47 | */ 48 | @interface FBLPromise(DotSyntax_DoAdditions) 49 | 50 | + (FBLPromise * (^)(dispatch_queue_t, FBLPromiseDoWorkBlock))doOn FBL_PROMISES_DOT_SYNTAX 51 | NS_SWIFT_UNAVAILABLE(""); 52 | 53 | @end 54 | 55 | NS_ASSUME_NONNULL_END 56 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/include/FBLPromiseError.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | FOUNDATION_EXTERN NSErrorDomain const FBLPromiseErrorDomain NS_REFINED_FOR_SWIFT; 22 | 23 | /** 24 | Possible error codes in `FBLPromiseErrorDomain`. 25 | */ 26 | typedef NS_ENUM(NSInteger, FBLPromiseErrorCode) { 27 | /** Promise failed to resolve in time. */ 28 | FBLPromiseErrorCodeTimedOut = 1, 29 | /** Validation predicate returned false. */ 30 | FBLPromiseErrorCodeValidationFailure = 2, 31 | } NS_REFINED_FOR_SWIFT; 32 | 33 | NS_INLINE BOOL FBLPromiseErrorIsTimedOut(NSError *error) NS_SWIFT_UNAVAILABLE("") { 34 | return error.domain == FBLPromiseErrorDomain && 35 | error.code == FBLPromiseErrorCodeTimedOut; 36 | } 37 | 38 | NS_INLINE BOOL FBLPromiseErrorIsValidationFailure(NSError *error) NS_SWIFT_UNAVAILABLE("") { 39 | return error.domain == FBLPromiseErrorDomain && 40 | error.code == FBLPromiseErrorCodeValidationFailure; 41 | } 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /Example/Pods/PromisesObjC/Sources/FBLPromises/include/FBLPromises.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2018 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import "FBLPromise+All.h" 18 | #import "FBLPromise+Always.h" 19 | #import "FBLPromise+Any.h" 20 | #import "FBLPromise+Async.h" 21 | #import "FBLPromise+Await.h" 22 | #import "FBLPromise+Catch.h" 23 | #import "FBLPromise+Delay.h" 24 | #import "FBLPromise+Do.h" 25 | #import "FBLPromise+Race.h" 26 | #import "FBLPromise+Recover.h" 27 | #import "FBLPromise+Reduce.h" 28 | #import "FBLPromise+Retry.h" 29 | #import "FBLPromise+Then.h" 30 | #import "FBLPromise+Timeout.h" 31 | #import "FBLPromise+Validate.h" 32 | #import "FBLPromise+Wrap.h" 33 | -------------------------------------------------------------------------------- /Example/Pods/PromisesSwift/Sources/Promises/Promise+Always.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import Dispatch 16 | 17 | public extension Promise { 18 | 19 | /// Provides a way to always execute a given chained block. 20 | /// - parameters: 21 | /// - queue: A queue to dispatch on. 22 | /// - work: A block that always executes, no matter if `self` is rejected or fulfilled. 23 | /// - returns: A new pending promise to be resolved with same resolution as `self`. 24 | @discardableResult 25 | func always(on queue: DispatchQueue = .promises, _ work: @escaping () -> Void) -> Promise { 26 | let promise = Promise(objCPromise.__onQueue(queue, always: work)) 27 | // Keep Swift wrapper alive for chained promise until `ObjCPromise` counterpart is resolved. 28 | objCPromise.__pendingObjects?.add(promise) 29 | return promise 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Example/Pods/PromisesSwift/Sources/Promises/Promise+Async.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import Foundation 16 | 17 | public extension Promise { 18 | typealias Async = (@escaping (Value) -> Void, @escaping (Error) -> Void) throws -> Void 19 | 20 | /// Creates a pending promise and executes `work` block asynchronously on the given `queue`. 21 | /// - parameters: 22 | /// - queue: A queue to invoke the `work` block on. 23 | /// - work: A block to perform any operations needed to resolve the promise. 24 | convenience init(on queue: DispatchQueue = .promises, _ work: @escaping Async) { 25 | let objCPromise = ObjCPromise.__onQueue(queue) { fulfill, reject in 26 | do { 27 | try work({ value in 28 | if let error = value as? NSError { 29 | reject(error) 30 | } else { 31 | fulfill(Promise.asAnyObject(value)) 32 | } 33 | }, reject) 34 | } catch let error { 35 | reject(error as NSError) 36 | } 37 | } 38 | self.init(objCPromise) 39 | // Keep Swift wrapper alive for chained promise until `ObjCPromise` counterpart is resolved. 40 | objCPromise.__pendingObjects?.add(self) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Example/Pods/PromisesSwift/Sources/Promises/Promise+Await.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import FBLPromises 16 | 17 | /// Waits for promise resolution. The current thread blocks until the promise is resolved. 18 | /// - parameters: 19 | /// - promise: Promise to wait for. 20 | /// - throws: Error the promise was rejected with. 21 | /// - returns: Value the promise was fulfilled with. 22 | public func await(_ promise: Promise) throws -> Value { 23 | var outError: NSError? 24 | let outValue = __FBLPromiseAwait(promise.objCPromise, &outError) as AnyObject 25 | if let error = outError { throw error } 26 | guard let value = Promise.asValue(outValue) else { preconditionFailure() } 27 | return value 28 | } 29 | -------------------------------------------------------------------------------- /Example/Pods/PromisesSwift/Sources/Promises/Promise+Catch.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import Foundation 16 | 17 | public extension Promise { 18 | typealias Catch = (Error) -> Void 19 | 20 | /// Creates a pending promise which eventually gets resolved with same resolution as `self`. 21 | /// If `self` is rejected, then `reject` block is executed asynchronously on the given queue. 22 | /// - parameters: 23 | /// - queue: A queue to invoke the `reject` block on. 24 | /// - reject: A block to handle the error that `self` was rejected with. 25 | /// - returns: A new pending promise. 26 | @discardableResult 27 | func `catch`(on queue: DispatchQueue = .promises, _ reject: @escaping Catch) -> Promise { 28 | let promise = Promise(objCPromise.__onQueue(queue, catch: { 29 | // Convert `NSError` to `PromiseError`, if applicable. 30 | let error = PromiseError($0) ?? $0 31 | return reject(error as NSError) 32 | })) 33 | // Keep Swift wrapper alive for chained promise until `ObjCPromise` counterpart is resolved. 34 | objCPromise.__pendingObjects?.add(promise) 35 | return promise 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/PromisesSwift/Sources/Promises/Promise+Delay.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import Foundation 16 | 17 | public extension Promise { 18 | 19 | /// Creates a new pending promise that fulfills with the same value as `self` after the `delay`, 20 | /// or rejects with the same error immediately. 21 | /// - parameters: 22 | /// - queue: A queue to dispatch on. 23 | /// - interval: Time to wait in seconds. 24 | /// - returns: A new pending promise that fulfills at least `interval` seconds later than `self`, 25 | /// or rejects with the same error immediately. 26 | func delay( 27 | on queue: DispatchQueue = .promises, 28 | _ interval: TimeInterval 29 | ) -> Promise { 30 | let promise = Promise(objCPromise.__onQueue(queue, delay: interval)) 31 | // Keep Swift wrapper alive for chained promise until `ObjCPromise` counterpart is resolved. 32 | objCPromise.__pendingObjects?.add(promise) 33 | return promise 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Example/Pods/PromisesSwift/Sources/Promises/Promise+Testing.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import FBLPromises 16 | 17 | extension DispatchGroup { 18 | /// Dispatch group for promises that is typically used to wait for all scheduled blocks. 19 | static var promises: DispatchGroup { return Promise.ObjCPromise.__dispatchGroup } 20 | } 21 | 22 | /// Waits for all scheduled promise blocks. 23 | /// - parameter timeout: Maximum time to wait. 24 | /// - returns: `true` if all promise blocks have completed before `timeout` and `false` otherwise. 25 | func waitForPromises(timeout: TimeInterval) -> Bool { 26 | return __FBLWaitForPromisesWithTimeout(timeout) 27 | } 28 | -------------------------------------------------------------------------------- /Example/Pods/PromisesSwift/Sources/Promises/Promise+Timeout.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import Foundation 16 | 17 | public extension Promise { 18 | 19 | /// Waits on a promise for a given interval or rejects the promise if it exceeds the time limit. 20 | /// - parameters: 21 | /// - queue: A queue to dispatch on. 22 | /// - interval: Time to wait in seconds. 23 | /// - returns: A new pending promise that gets either resolved with same resolution as `self` or 24 | /// rejected with `PromiseError.timedOut` error. 25 | @discardableResult 26 | func timeout(on queue: DispatchQueue = .promises, _ interval: TimeInterval) -> Promise { 27 | let promise = Promise(objCPromise.__onQueue(queue, timeout: interval)) 28 | // Keep Swift wrapper alive for chained promise until `ObjCPromise` counterpart is resolved. 29 | objCPromise.__pendingObjects?.add(promise) 30 | return promise 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Example/Pods/PromisesSwift/Sources/Promises/Promise+Validate.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import Foundation 16 | 17 | public extension Promise { 18 | 19 | /// Validates a fulfilled value or rejects the value if it can not be validated. 20 | /// - parameters: 21 | /// - queue: A queue to dispatch on. 22 | /// - predicate: An expression to validate. 23 | /// - returns: A new pending promise that gets either resolved with same resolution as `self` or 24 | /// rejected with `PromiseError.validationFailure` error. 25 | @discardableResult 26 | func validate( 27 | on queue: DispatchQueue = .promises, 28 | _ predicate: @escaping (Value) -> Bool 29 | ) -> Promise { 30 | let promise = Promise(objCPromise.__onQueue( 31 | queue, 32 | validate: { objCValue in 33 | guard let value = Promise.asValue(objCValue) else { 34 | preconditionFailure("Cannot cast \(type(of: objCValue)) to \(Value.self)") 35 | } 36 | #if (swift(>=4.1) || (!swift(>=4.0) && swift(>=3.3))) 37 | return predicate(value) 38 | #else 39 | return ObjCBool(predicate(value)) 40 | #endif // (swift(>=4.1) || (!swift(>=4.0) && swift(>=3.3))) 41 | } 42 | )) 43 | // Keep Swift wrapper alive for chained promise until `ObjCPromise` counterpart is resolved. 44 | objCPromise.__pendingObjects?.add(promise) 45 | return promise 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Example/Pods/PromisesSwift/Sources/Promises/PromiseError.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import FBLPromises 16 | 17 | /// Internal errors that `Promise` can throw. 18 | /// Indirectly conforms to `Swift.Error` through conformance to `Swift.CustomNSError` below. 19 | /// Not placing it under extension `Promise` for convenience to avoid collisions with `Swift.Error`. 20 | public enum PromiseError { 21 | case timedOut 22 | case validationFailure 23 | } 24 | 25 | /// Downcasting from `Swift.Error`. 26 | extension PromiseError { 27 | public init?(_ error: Error) { 28 | let error = error as NSError 29 | if error.domain != __FBLPromiseErrorDomain { return nil } 30 | switch error.code { 31 | case __FBLPromiseErrorCode.timedOut.rawValue: 32 | self = .timedOut 33 | case __FBLPromiseErrorCode.validationFailure.rawValue: 34 | self = .validationFailure 35 | default: 36 | return nil 37 | } 38 | } 39 | } 40 | 41 | extension PromiseError: CustomNSError { 42 | public static var errorDomain: String { 43 | return __FBLPromiseErrorDomain 44 | } 45 | 46 | public var errorCode: Int { 47 | switch self { 48 | case .timedOut: 49 | return __FBLPromiseErrorCode.timedOut.rawValue 50 | case .validationFailure: 51 | return __FBLPromiseErrorCode.validationFailure.rawValue 52 | } 53 | } 54 | 55 | public var errorUserInfo: [String: Any] { 56 | return [String: Any]() 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Behavior.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A `Behavior` encapsulates a set of examples that can be re-used in several locations using the `itBehavesLike` function with a context instance of the generic type. 3 | */ 4 | 5 | open class Behavior { 6 | 7 | /** 8 | Override this variable if you want to provide custom name for this example group. 9 | */ 10 | open class var name: String { return String(describing: self) } 11 | 12 | /** 13 | Override this method in your behavior to define a set of reusable examples. 14 | 15 | This behaves just like an example group defines using `describe` or `context`--it may contain any number of `beforeEach` 16 | and `afterEach` closures, as well as any number of examples (defined using `it`). 17 | 18 | - parameter aContext: A closure that, when evaluated, returns a `Context` instance that provide the information on the subject. 19 | */ 20 | open class func spec(_ aContext: @escaping () -> Context) {} 21 | } 22 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Callsite.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if canImport(Darwin) 4 | @objcMembers 5 | public class _CallsiteBase: NSObject {} 6 | #else 7 | public class _CallsiteBase: NSObject {} 8 | #endif 9 | 10 | // Ideally we would always use `StaticString` as the type for tracking the file name 11 | // in which an example is defined, for consistency with `assert` etc. from the 12 | // stdlib, and because recent versions of the XCTest overlay require `StaticString` 13 | // when calling `XCTFail`. Under the Objective-C runtime (i.e. building on macOS), we 14 | // have to use `String` instead because StaticString can't be generated from Objective-C 15 | #if SWIFT_PACKAGE 16 | public typealias FileString = StaticString 17 | #else 18 | public typealias FileString = String 19 | #endif 20 | 21 | /** 22 | An object encapsulating the file and line number at which 23 | a particular example is defined. 24 | */ 25 | final public class Callsite: _CallsiteBase { 26 | /** 27 | The absolute path of the file in which an example is defined. 28 | */ 29 | public let file: FileString 30 | 31 | /** 32 | The line number on which an example is defined. 33 | */ 34 | public let line: UInt 35 | 36 | internal init(file: FileString, line: UInt) { 37 | self.file = file 38 | self.line = line 39 | } 40 | } 41 | 42 | extension Callsite { 43 | /** 44 | Returns a boolean indicating whether two Callsite objects are equal. 45 | If two callsites are in the same file and on the same line, they must be equal. 46 | */ 47 | @nonobjc public static func == (lhs: Callsite, rhs: Callsite) -> Bool { 48 | return String(describing: lhs.file) == String(describing: rhs.file) && lhs.line == rhs.line 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/ErrorUtility.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | internal func raiseError(_ message: String) -> Never { 4 | #if canImport(Darwin) 5 | NSException(name: .internalInconsistencyException, reason: message, userInfo: nil).raise() 6 | #endif 7 | 8 | // This won't be reached when ObjC is available and the exception above is raisd 9 | fatalError(message) 10 | } 11 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if canImport(Darwin) 4 | @objcMembers 5 | public class _ExampleMetadataBase: NSObject {} 6 | #else 7 | public class _ExampleMetadataBase: NSObject {} 8 | #endif 9 | 10 | /** 11 | A class that encapsulates information about an example, 12 | including the index at which the example was executed, as 13 | well as the example itself. 14 | */ 15 | final public class ExampleMetadata: _ExampleMetadataBase { 16 | /** 17 | The example for which this metadata was collected. 18 | */ 19 | public let example: Example 20 | 21 | /** 22 | The index at which this example was executed in the 23 | test suite. 24 | */ 25 | public let exampleIndex: Int 26 | 27 | internal init(example: Example, exampleIndex: Int) { 28 | self.example = example 29 | self.exampleIndex = exampleIndex 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Filter.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if canImport(Darwin) 4 | @objcMembers 5 | public class _FilterBase: NSObject {} 6 | #else 7 | public class _FilterBase: NSObject {} 8 | #endif 9 | 10 | /** 11 | A mapping of string keys to booleans that can be used to 12 | filter examples or example groups. For example, a "focused" 13 | example would have the flags [Focused: true]. 14 | */ 15 | public typealias FilterFlags = [String: Bool] 16 | 17 | /** 18 | A namespace for filter flag keys, defined primarily to make the 19 | keys available in Objective-C. 20 | */ 21 | final public class Filter: _FilterBase { 22 | /** 23 | Example and example groups with [Focused: true] are included in test runs, 24 | excluding all other examples without this flag. Use this to only run one or 25 | two tests that you're currently focusing on. 26 | */ 27 | public class var focused: String { 28 | return "focused" 29 | } 30 | 31 | /** 32 | Example and example groups with [Pending: true] are excluded from test runs. 33 | Use this to temporarily suspend examples that you know do not pass yet. 34 | */ 35 | public class var pending: String { 36 | return "pending" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift: -------------------------------------------------------------------------------- 1 | // MARK: Example Hooks 2 | 3 | /** 4 | A closure executed before an example is run. 5 | */ 6 | public typealias BeforeExampleClosure = () -> Void 7 | 8 | /** 9 | A closure executed before an example is run. The closure is given example metadata, 10 | which contains information about the example that is about to be run. 11 | */ 12 | public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> Void 13 | 14 | /** 15 | A closure executed after an example is run. 16 | */ 17 | public typealias AfterExampleClosure = BeforeExampleClosure 18 | 19 | /** 20 | A closure executed after an example is run. The closure is given example metadata, 21 | which contains information about the example that has just finished running. 22 | */ 23 | public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClosure 24 | 25 | // MARK: Suite Hooks 26 | 27 | /** 28 | A closure executed before any examples are run. 29 | */ 30 | public typealias BeforeSuiteClosure = () -> Void 31 | 32 | /** 33 | A closure executed after all examples have finished running. 34 | */ 35 | public typealias AfterSuiteClosure = BeforeSuiteClosure 36 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A container for closures to be executed before and after each example. 3 | */ 4 | final internal class ExampleHooks { 5 | internal var befores: [BeforeExampleWithMetadataClosure] = [] 6 | internal var afters: [AfterExampleWithMetadataClosure] = [] 7 | internal var phase: HooksPhase = .nothingExecuted 8 | 9 | internal func appendBefore(_ closure: @escaping BeforeExampleWithMetadataClosure) { 10 | befores.append(closure) 11 | } 12 | 13 | internal func appendBefore(_ closure: @escaping BeforeExampleClosure) { 14 | befores.append { (_: ExampleMetadata) in closure() } 15 | } 16 | 17 | internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataClosure) { 18 | afters.append(closure) 19 | } 20 | 21 | internal func appendAfter(_ closure: @escaping AfterExampleClosure) { 22 | afters.append { (_: ExampleMetadata) in closure() } 23 | } 24 | 25 | internal func executeBefores(_ exampleMetadata: ExampleMetadata) { 26 | phase = .beforesExecuting 27 | for before in befores { 28 | before(exampleMetadata) 29 | } 30 | 31 | phase = .beforesFinished 32 | } 33 | 34 | internal func executeAfters(_ exampleMetadata: ExampleMetadata) { 35 | phase = .aftersExecuting 36 | for after in afters { 37 | after(exampleMetadata) 38 | } 39 | 40 | phase = .aftersFinished 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A description of the execution cycle of the current example with 3 | respect to the hooks of that example. 4 | */ 5 | internal enum HooksPhase { 6 | case nothingExecuted 7 | case beforesExecuting 8 | case beforesFinished 9 | case aftersExecuting 10 | case aftersFinished 11 | } 12 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A container for closures to be executed before and after all examples. 3 | */ 4 | final internal class SuiteHooks { 5 | internal var befores: [BeforeSuiteClosure] = [] 6 | internal var afters: [AfterSuiteClosure] = [] 7 | internal var phase: HooksPhase = .nothingExecuted 8 | 9 | internal func appendBefore(_ closure: @escaping BeforeSuiteClosure) { 10 | befores.append(closure) 11 | } 12 | 13 | internal func appendAfter(_ closure: @escaping AfterSuiteClosure) { 14 | afters.append(closure) 15 | } 16 | 17 | internal func executeBefores() { 18 | phase = .beforesExecuting 19 | for before in befores { 20 | before() 21 | } 22 | phase = .beforesFinished 23 | } 24 | 25 | internal func executeAfters() { 26 | phase = .aftersExecuting 27 | for after in afters { 28 | after() 29 | } 30 | phase = .aftersFinished 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift: -------------------------------------------------------------------------------- 1 | #if canImport(Darwin) 2 | 3 | import Foundation 4 | 5 | extension Bundle { 6 | 7 | /** 8 | Locates the first bundle with a '.xctest' file extension. 9 | */ 10 | internal static var currentTestBundle: Bundle? { 11 | return allBundles.first { $0.bundlePath.hasSuffix(".xctest") } 12 | } 13 | 14 | /** 15 | Return the module name of the bundle. 16 | Uses the bundle filename and transform it to match Xcode's transformation. 17 | Module name has to be a valid "C99 extended identifier". 18 | */ 19 | internal var moduleName: String { 20 | let fileName = bundleURL.fileName 21 | return fileName.c99ExtendedIdentifier 22 | } 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/QuickTestSuite.swift: -------------------------------------------------------------------------------- 1 | #if canImport(Darwin) 2 | 3 | import XCTest 4 | 5 | /** 6 | This protocol defines the role of an object that builds test suites. 7 | */ 8 | internal protocol QuickTestSuiteBuilder { 9 | 10 | /** 11 | Construct a `QuickTestSuite` instance with the appropriate test cases added as tests. 12 | 13 | Subsequent calls to this method should return equivalent test suites. 14 | */ 15 | func buildTestSuite() -> QuickTestSuite 16 | 17 | } 18 | 19 | /** 20 | A base class for a class cluster of Quick test suites, that should correctly 21 | build dynamic test suites for XCTest to execute. 22 | */ 23 | public class QuickTestSuite: XCTestSuite { 24 | 25 | private static var builtTestSuites: Set = Set() 26 | 27 | /** 28 | Construct a test suite for a specific, selected subset of test cases (rather 29 | than the default, which as all test cases). 30 | 31 | If this method is called multiple times for the same test case class, e.g.. 32 | 33 | FooSpec/testFoo 34 | FooSpec/testBar 35 | 36 | It is expected that the first call should return a valid test suite, and 37 | all subsequent calls should return `nil`. 38 | */ 39 | @objc 40 | public static func selectedTestSuite(forTestCaseWithName name: String) -> QuickTestSuite? { 41 | guard let builder = QuickSelectedTestSuiteBuilder(forTestCaseWithName: name) else { return nil } 42 | 43 | let (inserted, _) = builtTestSuites.insert(builder.testSuiteClassName) 44 | if inserted { 45 | return builder.buildTestSuite() 46 | } else { 47 | return nil 48 | } 49 | } 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/String+C99ExtendedIdentifier.swift: -------------------------------------------------------------------------------- 1 | #if canImport(Darwin) 2 | import Foundation 3 | 4 | extension String { 5 | private static var invalidCharacters: CharacterSet = { 6 | var invalidCharacters = CharacterSet() 7 | 8 | let invalidCharacterSets: [CharacterSet] = [ 9 | .whitespacesAndNewlines, 10 | .illegalCharacters, 11 | .controlCharacters, 12 | .punctuationCharacters, 13 | .nonBaseCharacters, 14 | .symbols 15 | ] 16 | 17 | for invalidSet in invalidCharacterSets { 18 | invalidCharacters.formUnion(invalidSet) 19 | } 20 | 21 | return invalidCharacters 22 | }() 23 | 24 | internal var c99ExtendedIdentifier: String { 25 | let validComponents = components(separatedBy: String.invalidCharacters) 26 | let result = validComponents.joined(separator: "_") 27 | 28 | return result.isEmpty ? "_" : result 29 | } 30 | } 31 | 32 | /// Extension methods or properties for NSObject subclasses are invisible from 33 | /// the Objective-C runtime on static linking unless the consumers add `-ObjC` 34 | /// linker flag, so let's make a wrapper class to mitigate that situation. 35 | /// 36 | /// See: https://github.com/Quick/Quick/issues/785 and https://github.com/Quick/Quick/pull/803 37 | @objc 38 | class QCKObjCStringUtils: NSObject { 39 | override private init() {} 40 | 41 | @objc 42 | static func c99ExtendedIdentifier(from string: String) -> String { 43 | return string.c99ExtendedIdentifier 44 | } 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/URL+FileName.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension URL { 4 | 5 | /** 6 | Returns the path file name without file extension. 7 | */ 8 | var fileName: String { 9 | return self.deletingPathExtension().lastPathComponent 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Configuration; 4 | 5 | /** 6 | Subclass QuickConfiguration and override the +[QuickConfiguration configure:] 7 | method in order to configure how Quick behaves when running specs, or to define 8 | shared examples that are used across spec files. 9 | */ 10 | @interface QuickConfiguration : NSObject 11 | 12 | /** 13 | This method is executed on each subclass of this class before Quick runs 14 | any examples. You may override this method on as many subclasses as you like, but 15 | there is no guarantee as to the order in which these methods are executed. 16 | 17 | You can override this method in order to: 18 | 19 | 1. Configure how Quick behaves, by modifying properties on the Configuration object. 20 | Setting the same properties in several methods has undefined behavior. 21 | 22 | 2. Define shared examples using `sharedExamples`. 23 | 24 | @param configuration A mutable object that is used to configure how Quick behaves on 25 | a framework level. For details on all the options, see the 26 | documentation in Configuration.swift. 27 | */ 28 | + (void)configure:(Configuration *)configuration; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m: -------------------------------------------------------------------------------- 1 | #import "QuickConfiguration.h" 2 | #import 3 | 4 | #if __has_include("Quick-Swift.h") 5 | #import "Quick-Swift.h" 6 | #else 7 | #import 8 | #endif 9 | 10 | @implementation QuickConfiguration 11 | 12 | #pragma mark - Object Lifecycle 13 | 14 | /** 15 | QuickConfiguration is not meant to be instantiated; it merely provides a hook 16 | for users to configure how Quick behaves. Raise an exception if an instance of 17 | QuickConfiguration is created. 18 | */ 19 | - (instancetype)init { 20 | NSString *className = NSStringFromClass([self class]); 21 | NSString *selectorName = NSStringFromSelector(@selector(configure:)); 22 | [NSException raise:NSInternalInconsistencyException 23 | format:@"%@ is not meant to be instantiated; " 24 | @"subclass %@ and override %@ to configure Quick.", 25 | className, className, selectorName]; 26 | return nil; 27 | } 28 | 29 | #pragma mark - NSObject Overrides 30 | 31 | /** 32 | Hook into when QuickConfiguration is initialized in the runtime in order to 33 | call +[QuickConfiguration configure:] on each of its subclasses. 34 | */ 35 | + (void)initialize { 36 | // Only enumerate over the subclasses of QuickConfiguration, not any of its subclasses. 37 | if ([self class] == [QuickConfiguration class]) { 38 | World *world = [World sharedWorld]; 39 | [self configureSubclassesIfNeededWithWorld:world]; 40 | } 41 | } 42 | 43 | #pragma mark - Public Interface 44 | 45 | + (void)configure:(Configuration *)configuration { } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for Quick. 4 | FOUNDATION_EXPORT double QuickVersionNumber; 5 | 6 | //! Project version string for Quick. 7 | FOUNDATION_EXPORT const unsigned char QuickVersionString[]; 8 | 9 | #import "QuickSpec.h" 10 | #import "QCKDSL.h" 11 | #import "QuickConfiguration.h" 12 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #if __has_include("Quick-Swift.h") 5 | #import "Quick-Swift.h" 6 | #else 7 | #import 8 | #endif 9 | 10 | @interface XCTestSuite (QuickTestSuiteBuilder) 11 | @end 12 | 13 | @implementation XCTestSuite (QuickTestSuiteBuilder) 14 | 15 | /** 16 | In order to ensure we can correctly build dynamic test suites, we need to 17 | replace some of the default test suite constructors. 18 | */ 19 | + (void)load { 20 | Method testCaseWithName = class_getClassMethod(self, @selector(testSuiteForTestCaseWithName:)); 21 | Method hooked_testCaseWithName = class_getClassMethod(self, @selector(qck_hooked_testSuiteForTestCaseWithName:)); 22 | method_exchangeImplementations(testCaseWithName, hooked_testCaseWithName); 23 | } 24 | 25 | /** 26 | The `+testSuiteForTestCaseWithName:` method is called when a specific test case 27 | class is run from the Xcode test navigator. If the built test suite is `nil`, 28 | Xcode will not run any tests for that test case. 29 | 30 | Given if the following test case class is run from the Xcode test navigator: 31 | 32 | FooSpec 33 | testFoo 34 | testBar 35 | 36 | XCTest will invoke this once per test case, with test case names following this format: 37 | 38 | FooSpec/testFoo 39 | FooSpec/testBar 40 | */ 41 | + (nullable instancetype)qck_hooked_testSuiteForTestCaseWithName:(nonnull NSString *)name { 42 | return [QuickTestSuite selectedTestSuiteForTestCaseWithName:name]; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m: -------------------------------------------------------------------------------- 1 | #import "QuickSpecBase.h" 2 | 3 | #pragma mark - _QuickSpecBase 4 | 5 | @implementation _QuickSpecBase 6 | 7 | - (instancetype)init { 8 | self = [super initWithInvocation: nil]; 9 | return self; 10 | } 11 | 12 | /** 13 | Invocations for each test method in the test case. QuickSpec overrides this method to define a 14 | new method for each example defined in +[QuickSpec spec]. 15 | 16 | @return An array of invocations that execute the newly defined example methods. 17 | */ 18 | + (NSArray *)testInvocations { 19 | NSArray *selectors = [self _qck_testMethodSelectors]; 20 | NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:selectors.count]; 21 | 22 | for (NSString *selectorString in selectors) { 23 | SEL selector = NSSelectorFromString(selectorString); 24 | NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; 25 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; 26 | invocation.selector = selector; 27 | 28 | [invocations addObject:invocation]; 29 | } 30 | 31 | return invocations; 32 | } 33 | 34 | + (NSArray *)_qck_testMethodSelectors { 35 | return @[]; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface _QuickSpecBase : XCTestCase 5 | + (NSArray *)_qck_testMethodSelectors; 6 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 7 | @end 8 | -------------------------------------------------------------------------------- /Example/Pods/STRegex/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Adam Sharp 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 | -------------------------------------------------------------------------------- /Example/Pods/STRegex/Source/Regex/Foundation+Ranges.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | internal extension NSTextCheckingResult { 4 | var ranges: [NSRange] { 5 | return stride(from: 0, to: numberOfRanges, by: 1).map(range(at:)) 6 | } 7 | } 8 | 9 | internal extension String { 10 | var entireRange: NSRange { 11 | return NSRange(location: 0, length: utf16.count) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Example/Pods/STRegex/Source/Regex/ThreadLocal.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Convenience wrapper for generically storing values of type `T` in thread-local storage. 4 | internal final class ThreadLocal { 5 | let key: String 6 | 7 | init(_ key: String) { 8 | self.key = key 9 | } 10 | 11 | var value: T? { 12 | get { 13 | return Thread.current.threadDictionary[key] as? T 14 | } 15 | set { 16 | Thread.current.threadDictionary[key] = newValue 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Blockstack/Blockstack-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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Blockstack/Blockstack-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Blockstack : NSObject 3 | @end 4 | @implementation PodsDummy_Blockstack 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Blockstack/Blockstack-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Blockstack/Blockstack-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double BlockstackVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char BlockstackVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Blockstack/Blockstack.modulemap: -------------------------------------------------------------------------------- 1 | framework module Blockstack { 2 | umbrella header "Blockstack-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Blockstack/Blockstack.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Blockstack 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift" "${PODS_CONFIGURATION_BUILD_DIR}/STRegex" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Blockstack/ResourceBundle-Blockstack-Blockstack-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0.2 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CryptoSwift/CryptoSwift-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 | FMWK 17 | CFBundleShortVersionString 18 | 0.15.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CryptoSwift/CryptoSwift-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_CryptoSwift : NSObject 3 | @end 4 | @implementation PodsDummy_CryptoSwift 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CryptoSwift/CryptoSwift-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CryptoSwift/CryptoSwift-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double CryptoSwiftVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char CryptoSwiftVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CryptoSwift/CryptoSwift.modulemap: -------------------------------------------------------------------------------- 1 | framework module CryptoSwift { 2 | umbrella header "CryptoSwift-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CryptoSwift/CryptoSwift.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | GCC_UNROLL_LOOPS = YES 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/CryptoSwift 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | SWIFT_COMPILATION_MODE = wholemodule 12 | SWIFT_DISABLE_SAFETY_CHECKS = YES 13 | SWIFT_ENFORCE_EXCLUSIVE_ACCESS = debug-only 14 | SWIFT_OPTIMIZATION_LEVEL = -O 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble-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 | FMWK 17 | CFBundleShortVersionString 18 | 8.0.4 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Nimble : NSObject 3 | @end 4 | @implementation PodsDummy_Nimble 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "Nimble.h" 14 | #import "DSL.h" 15 | #import "NMBExceptionCapture.h" 16 | #import "NMBStringify.h" 17 | #import "CwlCatchException.h" 18 | #import "CwlMachBadInstructionHandler.h" 19 | #import "mach_excServer.h" 20 | #import "CwlPreconditionTesting.h" 21 | 22 | FOUNDATION_EXPORT double NimbleVersionNumber; 23 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; 24 | 25 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble.modulemap: -------------------------------------------------------------------------------- 1 | framework module Nimble { 2 | umbrella header "Nimble-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble.xcconfig: -------------------------------------------------------------------------------- 1 | APPLICATION_EXTENSION_API_ONLY = YES 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble 3 | DEFINES_MODULE = YES 4 | ENABLE_BITCODE = NO 5 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" 6 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 7 | OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -weak-lswiftXCTest -weak_framework "XCTest" 8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS $(inherited) -suppress-warnings 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT} 12 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble 13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 14 | SKIP_INSTALL = YES 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Example/Pods-Blockstack_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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Example/Pods-Blockstack_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Blockstack_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Blockstack_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Example/Pods-Blockstack_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_Blockstack_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_Blockstack_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Example/Pods-Blockstack_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Blockstack" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift" "${PODS_CONFIGURATION_BUILD_DIR}/STRegex" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Blockstack/Blockstack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift/Promises.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/STRegex/Regex.framework/Headers" "${PODS_TARGET_SRCROOT}/Sources/FBLPromises/include" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "Blockstack" -framework "CryptoSwift" -framework "FBLPromises" -framework "Promises" -framework "Regex" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Example/Pods-Blockstack_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Blockstack_Example { 2 | umbrella header "Pods-Blockstack_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Example/Pods-Blockstack_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Blockstack" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift" "${PODS_CONFIGURATION_BUILD_DIR}/STRegex" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Blockstack/Blockstack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift/Promises.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/STRegex/Regex.framework/Headers" "${PODS_TARGET_SRCROOT}/Sources/FBLPromises/include" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "Blockstack" -framework "CryptoSwift" -framework "FBLPromises" -framework "Promises" -framework "Regex" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Tests/Pods-Blockstack_Tests-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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Tests/Pods-Blockstack_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Blockstack_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Blockstack_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Tests/Pods-Blockstack_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_Blockstack_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_Blockstack_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Tests/Pods-Blockstack_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/Blockstack" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/STRegex" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Blockstack/Blockstack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift/Promises.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/STRegex/Regex.framework/Headers" "${PODS_TARGET_SRCROOT}/Sources/FBLPromises/include" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "Blockstack" -framework "CryptoSwift" -framework "FBLPromises" -framework "Nimble" -framework "Promises" -framework "Quick" -framework "Regex" -framework "XCTest" -weak_framework "XCTest" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Tests/Pods-Blockstack_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Blockstack_Tests { 2 | umbrella header "Pods-Blockstack_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Blockstack_Tests/Pods-Blockstack_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/Blockstack" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/STRegex" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Blockstack/Blockstack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift/Promises.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/STRegex/Regex.framework/Headers" "${PODS_TARGET_SRCROOT}/Sources/FBLPromises/include" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "Blockstack" -framework "CryptoSwift" -framework "FBLPromises" -framework "Nimble" -framework "Promises" -framework "Quick" -framework "Regex" -framework "XCTest" -weak_framework "XCTest" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromisesObjC/PromisesObjC-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 | FMWK 17 | CFBundleShortVersionString 18 | 1.2.8 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromisesObjC/PromisesObjC-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_PromisesObjC : NSObject 3 | @end 4 | @implementation PodsDummy_PromisesObjC 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromisesObjC/PromisesObjC-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "FBLPromise+All.h" 14 | #import "FBLPromise+Always.h" 15 | #import "FBLPromise+Any.h" 16 | #import "FBLPromise+Async.h" 17 | #import "FBLPromise+Await.h" 18 | #import "FBLPromise+Catch.h" 19 | #import "FBLPromise+Delay.h" 20 | #import "FBLPromise+Do.h" 21 | #import "FBLPromise+Race.h" 22 | #import "FBLPromise+Recover.h" 23 | #import "FBLPromise+Reduce.h" 24 | #import "FBLPromise+Retry.h" 25 | #import "FBLPromise+Testing.h" 26 | #import "FBLPromise+Then.h" 27 | #import "FBLPromise+Timeout.h" 28 | #import "FBLPromise+Validate.h" 29 | #import "FBLPromise+Wrap.h" 30 | #import "FBLPromise.h" 31 | #import "FBLPromiseError.h" 32 | #import "FBLPromises.h" 33 | 34 | FOUNDATION_EXPORT double FBLPromisesVersionNumber; 35 | FOUNDATION_EXPORT const unsigned char FBLPromisesVersionString[]; 36 | 37 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromisesObjC/PromisesObjC.modulemap: -------------------------------------------------------------------------------- 1 | framework module FBLPromises { 2 | umbrella header "PromisesObjC-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromisesObjC/PromisesObjC.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_TARGET_SRCROOT}/Sources/FBLPromises/include" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/PromisesObjC 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromisesSwift/PromisesSwift-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 | FMWK 17 | CFBundleShortVersionString 18 | 1.2.8 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromisesSwift/PromisesSwift-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_PromisesSwift : NSObject 3 | @end 4 | @implementation PodsDummy_PromisesSwift 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromisesSwift/PromisesSwift-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromisesSwift/PromisesSwift-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double PromisesVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char PromisesVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromisesSwift/PromisesSwift.modulemap: -------------------------------------------------------------------------------- 1 | framework module Promises { 2 | umbrella header "PromisesSwift-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromisesSwift/PromisesSwift.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/PromisesSwift 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick-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 | FMWK 17 | CFBundleShortVersionString 18 | 2.2.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Quick : NSObject 3 | @end 4 | @implementation PodsDummy_Quick 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "QuickConfiguration.h" 14 | #import "QCKDSL.h" 15 | #import "Quick.h" 16 | #import "QuickSpec.h" 17 | 18 | FOUNDATION_EXPORT double QuickVersionNumber; 19 | FOUNDATION_EXPORT const unsigned char QuickVersionString[]; 20 | 21 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick.modulemap: -------------------------------------------------------------------------------- 1 | framework module Quick { 2 | umbrella header "Quick-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick.xcconfig: -------------------------------------------------------------------------------- 1 | APPLICATION_EXTENSION_API_ONLY = YES 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Quick 3 | ENABLE_BITCODE = NO 4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -framework "XCTest" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Quick 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/STRegex/STRegex-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 | FMWK 17 | CFBundleShortVersionString 18 | 2.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/STRegex/STRegex-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_STRegex : NSObject 3 | @end 4 | @implementation PodsDummy_STRegex 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/STRegex/STRegex-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/STRegex/STRegex-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double RegexVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char RegexVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/STRegex/STRegex.modulemap: -------------------------------------------------------------------------------- 1 | framework module Regex { 2 | umbrella header "STRegex-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/STRegex/STRegex.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/STRegex 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/STRegex 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Tests/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Blockstack Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # change these settings to your own preference 11 | indent_style = space 12 | indent_size = 2 13 | 14 | # we recommend you to keep these unchanged 15 | end_of_line = lf 16 | charset = utf-8 17 | trim_trailing_whitespace = true 18 | insert_final_newline = true 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | [{package}.json] 24 | indent_style = space 25 | indent_size = 2 -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | 39 | # Custom 40 | .DS_Store -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "public", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "destination": "/index.html" 13 | } 14 | ], 15 | "headers": [ 16 | { 17 | "source" : "**/*.@(eot|json|otf|ttf|ttc|woff|font.css)", 18 | "headers" : [ 19 | { 20 | "key" : "Access-Control-Allow-Origin", 21 | "value" : "*" 22 | } 23 | ] 24 | }, 25 | { 26 | "source" : "**/*.@(jpg|jpeg|gif|png)", 27 | "headers" : [ 28 | { 29 | "key" : "Cache-Control", 30 | "value" : "max-age=7200" 31 | } 32 | ] 33 | } 34 | ], 35 | "cleanUrls": true, 36 | "trailingSlash": false 37 | } 38 | } -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-blockstack", 3 | "version": "0.0.0", 4 | "description": "A simple Blockstack app", 5 | "main": "index.js", 6 | "scripts": { 7 | "browserify": "browserify requires.js -o public/bundle.js", 8 | "start": "npm run browserify; node server.js" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/blockstack/hello-blockstack.git" 13 | }, 14 | "author": "", 15 | "license": "MIT", 16 | "bugs": { 17 | "url": "https://github.com/blockstack/hello-blockstack/issues" 18 | }, 19 | "homepage": "https://github.com/blockstack/hello-blockstack#readme", 20 | "devDependencies": { 21 | "browserify": "^16.2.3", 22 | "express": "^4.15.2", 23 | "opn": "^6.0.0" 24 | }, 25 | "dependencies": { 26 | "blockstack": "^19.2.1" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/public/_headers: -------------------------------------------------------------------------------- 1 | /* 2 | Access-Control-Allow-Origin: * 3 | Access-Control-Allow-Headers: "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding" 4 | Access-Control-Allow-Methods: "POST, GET, OPTIONS, DELETE, PUT" 5 | -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/public/app.css: -------------------------------------------------------------------------------- 1 | /* Globals */ 2 | a,a:focus,a:hover{color:#fff;} 3 | html,body{height:100%;background-color:#E91E63;} 4 | body{color:#fff;text-align:center;} 5 | .hide{display:none;} 6 | .landing-heading{font-family:'Source Code Pro',monospace;font-weight:400;} 7 | 8 | /* Buttons */ 9 | .btn{font-family:'Source Code Pro',monospace;padding:0.5625rem 2.5rem;font-size:0.8125rem;font-weight:400;line-height:1.75rem;border-radius:0!important;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;} 10 | .btn-lg{font-size:0.875rem;padding:0.6875rem 3.4375rem;line-height:1.75rem;} 11 | .btn:focus,.btn:active:focus,.btn.active:focus{outline:none;} 12 | .btn-primary{background-color:#270F34;border:1px solid #270F34;} 13 | .btn-primary:hover,.btn-primary:focus,.btn-primary:active{color:#fff;border:1px solid #2C96FF;background-color:#2C96FF;} 14 | 15 | /* Avatar */ 16 | .avatar{width:100px;height:100px;} 17 | .avatar-section{margin-bottom:25px;} 18 | 19 | /* Scaffolding */ 20 | .site-wrapper{display:table;width:100%;height:100%;min-height:100%;} 21 | .site-wrapper-inner{display:table-cell;vertical-align:middle;margin-right:auto;margin-left:auto;width:100%;} 22 | .panel-authed{padding:0 0 0 0;} 23 | 24 | /* Home button */ 25 | .btn-home-hello{position:absolute;font-family:'Source Code Pro',monospace;font-size:11px;font-weight:400;color:rgba(255,255,255,0.85);top:15px;left:15px;padding:3px 20px;background-color:rgba(255,255,255,0.15);border-radius:6px;-webkit-box-shadow:0px 0px 20px 0px rgba(0,0,0,0.15);-moz-box-shadow:0px 0px 20px 0px rgba(0,0,0,0.15);box-shadow:0px 0px 20px 0px rgba(0,0,0,0.15);} -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/public/app.js: -------------------------------------------------------------------------------- 1 | document.addEventListener("DOMContentLoaded", function(event) { 2 | document.getElementById('signin-button').addEventListener('click', function(event) { 3 | event.preventDefault() 4 | blockstack.redirectToSignIn() 5 | }) 6 | document.getElementById('signout-button').addEventListener('click', function(event) { 7 | event.preventDefault() 8 | blockstack.signUserOut(window.location.href) 9 | }) 10 | document.getElementById('putencryptedfile-button').addEventListener('click', function(event) { 11 | event.preventDefault() 12 | blockstack.putFile("encryptedFile.json", "Encrypted hello", { encrypt: true }) 13 | }) 14 | document.getElementById('putplaintextfile-button').addEventListener('click', function(event) { 15 | event.preventDefault() 16 | blockstack.putFile("plainTextFile.txt", "Plain Text Hello", { encrypt: false }) 17 | }) 18 | function showProfile(profile) { 19 | var person = new blockstack.Person(profile) 20 | document.getElementById('heading-name').innerHTML = person.name() ? person.name() : "Nameless Person" 21 | if(person.avatarUrl()) { 22 | document.getElementById('avatar-image').setAttribute('src', person.avatarUrl()) 23 | } 24 | document.getElementById('section-1').style.display = 'none' 25 | document.getElementById('section-2').style.display = 'block' 26 | } 27 | 28 | if (blockstack.isUserSignedIn()) { 29 | var profile = blockstack.loadUserData().profile 30 | showProfile(profile) 31 | } else if (blockstack.isSignInPending()) { 32 | blockstack.handlePendingSignIn().then(function(userData) { 33 | window.location = window.location.origin 34 | }) 35 | } 36 | }) 37 | -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/public/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacks-archive/blockstack-ios/fceaf60d409a3a28640849a76cf9d01eec592da1/Tools/Blockstack-webapp/public/icon-192x192.png -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, Blockstack! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Hello, Blockstack! 15 | 16 | 17 | Sign In with Blockstack 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | Hello, Anonymous! 26 | 27 | 28 | Logout 29 | 30 | 31 | 32 | 33 | Put Encrypted File 34 | 35 | 36 | 37 | 38 | Put Plain Text File 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Hello, Blockstack", 3 | "start_url": "localhost:8777", 4 | "description": "A simple demo of Blockstack Auth", 5 | "icons": [{ 6 | "src": "https://helloblockstack.com/icon-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/public/redirect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | myBlockstackApp Redirect 5 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/public/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org/ 2 | 3 | User-agent: * 4 | Disallow: -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/requires.js: -------------------------------------------------------------------------------- 1 | window.blockstack = require('blockstack') -------------------------------------------------------------------------------- /Tools/Blockstack-webapp/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const opn = require('opn') 3 | 4 | const app = express() 5 | const port = 8080 6 | 7 | function allowCrossDomain(req, res, next) { 8 | res.header('Access-Control-Allow-Origin', '*') 9 | res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE') 10 | res.header('Access-Control-Allow-Headers', 'Content-Type') 11 | next() 12 | } 13 | 14 | app.use(allowCrossDomain) 15 | 16 | app.get('/redirect', function(req, res) { 17 | res.redirect('coolappauth:' + req.query.authResponse); 18 | }) 19 | 20 | app.use('/', express.static(__dirname + '/public')) 21 | app.listen(port, (err) => { 22 | if (err) { 23 | return console.log('something bad happened', err) 24 | } 25 | console.log(`server is listening on ${port}`) 26 | opn('http://localhost:8080') 27 | }) 28 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /docs/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 50% 23 | 24 | 25 | 50% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/docsets/Blockstack.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.blockstack 7 | CFBundleName 8 | Blockstack 9 | DocSetPlatformFamily 10 | blockstack 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/docsets/Blockstack.docset/Contents/Resources/Documents/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 48% 23 | 24 | 25 | 48% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/docsets/Blockstack.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacks-archive/blockstack-ios/fceaf60d409a3a28640849a76cf9d01eec592da1/docs/docsets/Blockstack.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/Blockstack.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacks-archive/blockstack-ios/fceaf60d409a3a28640849a76cf9d01eec592da1/docs/docsets/Blockstack.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/Blockstack.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacks-archive/blockstack-ios/fceaf60d409a3a28640849a76cf9d01eec592da1/docs/docsets/Blockstack.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/Blockstack.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /docs/docsets/Blockstack.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacks-archive/blockstack-ios/fceaf60d409a3a28640849a76cf9d01eec592da1/docs/docsets/Blockstack.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/Blockstack.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacks-archive/blockstack-ios/fceaf60d409a3a28640849a76cf9d01eec592da1/docs/docsets/Blockstack.tgz -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacks-archive/blockstack-ios/fceaf60d409a3a28640849a76cf9d01eec592da1/docs/img/carat.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacks-archive/blockstack-ios/fceaf60d409a3a28640849a76cf9d01eec592da1/docs/img/dash.png -------------------------------------------------------------------------------- /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacks-archive/blockstack-ios/fceaf60d409a3a28640849a76cf9d01eec592da1/docs/img/gh.png -------------------------------------------------------------------------------- /docs/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | --------------------------------------------------------------------------------
16 | 17 | Sign In with Blockstack 18 | 19 |
27 | 28 | Logout 29 | 30 |
32 | 33 | Put Encrypted File 34 | 35 |
37 | 38 | Put Plain Text File 39 | 40 |