From 2430517e54852efbb736f3c23babbe14d82e4130 Mon Sep 17 00:00:00 2001 From: Pabel Nunez Landestoy Date: Mon, 14 Oct 2019 16:26:26 -0400 Subject: [PATCH 01/25] Updated carthage dependencies --- Cartfile | 1 + Cartfile.resolved | 10 ++- TezosKit.xcodeproj/project.pbxproj | 113 ++++++++++++++++++++++++++--- 3 files changed, 113 insertions(+), 11 deletions(-) diff --git a/Cartfile b/Cartfile index 6ff22200..07535df4 100644 --- a/Cartfile +++ b/Cartfile @@ -1,3 +1,4 @@ github "attaswift/BigInt" ~> 3.1 github "keefertaylor/TezosCrypto" ~> 2.1 github "mxcl/PromiseKit" ~> 6.8 +github "pokt-network/pocket-swift-core-carthage" diff --git a/Cartfile.resolved b/Cartfile.resolved index df15070d..bca9a9a8 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,8 +1,14 @@ +github "Quick/Nimble" "v8.0.4" +github "Quick/Quick" "v2.2.0" +github "RNCryptor/RNCryptor" "5.1.0" +github "ReactiveX/RxSwift" "4.5.0" github "attaswift/BigInt" "v3.1.0" github "attaswift/SipHash" "v1.2.2" github "jedisct1/swift-sodium" "0.8.0" +github "jimisaacs/SwiftKeychainWrapper" "65c16da7399dd539322203558160fa349a1e27d3" github "keefertaylor/Base58Swift" "2.1.0" github "keefertaylor/MnemonicKit" "1.3.7" -github "keefertaylor/TezosCrypto" "2.1.0" +github "keefertaylor/TezosCrypto" "2.1.1" github "krzyzanowskim/CryptoSwift" "0.14.0" -github "mxcl/PromiseKit" "6.9.0" +github "mxcl/PromiseKit" "6.11.0" +github "pokt-network/pocket-swift-core-carthage" "v.0.0.2" diff --git a/TezosKit.xcodeproj/project.pbxproj b/TezosKit.xcodeproj/project.pbxproj index 07627ecb..e15c92e4 100644 --- a/TezosKit.xcodeproj/project.pbxproj +++ b/TezosKit.xcodeproj/project.pbxproj @@ -27,7 +27,7 @@ 7767AE3722C3F0CF0043C52C /* CodingUtilTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7767AE3622C3F0CF0043C52C /* CodingUtilTest.swift */; }; 7767AE3D22C572300043C52C /* OperationMetadataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7767AE3C22C572300043C52C /* OperationMetadataProvider.swift */; }; 7774780522221DE50010BA4D /* NetworkClientTest+Promises.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7774780422221DE50010BA4D /* NetworkClientTest+Promises.swift */; }; - 7774780B2222281B0010BA4D /* TezosKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77CE359621F7DC76006ADABA /* TezosKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 7774780B2222281B0010BA4D /* TezosKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77CE359621F7DC76006ADABA /* TezosKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 7774780C222228590010BA4D /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77F4D26B221F899800D34B01 /* PromiseKit.framework */; }; 7774780F222228E50010BA4D /* PromiseKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7774780E222228E50010BA4D /* PromiseKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 7776493B227616B200451DD5 /* FakeObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7776493A227616B200451DD5 /* FakeObjects.swift */; }; @@ -188,6 +188,38 @@ 77FE788822EEE42500B85B9D /* GetContractStorageRPCTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77FE788722EEE42500B85B9D /* GetContractStorageRPCTest.swift */; }; 77FE788A22EFF92E00B85B9D /* MichelsonAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77FE788922EFF92E00B85B9D /* MichelsonAnnotation.swift */; }; 77FE788C22EFFA7100B85B9D /* MichelsonAnnotationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77FE788B22EFFA7100B85B9D /* MichelsonAnnotationTests.swift */; }; + C5ABD4AA234EEDD700C779DC /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77CE363021F7EF32006ADABA /* BigInt.framework */; }; + C5ABD4AB234EEDD700C779DC /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77CE36B521F7F3CB006ADABA /* CryptoSwift.framework */; }; + C5ABD4AC234EEDD700C779DC /* MnemonicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77CE36B721F7F3D6006ADABA /* MnemonicKit.framework */; }; + C5ABD4AD234EEDD700C779DC /* PocketSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5E729552349CFB300155217 /* PocketSwift.framework */; }; + C5ABD4AE234EEDD700C779DC /* RNCryptor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5ABD4A6234EE62D00C779DC /* RNCryptor.framework */; }; + C5ABD4AF234EEDD700C779DC /* SipHash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77CE363221F7F032006ADABA /* SipHash.framework */; }; + C5ABD4B0234EEDD700C779DC /* Sodium.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77CE36B321F7F3C0006ADABA /* Sodium.framework */; }; + C5ABD4B1234EEDD700C779DC /* TezosCrypto.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77F4D2532218866E00D34B01 /* TezosCrypto.framework */; }; + C5ABD4B9234EEDD800C779DC /* RxBlocking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5ABD4B2234EEDD700C779DC /* RxBlocking.framework */; }; + C5ABD4BA234EEDD800C779DC /* RxAtomic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5ABD4B3234EEDD700C779DC /* RxAtomic.framework */; }; + C5ABD4BB234EEDD800C779DC /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5ABD4B4234EEDD700C779DC /* RxSwift.framework */; }; + C5ABD4BC234EEDD800C779DC /* RxTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5ABD4B5234EEDD700C779DC /* RxTest.framework */; }; + C5ABD4BD234EEDD800C779DC /* RxCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5ABD4B6234EEDD800C779DC /* RxCocoa.framework */; }; + C5ABD4BE234EEDD800C779DC /* SwiftKeychainWrapper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5ABD4B7234EEDD800C779DC /* SwiftKeychainWrapper.framework */; }; + C5ABD4BF234EEDD800C779DC /* Base58Swift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5ABD4B8234EEDD800C779DC /* Base58Swift.framework */; }; + C5ABD4C0234EEFA300C779DC /* RxBlocking.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C5ABD4B2234EEDD700C779DC /* RxBlocking.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4C1234EF0A200C779DC /* RxAtomic.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C5ABD4B3234EEDD700C779DC /* RxAtomic.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4C2234EF0C100C779DC /* Base58Swift.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C5ABD4B8234EEDD800C779DC /* Base58Swift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4C3234EF0C100C779DC /* RxCocoa.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C5ABD4B6234EEDD800C779DC /* RxCocoa.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4C4234EF0C100C779DC /* RxSwift.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C5ABD4B4234EEDD700C779DC /* RxSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4C5234EF0C100C779DC /* RxTest.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C5ABD4B5234EEDD700C779DC /* RxTest.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4C6234EF0C100C779DC /* SwiftKeychainWrapper.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C5ABD4B7234EEDD800C779DC /* SwiftKeychainWrapper.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4C7234EF0C100C779DC /* RNCryptor.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C5ABD4A6234EE62D00C779DC /* RNCryptor.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4C8234EF0C100C779DC /* MnemonicKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 77CE36B721F7F3D6006ADABA /* MnemonicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4C9234EF0C100C779DC /* CryptoSwift.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 77CE36B521F7F3CB006ADABA /* CryptoSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4CA234EF0C100C779DC /* Sodium.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 77CE36B321F7F3C0006ADABA /* Sodium.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4CB234EF0C100C779DC /* SipHash.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 77CE363221F7F032006ADABA /* SipHash.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ABD4CC234EF0C100C779DC /* BigInt.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 77CE363021F7EF32006ADABA /* BigInt.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5E729512349973500155217 /* PocketNetworkClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5E729502349973500155217 /* PocketNetworkClient.swift */; }; + C5E729542349BD0400155217 /* PocketNetworkClientTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5E72952234997D200155217 /* PocketNetworkClientTest.swift */; }; + C5E729562349CFB300155217 /* PocketSwift.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C5E729552349CFB300155217 /* PocketSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5E72957234A567900155217 /* PocketSwift.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = C5E729552349CFB300155217 /* PocketSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -198,7 +230,7 @@ remoteGlobalIDString = 77CE359521F7DC76006ADABA; remoteInfo = TezosKit; }; - 77CE35A121F7DC76006ADABA /* PBXContainerItemProxy */ = { + C5ABD4A8234EEC6400C779DC /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 77CE358D21F7DC76006ADABA /* Project object */; proxyType = 1; @@ -214,8 +246,22 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 779427BF22C02AA900559A03 /* TezosCrypto.framework in CopyFiles */, + C5ABD4C2234EF0C100C779DC /* Base58Swift.framework in CopyFiles */, + C5ABD4C3234EF0C100C779DC /* RxCocoa.framework in CopyFiles */, + C5ABD4C4234EF0C100C779DC /* RxSwift.framework in CopyFiles */, + C5ABD4C5234EF0C100C779DC /* RxTest.framework in CopyFiles */, + C5ABD4C6234EF0C100C779DC /* SwiftKeychainWrapper.framework in CopyFiles */, + C5ABD4C7234EF0C100C779DC /* RNCryptor.framework in CopyFiles */, 7774780F222228E50010BA4D /* PromiseKit.framework in CopyFiles */, + 779427BF22C02AA900559A03 /* TezosCrypto.framework in CopyFiles */, + C5ABD4C8234EF0C100C779DC /* MnemonicKit.framework in CopyFiles */, + C5ABD4C9234EF0C100C779DC /* CryptoSwift.framework in CopyFiles */, + C5ABD4CA234EF0C100C779DC /* Sodium.framework in CopyFiles */, + C5ABD4CB234EF0C100C779DC /* SipHash.framework in CopyFiles */, + C5ABD4CC234EF0C100C779DC /* BigInt.framework in CopyFiles */, + C5ABD4C1234EF0A200C779DC /* RxAtomic.framework in CopyFiles */, + C5ABD4C0234EEFA300C779DC /* RxBlocking.framework in CopyFiles */, + C5E729562349CFB300155217 /* PocketSwift.framework in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -235,6 +281,7 @@ dstPath = ""; dstSubfolderSpec = 7; files = ( + C5E72957234A567900155217 /* PocketSwift.framework in Copy Files */, ); name = "Copy Files"; runOnlyForDeploymentPostprocessing = 0; @@ -429,6 +476,17 @@ 77FE788922EFF92E00B85B9D /* MichelsonAnnotation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MichelsonAnnotation.swift; sourceTree = ""; }; 77FE788B22EFFA7100B85B9D /* MichelsonAnnotationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MichelsonAnnotationTests.swift; sourceTree = ""; }; C2BFF006F7695B932864C46D /* Pods_TezosKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TezosKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C5ABD4A6234EE62D00C779DC /* RNCryptor.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RNCryptor.framework; path = Carthage/Build/iOS/RNCryptor.framework; sourceTree = ""; }; + C5ABD4B2234EEDD700C779DC /* RxBlocking.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxBlocking.framework; path = Carthage/Build/iOS/RxBlocking.framework; sourceTree = ""; }; + C5ABD4B3234EEDD700C779DC /* RxAtomic.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxAtomic.framework; path = Carthage/Build/iOS/RxAtomic.framework; sourceTree = ""; }; + C5ABD4B4234EEDD700C779DC /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxSwift.framework; path = Carthage/Build/iOS/RxSwift.framework; sourceTree = ""; }; + C5ABD4B5234EEDD700C779DC /* RxTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxTest.framework; path = Carthage/Build/iOS/RxTest.framework; sourceTree = ""; }; + C5ABD4B6234EEDD800C779DC /* RxCocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxCocoa.framework; path = Carthage/Build/iOS/RxCocoa.framework; sourceTree = ""; }; + C5ABD4B7234EEDD800C779DC /* SwiftKeychainWrapper.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftKeychainWrapper.framework; path = Carthage/Build/iOS/SwiftKeychainWrapper.framework; sourceTree = ""; }; + C5ABD4B8234EEDD800C779DC /* Base58Swift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Base58Swift.framework; path = Carthage/Build/iOS/Base58Swift.framework; sourceTree = ""; }; + C5E729502349973500155217 /* PocketNetworkClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PocketNetworkClient.swift; sourceTree = ""; }; + C5E72952234997D200155217 /* PocketNetworkClientTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PocketNetworkClientTest.swift; sourceTree = ""; }; + C5E729552349CFB300155217 /* PocketSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PocketSwift.framework; path = Carthage/Build/iOS/PocketSwift.framework; sourceTree = ""; }; F4F69CEC90588DB51FE973FC /* Pods_TezosKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TezosKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -460,6 +518,21 @@ files = ( 7774780C222228590010BA4D /* PromiseKit.framework in Frameworks */, 7774780B2222281B0010BA4D /* TezosKit.framework in Frameworks */, + C5ABD4B9234EEDD800C779DC /* RxBlocking.framework in Frameworks */, + C5ABD4BA234EEDD800C779DC /* RxAtomic.framework in Frameworks */, + C5ABD4BB234EEDD800C779DC /* RxSwift.framework in Frameworks */, + C5ABD4BC234EEDD800C779DC /* RxTest.framework in Frameworks */, + C5ABD4BD234EEDD800C779DC /* RxCocoa.framework in Frameworks */, + C5ABD4BE234EEDD800C779DC /* SwiftKeychainWrapper.framework in Frameworks */, + C5ABD4BF234EEDD800C779DC /* Base58Swift.framework in Frameworks */, + C5ABD4AA234EEDD700C779DC /* BigInt.framework in Frameworks */, + C5ABD4AB234EEDD700C779DC /* CryptoSwift.framework in Frameworks */, + C5ABD4AC234EEDD700C779DC /* MnemonicKit.framework in Frameworks */, + C5ABD4AD234EEDD700C779DC /* PocketSwift.framework in Frameworks */, + C5ABD4AE234EEDD700C779DC /* RNCryptor.framework in Frameworks */, + C5ABD4AF234EEDD700C779DC /* SipHash.framework in Frameworks */, + C5ABD4B0234EEDD700C779DC /* Sodium.framework in Frameworks */, + C5ABD4B1234EEDD700C779DC /* TezosCrypto.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -555,6 +628,7 @@ 77CE358C21F7DC76006ADABA = { isa = PBXGroup; children = ( + C5E729552349CFB300155217 /* PocketSwift.framework */, 779A9C7C230E320B004C6575 /* FeeEstimatorTest.swift */, 779427BE22C02AA800559A03 /* TezosCrypto.framework */, 7774780E222228E50010BA4D /* PromiseKit.framework */, @@ -593,6 +667,14 @@ 77CE362F21F7EF32006ADABA /* Frameworks */ = { isa = PBXGroup; children = ( + C5ABD4B8234EEDD800C779DC /* Base58Swift.framework */, + C5ABD4B3234EEDD700C779DC /* RxAtomic.framework */, + C5ABD4B2234EEDD700C779DC /* RxBlocking.framework */, + C5ABD4B6234EEDD800C779DC /* RxCocoa.framework */, + C5ABD4B4234EEDD700C779DC /* RxSwift.framework */, + C5ABD4B5234EEDD700C779DC /* RxTest.framework */, + C5ABD4B7234EEDD800C779DC /* SwiftKeychainWrapper.framework */, + C5ABD4A6234EE62D00C779DC /* RNCryptor.framework */, 77F4D26B221F899800D34B01 /* PromiseKit.framework */, 77F4D2532218866E00D34B01 /* TezosCrypto.framework */, 77CE36B721F7F3D6006ADABA /* MnemonicKit.framework */, @@ -730,6 +812,7 @@ 77F4D265221CCE4B00D34B01 /* NetworkClient.swift */, 77F4D25522189A5000D34B01 /* RPCResponseHandler.swift */, 77CE384621FC7ED8006ADABA /* TezosKitError.swift */, + C5E729502349973500155217 /* PocketNetworkClient.swift */, ); path = Client; sourceTree = ""; @@ -816,6 +899,7 @@ 77CE36D021F7F49D006ADABA /* WalletTests.swift */, 7767AE3622C3F0CF0043C52C /* CodingUtilTest.swift */, 77CE35A621F7DC76006ADABA /* Info.plist */, + C5E72952234997D200155217 /* PocketNetworkClientTest.swift */, ); path = TezosKit; sourceTree = ""; @@ -902,7 +986,7 @@ buildRules = ( ); dependencies = ( - 77CE35A221F7DC76006ADABA /* PBXTargetDependency */, + C5ABD4A9234EEC6400C779DC /* PBXTargetDependency */, ); name = TezosKitTests; productName = TezosKitTests; @@ -994,6 +1078,9 @@ "$(SRCROOT)/Carthage/Build/iOS/TezosCrypto.framework", "$(SRCROOT)/Carthage/Build/iOS/Base58Swift.framework", "$(SRCROOT)/Carthage/Build/iOS/PromiseKit.framework", + "$(SRCROOT)/Carthage/Build/iOS/PocketSwift.framework", + "$(SRCROOT)/Carthage/Build/iOS/RxBlocking.framework", + "$(SRCROOT)/Carthage/Build/iOS/RxAtomic.framework", ); name = Carthage; outputFileListPaths = ( @@ -1007,6 +1094,9 @@ "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/TezosCrypto.framework", "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Base58Swift.framework", "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/PromiseKit.framework", + "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/PocketSwift.framework", + "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxBlocking.framework", + "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxAtomic.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -1028,7 +1118,8 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\nswiftlint --strict\nelse\necho \"warning: SwiftLint not installed, run `brew install swiftlint`\"\nfi\n"; + shellScript = " +"; }; /* End PBXShellScriptBuildPhase section */ @@ -1103,6 +1194,7 @@ 77CE387821FC7ED8006ADABA /* GetBallotsListRPC.swift in Sources */, 77CE386921FC7ED8006ADABA /* JSONDictionaryResponseAdapter.swift in Sources */, 77CE387421FC7ED8006ADABA /* GetAddressDelegateRPC.swift in Sources */, + C5E729512349973500155217 /* PocketNetworkClient.swift in Sources */, 779A9C5C230864EE004C6575 /* SimulationResult.swift in Sources */, 77CE384F21FC7ED8006ADABA /* Operation.swift in Sources */, 77F4D266221CCE4B00D34B01 /* NetworkClient.swift in Sources */, @@ -1196,6 +1288,7 @@ 77B69EC522510D5400DB4319 /* ConseilEntityTest.swift in Sources */, 77F4D268221CD44100D34B01 /* NetworkClientTest.swift in Sources */, 7776493B227616B200451DD5 /* FakeObjects.swift in Sources */, + C5E729542349BD0400155217 /* PocketNetworkClientTest.swift in Sources */, 779427AF22BB1D6700559A03 /* OperationFactoryTest.swift in Sources */, 7719266022DA1E1500E63DE4 /* SimulationServiceTest.swift in Sources */, 77CE36E521F7F49F006ADABA /* RPCTest.swift in Sources */, @@ -1230,10 +1323,10 @@ target = 77CE359521F7DC76006ADABA /* TezosKit */; targetProxy = 772F48AB2224894E00DF0F9D /* PBXContainerItemProxy */; }; - 77CE35A221F7DC76006ADABA /* PBXTargetDependency */ = { + C5ABD4A9234EEC6400C779DC /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 77CE359521F7DC76006ADABA /* TezosKit */; - targetProxy = 77CE35A121F7DC76006ADABA /* PBXContainerItemProxy */; + targetProxy = C5ABD4A8234EEC6400C779DC /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -1467,7 +1560,7 @@ 77CE35AE21F7DC76006ADABA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 6F6VXZUKN5; FRAMEWORK_SEARCH_PATHS = ( @@ -1475,6 +1568,7 @@ "$(PROJECT_DIR)/Carthage/Build/iOS", ); INFOPLIST_FILE = Tests/TezosKit/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1490,7 +1584,7 @@ 77CE35AF21F7DC76006ADABA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 6F6VXZUKN5; FRAMEWORK_SEARCH_PATHS = ( @@ -1498,6 +1592,7 @@ "$(PROJECT_DIR)/Carthage/Build/iOS", ); INFOPLIST_FILE = Tests/TezosKit/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", From 598da5272db4a2cfd814a5792545c8213c2c4116 Mon Sep 17 00:00:00 2001 From: Pabel Nunez Landestoy Date: Mon, 14 Oct 2019 16:26:45 -0400 Subject: [PATCH 02/25] added PocketNetworkClient --- TezosKit/Client/PocketNetworkClient.swift | 101 ++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 TezosKit/Client/PocketNetworkClient.swift diff --git a/TezosKit/Client/PocketNetworkClient.swift b/TezosKit/Client/PocketNetworkClient.swift new file mode 100644 index 00000000..3726ce69 --- /dev/null +++ b/TezosKit/Client/PocketNetworkClient.swift @@ -0,0 +1,101 @@ +// Copyright Keefer Taylor, 2019 + +import Foundation +import PocketSwift + +public class PocketNetworkClient: NetworkClient { + + /// Network name + private let network = "TEZOS" + /// Network ID + private let netID: String + /// Developer ID + private let devID: String + /// Pocket Instance that will relay requests + private let pocket: Pocket + /// Headers which will be added to every request. + private let headers: [Header] + /// A response handler for RPCs. + private let responseHandler: RPCResponseHandler + /// The queue that callbacks from requests will be made on. + internal let callbackQueue: DispatchQueue + /// Initialize a new AbstractNetworkClient. + /// - Parameters: + /// - devID: Pocket developer identifier. + /// - netID: Tezos network identifier. + /// - headers: The path to the remote node. + /// - urlSession: The URLSession that will manage network requests. + /// - headers: Headers which will be added to every request. + /// - callbackQueue: A dispatch queue that callbacks will be made on. + /// - responseHandler: An object which will handle responses. + public init( + devID: String, + netID: String, + headers: [Header] = [], + callbackQueue: DispatchQueue, + responseHandler: RPCResponseHandler + ) { + self.netID = netID + self.devID = devID + self.headers = headers + self.callbackQueue = callbackQueue + self.responseHandler = responseHandler + self.pocket = Pocket(devID: devID, network: network, netID: netID, maxNodes: 10, requestTimeOut: 10_000) + } + public func send(_ rpc: RPC, callbackQueue: DispatchQueue?, completion: @escaping (Result) -> Void) { + + } + public func send(_ rpc: RPC, completion: @escaping (Result) -> Void) { + var httpMethod = Relay.HttpMethod.GET + var data = "" + // Check if rpc is a POST request + if rpc.isPOSTRequest { + httpMethod = Relay.HttpMethod.POST + data = rpc.payload ?? "" + } + // Add headers from RPC. + var headers = [String: String]() + for header in rpc.headers { + headers[header.field] = header.value + } + + let relay = Relay( + network: self.network, + netID: self.netID, + data: data, + devID: self.devID, + httpMethod: httpMethod, + path: rpc.endpoint, + queryParams: nil, + headers: nil + ) + + pocket.send( + relay: relay, + onSuccess: { (response) in + let data = response.data(using: .utf8) + let result = self.responseHandler.handleResponse( + response: nil, + data: data, + error: nil, + responseAdapterClass: rpc.responseAdapterClass + ) + self.callbackQueue.async { + completion(result) + } + }, + onError: { (error) in + let result = self.responseHandler.handleResponse( + response: nil, + data: nil, + error: error, + responseAdapterClass: rpc.responseAdapterClass + ) + self.callbackQueue.async { + completion(result) + } + } + ) + } + +} From 307d89b3de4cdd83b3927d8ea304e75ac29d053d Mon Sep 17 00:00:00 2001 From: Pabel Nunez Landestoy Date: Mon, 14 Oct 2019 16:29:04 -0400 Subject: [PATCH 03/25] added proper tests for Pocket Network --- Tests/TezosKit/PocketNetworkClientTest.swift | 186 +++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 Tests/TezosKit/PocketNetworkClientTest.swift diff --git a/Tests/TezosKit/PocketNetworkClientTest.swift b/Tests/TezosKit/PocketNetworkClientTest.swift new file mode 100644 index 00000000..3cbe7186 --- /dev/null +++ b/Tests/TezosKit/PocketNetworkClientTest.swift @@ -0,0 +1,186 @@ +// Copyright Keefer Taylor, 2019. + +@testable import TezosKit +import XCTest + +class PocketNetworkClientTest: XCTestCase { + public var networkClient: NetworkClient? + public let fakeURLSession = FakeURLSession() + public let callbackQueue: DispatchQueue = DispatchQueue(label: "callbackQueue") + // Setup + public override func setUp() { + super.setUp() + // Initialize PocketNetwork Client + networkClient = PocketNetworkClient( + devID: "", + netID: "MAINNET", + callbackQueue: callbackQueue, + responseHandler: RPCResponseHandler() + ) + } + // test + public func testRetrieveNetworkVersion() { + let expectation = XCTestExpectation(description: "Completion is Called") + // RPC endpoint will resolve to a valid URL. + let header = Header.init(field: "Content-Type", value: "application/json") + let rpc = RPC(endpoint: "/network/version", headers: [header], responseAdapterClass: StringResponseAdapter.self, payload: nil) + + networkClient?.send(rpc, completion: { (result) in + switch result { + case .failure: + XCTFail() + case .success: + expectation.fulfill() + } + }) + + wait(for: [expectation], timeout: 10) + } + public func testCallbackOnCorrectQueueForBadURL() { + let expectation = XCTestExpectation(description: "Completion is Called") + // RPC endpoint will not resolve to a valid URL. + let rpc = RPC(endpoint: "/ /\"test", responseAdapterClass: StringResponseAdapter.self) + networkClient?.send(rpc) { _ in + if #available(iOS 10, OSX 10.12, *) { + dispatchPrecondition(condition: .onQueue(self.callbackQueue)) + } + expectation.fulfill() + } + wait(for: [expectation], timeout: 10) + } + public func testCallbackOnCorrectQueue() { + let expectation = XCTestExpectation(description: "Completion is Called") + let rpc = RPC(endpoint: "/test", responseAdapterClass: StringResponseAdapter.self) + networkClient?.send(rpc) { _ in + if #available(iOS 10, OSX 10.12, *) { + dispatchPrecondition(condition: .onQueue(self.callbackQueue)) + } + expectation.fulfill() + } + wait(for: [expectation], timeout: 10) + } + public func testBadEndpointCompletesWithURL() { + let expectation = XCTestExpectation(description: "Completion is Called") + // RPC endpoint will not resolve to a valid URL. + let rpc = RPC(endpoint: "/ /\"test", responseAdapterClass: StringResponseAdapter.self) + networkClient?.send(rpc) { result in + switch result { + case .failure: + expectation.fulfill() + case .success: + XCTFail() + } + } + wait(for: [expectation], timeout: 20) + } + public func testBadHTTPResponseCompletesWithError() { + // Fake URL session has data but has an HTTP error code. + fakeURLSession.urlResponse = HTTPURLResponse( + url: URL(string: "http://keefertaylor.com")!, + statusCode: 400, + httpVersion: nil, + headerFields: nil + ) + fakeURLSession.data = "SomeString".data(using: .utf8) + let expectation = XCTestExpectation(description: "Completion is Called") + let rpc = RPC(endpoint: "/test", responseAdapterClass: StringResponseAdapter.self) + networkClient?.send(rpc) { result in + switch result { + case .failure: + expectation.fulfill() + case .success: + XCTFail() + } + } + wait(for: [expectation], timeout: 20) + } + public func testErrorCompletesWithError() { + // Valid HTTP response and data, but error is returned. + fakeURLSession.urlResponse = HTTPURLResponse( + url: URL(string: "http://keefertaylor.com")!, + statusCode: 200, + httpVersion: nil, + headerFields: nil + ) + fakeURLSession.data = "Result".data(using: .utf8) + fakeURLSession.error = TezosKitError(kind: .unknown, underlyingError: nil) + // Expectation + let expectation = XCTestExpectation(description: "Completion is Called") + let rpc = RPC(endpoint: "/test", responseAdapterClass: StringResponseAdapter.self) + networkClient?.send(rpc) { result in + switch result { + case .failure: + expectation.fulfill() + case .success: + XCTFail() + } + } + wait(for: [expectation], timeout: 20) + } + public func testNilDataCompletesWithError() { + // Valid HTTP response, but returned data is nil. + fakeURLSession.urlResponse = HTTPURLResponse( + url: URL(string: "http://keefertaylor.com")!, + statusCode: 200, + httpVersion: nil, + headerFields: nil + ) + // Expectation + let expectation = XCTestExpectation(description: "Completion is Called") + let rpc = RPC(endpoint: "/test", responseAdapterClass: StringResponseAdapter.self) + networkClient?.send(rpc) { result in + switch result { + case .failure: + expectation.fulfill() + case .success: + XCTFail() + } + } + wait(for: [expectation], timeout: 10) + } + public func testInocrrectDataCompletesWithError() { + // Response is a string but RPC attempts to decode to an int. + fakeURLSession.urlResponse = HTTPURLResponse( + url: URL(string: "http://keefertaylor.com")!, + statusCode: 200, + httpVersion: nil, + headerFields: nil + ) + // Expectation + let expectation = XCTestExpectation(description: "Completion is Called") + let rpc = RPC(endpoint: "/test", responseAdapterClass: IntegerResponseAdapter.self) + networkClient?.send(rpc) { result in + switch result { + case .failure: + expectation.fulfill() + case .success: + XCTFail() + } + } + wait(for: [expectation], timeout: 10) + } + public func testRequestCompletesWithResultAndNoError() { + // A valid response with not HTTP error. + let expectedString = "Expected!" + fakeURLSession.urlResponse = HTTPURLResponse( + url: URL(string: "http://keefertaylor.com")!, + statusCode: 200, + httpVersion: nil, + headerFields: nil + ) + fakeURLSession.data = expectedString.data(using: .utf8) + // Expectation + let expectation = XCTestExpectation(description: "Completion is Called") + let rpc = RPC(endpoint: "/test", responseAdapterClass: StringResponseAdapter.self) + networkClient?.send(rpc) { result in + switch result { + case .failure: + XCTFail() + case .success(let data): + XCTAssertEqual(data, expectedString) + expectation.fulfill() + } + } + wait(for: [expectation], timeout: 10) + } +} From 062aaab8b34fa40d12e1e232130dcec38723b254 Mon Sep 17 00:00:00 2001 From: Pabel Nunez Landestoy Date: Fri, 25 Oct 2019 09:54:03 -0400 Subject: [PATCH 04/25] Updated pocket tests, added dependency to podspec, updated PocketNetworkClient as per PR --- Tests/TezosKit/PocketNetworkClientTest.swift | 2 +- TezosKit.podspec | 17 +++++++++-------- TezosKit/Client/PocketNetworkClient.swift | 19 +++++++++++++------ 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/Tests/TezosKit/PocketNetworkClientTest.swift b/Tests/TezosKit/PocketNetworkClientTest.swift index 3cbe7186..c15ab55b 100644 --- a/Tests/TezosKit/PocketNetworkClientTest.swift +++ b/Tests/TezosKit/PocketNetworkClientTest.swift @@ -22,7 +22,7 @@ class PocketNetworkClientTest: XCTestCase { public func testRetrieveNetworkVersion() { let expectation = XCTestExpectation(description: "Completion is Called") // RPC endpoint will resolve to a valid URL. - let header = Header.init(field: "Content-Type", value: "application/json") + let header = Header.contentTypeApplicationJSON let rpc = RPC(endpoint: "/network/version", headers: [header], responseAdapterClass: StringResponseAdapter.self, payload: nil) networkClient?.send(rpc, completion: { (result) in diff --git a/TezosKit.podspec b/TezosKit.podspec index aa7510b7..8e6672ed 100644 --- a/TezosKit.podspec +++ b/TezosKit.podspec @@ -15,31 +15,32 @@ Pod::Spec.new do |s| s.ios.deployment_target = "10.0" s.osx.deployment_target = "10.14" s.default_subspecs = 'TezosKitCore', 'TezosKitPromises' - + s.subspec 'TezosKitCore' do |ss| ss.source_files = "TezosKit/**/*.swift" ss.frameworks = 'Foundation' - + ss.ios.deployment_target = '10.0' ss.osx.deployment_target = '10.14' - + ss.dependency "BigInt" ss.dependency "MnemonicKit" ss.dependency "TezosCrypto" + ss.dependency "PocketSwift-Core" end - + s.subspec 'TezosKitPromises' do |ss| ss.source_files = "Extensions/PromiseKit/*.swift" ss.frameworks = 'Foundation' - + ss.ios.deployment_target = '10.0' ss.osx.deployment_target = '10.14' - - ss.dependency 'TezosKit/TezosKitCore' + + ss.dependency 'TezosKit/TezosKitCore' ss.dependency "PromiseKit" end s.test_spec "Tests" do |test_spec| test_spec.source_files = ["Tests/*.swift", "Tests/TezosKit/*.swift", "Tests/Extensions/PromiseKit/*.swift"] - end + end end diff --git a/TezosKit/Client/PocketNetworkClient.swift b/TezosKit/Client/PocketNetworkClient.swift index 3726ce69..c475ad63 100644 --- a/TezosKit/Client/PocketNetworkClient.swift +++ b/TezosKit/Client/PocketNetworkClient.swift @@ -2,14 +2,17 @@ import Foundation import PocketSwift - +/// Pocket Network provides a trustless API Layer, allowing easy acccess to the Tezos Network +/// The PocketNetworkClient classs is an implementation of the NetworkClient protocol +/// Adds the necesary information to interact with the Pocket Network public class PocketNetworkClient: NetworkClient { - /// Network name private let network = "TEZOS" /// Network ID private let netID: String /// Developer ID + /// NOTE: All Pocket tests require a DeveloperID, + /// For more information visit: https://docs.pokt.network/docs/how-to-participate private let devID: String /// Pocket Instance that will relay requests private let pocket: Pocket @@ -28,19 +31,23 @@ public class PocketNetworkClient: NetworkClient { /// - headers: Headers which will be added to every request. /// - callbackQueue: A dispatch queue that callbacks will be made on. /// - responseHandler: An object which will handle responses. + /// - maxNodes: (Optional) Max amount of nodes to be stored in the instance . + /// - requestTimeOut: (Optional) Maximum timeout for each request. public init( devID: String, netID: String, headers: [Header] = [], callbackQueue: DispatchQueue, - responseHandler: RPCResponseHandler + responseHandler: RPCResponseHandler, + maxNodes: Int = 10, + requestTimeOut: Int = 10000 ) { self.netID = netID self.devID = devID self.headers = headers self.callbackQueue = callbackQueue self.responseHandler = responseHandler - self.pocket = Pocket(devID: devID, network: network, netID: netID, maxNodes: 10, requestTimeOut: 10_000) + self.pocket = Pocket(devID: devID, network: network, netID: netID, maxNodes: maxNodes, requestTimeOut: requestTimeOut) } public func send(_ rpc: RPC, callbackQueue: DispatchQueue?, completion: @escaping (Result) -> Void) { @@ -72,7 +79,7 @@ public class PocketNetworkClient: NetworkClient { pocket.send( relay: relay, - onSuccess: { (response) in + onSuccess: { response in let data = response.data(using: .utf8) let result = self.responseHandler.handleResponse( response: nil, @@ -84,7 +91,7 @@ public class PocketNetworkClient: NetworkClient { completion(result) } }, - onError: { (error) in + onError: { error in let result = self.responseHandler.handleResponse( response: nil, data: nil, From 1bd09254bd13b27fc2b9d4ac179946ea451f7ce0 Mon Sep 17 00:00:00 2001 From: Keefer Taylor Date: Sun, 27 Oct 2019 19:58:41 -0600 Subject: [PATCH 05/25] Add cocoapods to CI script Run `pod lib lint` in addition to Carthage --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index cd33be70..06387240 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,7 @@ after_deploy: script: - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty +- pod lib lint after_success: - slather - bash <(curl -s https://codecov.io/bash) From defa8575b5a6b099e2dfbeb60af0898ee0b95c5b Mon Sep 17 00:00:00 2001 From: Keefer Taylor Date: Sun, 27 Oct 2019 20:01:50 -0600 Subject: [PATCH 06/25] Update Gemfile --- Gemfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 68a822af..ac494816 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,3 @@ -gem 'cocoapods' -gem 'slather' \ No newline at end of file +source 'https://rubygems.org' + +gem 'slather' From 6f8939d501c0714a771099c7295498c50e98ab8f Mon Sep 17 00:00:00 2001 From: Keefer Taylor Date: Sun, 27 Oct 2019 20:03:25 -0600 Subject: [PATCH 07/25] HomeBrew script updates Update homebrew and install Carthage / CocoaPods if needed --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 06387240..ea02da07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,9 @@ env: secure: ink5jhbtR9aGbiVzcrPP+jBLtYKmZ61uxmXmqwqsyAZip2zbL/tktXdLaeNhUnlJHazZF156rOFe5DFSElFmNYvpSZrXJCVMxwWKB+MJWQ879LUk6W4W65jTvkXKZmMrrUqwkOTNNMq0ycfs5tx+eFJBzHd3Z93OX0oKwb44ZjC1NC05LGJfOlZQs+7IWYKXu0XKpZ/Zo+n4jGxMPEaQCMifz8ac8WVAgsgXs5R3ANrAd6AtBHZqNLu+NzGi5FQ2u7M1EERWo69qAmmHQYKB9aYyERi4cU6KD3XF8B89szR3pH41avfYFs+ZqenF7yAm0dN5UoLBqHA5s+yBQ1kzZbvcCunEU88XjgeRuzwTUfyTq8RIN+BNzaAwSCgu/fNMaFLOZjYAXK+gtVm2elx69maC6N+hKpZblmgUtmaOQyXzY3pVNXdqCqqqzIrqSyvqPuuNSzLxjVFJUW8ycYEfB4Iywcwl74IlxWJ58WpeCgMW3cVE4l4kxw+ZWoVniumpVlp69QtgwHloUosOzmzoIwLjgEm6uGZvr3DIKKXwLZACtq8Oj7uhm8iNV4sU5eS0w+b+VC6gYCxI4yOZHWhwtBG4QtrKlEvXC0Gjy4rIXN0JuKiAHLZKiCr0YuCmks2xXv2INNnJAIBVlJ7URVY4OSY+eqCiWUSobO8n48Zu7gk= before_install: - gem install slather -- gem install cocoapods +- brew update +- brew outdated carthage || brew upgrade carthage +- brew outdated cocoapods || brew upgrade cocoapods - travis_wait 120 carthage bootstrap --platform iOS --no-use-binaries before_deploy: - travis_wait 120 carthage build --no-skip-current --platform iOS --cache-builds From 35a80176f805cddbc56d36720da96379f1c45ae2 Mon Sep 17 00:00:00 2001 From: Keefer Taylor Date: Sun, 27 Oct 2019 21:28:24 -0600 Subject: [PATCH 08/25] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ea02da07..0adb8ea1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,9 +17,9 @@ before_deploy: after_deploy: - travis_wait 120 pod trunk push --skip-import-validation --skip-tests --allow-warnings script: +- pod lib lint - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty -- pod lib lint after_success: - slather - bash <(curl -s https://codecov.io/bash) From aae70542d488936fc993b3da09bbf80959a90560 Mon Sep 17 00:00:00 2001 From: Keefer Taylor Date: Sat, 2 Nov 2019 11:29:08 -0700 Subject: [PATCH 09/25] Split travis into jobs --- .travis.yml | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0adb8ea1..7326f2c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,27 +10,15 @@ before_install: - brew update - brew outdated carthage || brew upgrade carthage - brew outdated cocoapods || brew upgrade cocoapods -- travis_wait 120 carthage bootstrap --platform iOS --no-use-binaries -before_deploy: -- travis_wait 120 carthage build --no-skip-current --platform iOS --cache-builds -- carthage archive $FRAMEWORK_NAME -after_deploy: -- travis_wait 120 pod trunk push --skip-import-validation --skip-tests --allow-warnings -script: -- pod lib lint -- set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone - XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty -after_success: -- slather -- bash <(curl -s https://codecov.io/bash) -after_failure: -- cat /var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/*.log -deploy: - provider: releases - api_key: - secure: md8YfrZO/5WKAPmiIInTk7oWtc/B5FmibnEfwXeCGiVa+0N6CtcJNdQYFmYCxEm7+JCPXBKakk2UFM0T1eOAKOvnwqkxy+xP1aAxvjAP+1hpt8OVGtkXdmemoXNdxoQq+qqGLtfVtr5cVdeL1sqnpfKOdUQeCZXYcy8LL3oOuMwh3jn9bZbctVYTs7L1UD/p8tEFTdfxLxropQ+u96mXb1kmVkqKwzU4Sro6D9opHaGW2aHIJF3CVVAELr/pICM14HwMCvqhpZ8q3z9FhIdFab9EaFGZE9c7w00q+2wUdl0uoQJ7oe2nCtCYJj6Hh7onRUyc81e/MepEdQHyD5jLGmKbPpPFdGM+BjtVUfdvPAzV5kAp88HuqBAn++BVm2cT4wtawsUFsC4lnfR+0vBAxFU69L7JhxT744bc+X58XS+UUBFcAJsYlDU579iZWP0xFzZHjy+2q8PzuB/2iqY1n3aeSkkrHt7meAlmepzQUdJIM3BqUfibW/fqL/A5uhSOCHeaH70r24CkBlaUlQcOWUv5V48j99cae9vlNE/PJ68cC94LVz1t7jDM98sU6dCs7vgkPkYI4QzBKbnqCRk0MdvdwwATadmhjOJKtmJxm8tDmPAf4Gp9tLzCuDaokCd2HJpWUotmHy1DkM6+xGX4i3s21aU0U81bgQgYJFV1BWk= - file: "$FRAMEWORK_NAME.framework.zip" - skip_cleanup: true - on: - repo: keefertaylor/TezosKit - tags: true + +jobs: + include: + - stage: Build Carthage + script: + - xcodegen generate + - travis_wait 500 carthage bootstrap --platform iOS --no-use-binaries --verbose + - set -o pipefail && xcodebuild test -scheme TezosKit_iOS -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty + - slather + - bash <(curl -s https://codecov.io/bash) + - stage: Build CocoaPods + script: travis_wait 500 pod lib lint From acce7af7ea41e893886e2c9ebf2cae8586137825 Mon Sep 17 00:00:00 2001 From: Keefer Taylor Date: Sat, 2 Nov 2019 13:14:07 -0700 Subject: [PATCH 10/25] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 7326f2c0..e7b84077 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ before_install: - brew update - brew outdated carthage || brew upgrade carthage - brew outdated cocoapods || brew upgrade cocoapods +- brew install xcodegen jobs: include: From 7d551aff48258eb8f38cd3c01ed0e87688b43d2a Mon Sep 17 00:00:00 2001 From: Keefer Taylor Date: Sat, 2 Nov 2019 13:19:39 -0700 Subject: [PATCH 11/25] Update .travis.yml --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e7b84077..41ecbe1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,15 +10,13 @@ before_install: - brew update - brew outdated carthage || brew upgrade carthage - brew outdated cocoapods || brew upgrade cocoapods -- brew install xcodegen jobs: include: - stage: Build Carthage script: - - xcodegen generate - travis_wait 500 carthage bootstrap --platform iOS --no-use-binaries --verbose - - set -o pipefail && xcodebuild test -scheme TezosKit_iOS -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty + - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty - slather - bash <(curl -s https://codecov.io/bash) - stage: Build CocoaPods From 767de8e43f9d851962744200ee52a168f76b341e Mon Sep 17 00:00:00 2001 From: Keefer Taylor Date: Sat, 2 Nov 2019 14:14:09 -0700 Subject: [PATCH 12/25] Update .travis.yml --- .travis.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 41ecbe1d..6e039312 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,11 +13,11 @@ before_install: jobs: include: - - stage: Build Carthage - script: - - travis_wait 500 carthage bootstrap --platform iOS --no-use-binaries --verbose - - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty - - slather - - bash <(curl -s https://codecov.io/bash) +# - stage: Build Carthage +# script: +# - travis_wait 500 carthage bootstrap --platform iOS --no-use-binaries --verbose +# - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty +# - slather +# - bash <(curl -s https://codecov.io/bash) - stage: Build CocoaPods - script: travis_wait 500 pod lib lint + script: travis_wait 500 pod lib lint --verbose From be044b606336c6e117ee1bae12fb2d7ac76bd03b Mon Sep 17 00:00:00 2001 From: Keefer Taylor Date: Sat, 2 Nov 2019 14:25:05 -0700 Subject: [PATCH 13/25] Update .travis.yml --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e039312..5996dda4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,5 +19,7 @@ jobs: # - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty # - slather # - bash <(curl -s https://codecov.io/bash) - - stage: Build CocoaPods - script: travis_wait 500 pod lib lint --verbose + - stage: Build CocoaPods + script: + - pod repo update + - travis_wait 500 pod lib lint --verbose From 04199ceb3f38e768b3462ef5a5273179f14a7940 Mon Sep 17 00:00:00 2001 From: keefertaylor Date: Sat, 2 Nov 2019 14:43:03 -0700 Subject: [PATCH 14/25] fix test --- Tests/TezosKit/OriginationOperationTest.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tests/TezosKit/OriginationOperationTest.swift b/Tests/TezosKit/OriginationOperationTest.swift index 4a1e0156..768680f2 100644 --- a/Tests/TezosKit/OriginationOperationTest.swift +++ b/Tests/TezosKit/OriginationOperationTest.swift @@ -6,7 +6,11 @@ import XCTest class OriginationOperationTest: XCTestCase { public func testDictionaryRepresentation() { let address = "tz1abc123" - let operation = OperationFactory.testFactory.originationOperation(address: address) + let operation = OperationFactory.testFactory.originationOperation( + address: address, + operationFeePolicy: .default, + signatureProvider: FakeSignatureProvider.testProvider + ) let dictionary = operation.dictionaryRepresentation XCTAssertNotNil(dictionary["manager_pubkey"]) From a2d7c958200d190ec0869aa809302ee68efcce91 Mon Sep 17 00:00:00 2001 From: keefertaylor Date: Sat, 2 Nov 2019 14:53:52 -0700 Subject: [PATCH 15/25] re-enable carthage build --- .travis.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5996dda4..4ab91cad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ osx_image: xcode10.2 language: swift -cache: - directories: +cache: + directories: - Carthage env: secure: ink5jhbtR9aGbiVzcrPP+jBLtYKmZ61uxmXmqwqsyAZip2zbL/tktXdLaeNhUnlJHazZF156rOFe5DFSElFmNYvpSZrXJCVMxwWKB+MJWQ879LUk6W4W65jTvkXKZmMrrUqwkOTNNMq0ycfs5tx+eFJBzHd3Z93OX0oKwb44ZjC1NC05LGJfOlZQs+7IWYKXu0XKpZ/Zo+n4jGxMPEaQCMifz8ac8WVAgsgXs5R3ANrAd6AtBHZqNLu+NzGi5FQ2u7M1EERWo69qAmmHQYKB9aYyERi4cU6KD3XF8B89szR3pH41avfYFs+ZqenF7yAm0dN5UoLBqHA5s+yBQ1kzZbvcCunEU88XjgeRuzwTUfyTq8RIN+BNzaAwSCgu/fNMaFLOZjYAXK+gtVm2elx69maC6N+hKpZblmgUtmaOQyXzY3pVNXdqCqqqzIrqSyvqPuuNSzLxjVFJUW8ycYEfB4Iywcwl74IlxWJ58WpeCgMW3cVE4l4kxw+ZWoVniumpVlp69QtgwHloUosOzmzoIwLjgEm6uGZvr3DIKKXwLZACtq8Oj7uhm8iNV4sU5eS0w+b+VC6gYCxI4yOZHWhwtBG4QtrKlEvXC0Gjy4rIXN0JuKiAHLZKiCr0YuCmks2xXv2INNnJAIBVlJ7URVY4OSY+eqCiWUSobO8n48Zu7gk= @@ -13,13 +13,13 @@ before_install: jobs: include: -# - stage: Build Carthage -# script: -# - travis_wait 500 carthage bootstrap --platform iOS --no-use-binaries --verbose -# - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty -# - slather -# - bash <(curl -s https://codecov.io/bash) - - stage: Build CocoaPods + - stage: Build Carthage + script: + - travis_wait 500 carthage bootstrap --platform iOS --no-use-binaries --verbose + - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty + - slather + - bash <(curl -s https://codecov.io/bash) + - stage: Build CocoaPods script: - pod repo update - travis_wait 500 pod lib lint --verbose From a57ba6ea4ce9699b5bcd53c5b7eef99fb528126b Mon Sep 17 00:00:00 2001 From: keefertaylor Date: Sat, 2 Nov 2019 15:18:50 -0700 Subject: [PATCH 16/25] Try to speed up cocoapods build --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ab91cad..c40be10b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,20 +6,20 @@ cache: env: secure: ink5jhbtR9aGbiVzcrPP+jBLtYKmZ61uxmXmqwqsyAZip2zbL/tktXdLaeNhUnlJHazZF156rOFe5DFSElFmNYvpSZrXJCVMxwWKB+MJWQ879LUk6W4W65jTvkXKZmMrrUqwkOTNNMq0ycfs5tx+eFJBzHd3Z93OX0oKwb44ZjC1NC05LGJfOlZQs+7IWYKXu0XKpZ/Zo+n4jGxMPEaQCMifz8ac8WVAgsgXs5R3ANrAd6AtBHZqNLu+NzGi5FQ2u7M1EERWo69qAmmHQYKB9aYyERi4cU6KD3XF8B89szR3pH41avfYFs+ZqenF7yAm0dN5UoLBqHA5s+yBQ1kzZbvcCunEU88XjgeRuzwTUfyTq8RIN+BNzaAwSCgu/fNMaFLOZjYAXK+gtVm2elx69maC6N+hKpZblmgUtmaOQyXzY3pVNXdqCqqqzIrqSyvqPuuNSzLxjVFJUW8ycYEfB4Iywcwl74IlxWJ58WpeCgMW3cVE4l4kxw+ZWoVniumpVlp69QtgwHloUosOzmzoIwLjgEm6uGZvr3DIKKXwLZACtq8Oj7uhm8iNV4sU5eS0w+b+VC6gYCxI4yOZHWhwtBG4QtrKlEvXC0Gjy4rIXN0JuKiAHLZKiCr0YuCmks2xXv2INNnJAIBVlJ7URVY4OSY+eqCiWUSobO8n48Zu7gk= before_install: -- gem install slather - brew update -- brew outdated carthage || brew upgrade carthage -- brew outdated cocoapods || brew upgrade cocoapods jobs: include: - stage: Build Carthage script: + - gem install slather + - brew outdated carthage || brew upgrade carthage - travis_wait 500 carthage bootstrap --platform iOS --no-use-binaries --verbose - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty - slather - bash <(curl -s https://codecov.io/bash) - stage: Build CocoaPods script: + - brew outdated cocoapods || brew upgrade cocoapods - pod repo update - - travis_wait 500 pod lib lint --verbose + - travis_wait 500 pod lib lint --platforms=ios --verbose From 66f33a1c9c7c094630a286f3e8dfc6b0d2801179 Mon Sep 17 00:00:00 2001 From: keefertaylor Date: Sat, 2 Nov 2019 15:29:29 -0700 Subject: [PATCH 17/25] disable carthage for debugging --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index c40be10b..da97cc97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,14 +10,14 @@ before_install: jobs: include: - - stage: Build Carthage - script: - - gem install slather - - brew outdated carthage || brew upgrade carthage - - travis_wait 500 carthage bootstrap --platform iOS --no-use-binaries --verbose - - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty - - slather - - bash <(curl -s https://codecov.io/bash) + # - stage: Build Carthage + # script: + # - gem install slather + # - brew outdated carthage || brew upgrade carthage + # - travis_wait 500 carthage bootstrap --platform iOS --no-use-binaries --verbose + # - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty + # - slather + # - bash <(curl -s https://codecov.io/bash) - stage: Build CocoaPods script: - brew outdated cocoapods || brew upgrade cocoapods From abb2c639bb7a4e62ec2ca79776c47f320373f3e6 Mon Sep 17 00:00:00 2001 From: keefertaylor Date: Sat, 2 Nov 2019 17:12:41 -0700 Subject: [PATCH 18/25] fix test --- Tests/TezosKit/OriginationOperationTest.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/TezosKit/OriginationOperationTest.swift b/Tests/TezosKit/OriginationOperationTest.swift index 768680f2..9cabd93a 100644 --- a/Tests/TezosKit/OriginationOperationTest.swift +++ b/Tests/TezosKit/OriginationOperationTest.swift @@ -9,7 +9,7 @@ class OriginationOperationTest: XCTestCase { let operation = OperationFactory.testFactory.originationOperation( address: address, operationFeePolicy: .default, - signatureProvider: FakeSignatureProvider.testProvider + signatureProvider: FakeSignatureProvider.testSignatureProvider ) let dictionary = operation.dictionaryRepresentation From abfbc85056603328f541be3d20a1e22cb9bc8002 Mon Sep 17 00:00:00 2001 From: keefertaylor Date: Sat, 2 Nov 2019 17:13:19 -0700 Subject: [PATCH 19/25] try to speed up travis further --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index da97cc97..3f0ba221 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,4 +22,4 @@ jobs: script: - brew outdated cocoapods || brew upgrade cocoapods - pod repo update - - travis_wait 500 pod lib lint --platforms=ios --verbose + - travis_wait 500 pod lib lint --fail-fast --use-libraries --platforms=ios --skip-import-validation --skip-tests --verbose From 45426e8c00ffbdc31ec054d7aba343d473903a50 Mon Sep 17 00:00:00 2001 From: keefertaylor Date: Sat, 2 Nov 2019 18:00:52 -0700 Subject: [PATCH 20/25] re-enable carthage --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3f0ba221..8d104b56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,14 +10,14 @@ before_install: jobs: include: - # - stage: Build Carthage - # script: - # - gem install slather - # - brew outdated carthage || brew upgrade carthage - # - travis_wait 500 carthage bootstrap --platform iOS --no-use-binaries --verbose - # - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty - # - slather - # - bash <(curl -s https://codecov.io/bash) + - stage: Build Carthage + script: + - gem install slather + - brew outdated carthage || brew upgrade carthage + - travis_wait 500 carthage bootstrap --platform iOS --no-use-binaries --verbose + - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty + - slather + - bash <(curl -s https://codecov.io/bash) - stage: Build CocoaPods script: - brew outdated cocoapods || brew upgrade cocoapods From 47ac72d32523f682db9d98aeeaccca63c40084dd Mon Sep 17 00:00:00 2001 From: Keefer Taylor Date: Sat, 2 Nov 2019 18:23:31 -0700 Subject: [PATCH 21/25] Update OriginationOperationTest.swift --- Tests/TezosKit/OriginationOperationTest.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/TezosKit/OriginationOperationTest.swift b/Tests/TezosKit/OriginationOperationTest.swift index 9cabd93a..05a9b332 100644 --- a/Tests/TezosKit/OriginationOperationTest.swift +++ b/Tests/TezosKit/OriginationOperationTest.swift @@ -10,7 +10,7 @@ class OriginationOperationTest: XCTestCase { address: address, operationFeePolicy: .default, signatureProvider: FakeSignatureProvider.testSignatureProvider - ) + )! let dictionary = operation.dictionaryRepresentation XCTAssertNotNil(dictionary["manager_pubkey"]) From c1e54802efa351888ba07f8fd4cc7453c2e55f5c Mon Sep 17 00:00:00 2001 From: Keefer Taylor Date: Sun, 3 Nov 2019 11:38:47 -0800 Subject: [PATCH 22/25] Reverse order --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8d104b56..42336bf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,11 @@ before_install: jobs: include: + - stage: Build CocoaPods + script: + - brew outdated cocoapods || brew upgrade cocoapods + - pod repo update + - travis_wait 500 pod lib lint --fail-fast --use-libraries --platforms=ios --skip-import-validation --skip-tests --verbose - stage: Build Carthage script: - gem install slather @@ -18,8 +23,3 @@ jobs: - set -o pipefail && xcodebuild test -scheme TezosKit -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty - slather - bash <(curl -s https://codecov.io/bash) - - stage: Build CocoaPods - script: - - brew outdated cocoapods || brew upgrade cocoapods - - pod repo update - - travis_wait 500 pod lib lint --fail-fast --use-libraries --platforms=ios --skip-import-validation --skip-tests --verbose From d73653d43be2ca091272b7428b3c71270a5b9fc3 Mon Sep 17 00:00:00 2001 From: Pabel Nunez Landestoy Date: Tue, 26 Nov 2019 10:42:13 -0400 Subject: [PATCH 23/25] updated cartfile.resolved --- Cartfile.resolved | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cartfile.resolved b/Cartfile.resolved index bca9a9a8..681edb5a 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -6,9 +6,9 @@ github "attaswift/BigInt" "v3.1.0" github "attaswift/SipHash" "v1.2.2" github "jedisct1/swift-sodium" "0.8.0" github "jimisaacs/SwiftKeychainWrapper" "65c16da7399dd539322203558160fa349a1e27d3" -github "keefertaylor/Base58Swift" "2.1.0" -github "keefertaylor/MnemonicKit" "1.3.7" -github "keefertaylor/TezosCrypto" "2.1.1" +github "keefertaylor/Base58Swift" "2.1.7" +github "keefertaylor/MnemonicKit" "1.3.9" +github "keefertaylor/TezosCrypto" "2.1.3" github "krzyzanowskim/CryptoSwift" "0.14.0" -github "mxcl/PromiseKit" "6.11.0" -github "pokt-network/pocket-swift-core-carthage" "v.0.0.2" +github "mxcl/PromiseKit" "6.12.0" +github "pokt-network/pocket-swift-core-carthage" "0.0.1" From 75ee32f9a5f7ab05047c9b68e6e869c3ac84380b Mon Sep 17 00:00:00 2001 From: Pabel Nunez Landestoy Date: Tue, 31 Dec 2019 12:07:02 -0400 Subject: [PATCH 24/25] added build script to retrieve the pocket dev id from a environment variable --- TezosKit.xcodeproj/project.pbxproj | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/TezosKit.xcodeproj/project.pbxproj b/TezosKit.xcodeproj/project.pbxproj index 4f829f79..3410edff 100644 --- a/TezosKit.xcodeproj/project.pbxproj +++ b/TezosKit.xcodeproj/project.pbxproj @@ -226,6 +226,8 @@ C5E729542349BD0400155217 /* PocketNetworkClientTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5E72952234997D200155217 /* PocketNetworkClientTest.swift */; }; C5E729562349CFB300155217 /* PocketSwift.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C5E729552349CFB300155217 /* PocketSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; C5E72957234A567900155217 /* PocketSwift.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = C5E729552349CFB300155217 /* PocketSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C5ED751D23A1923500A36F7E /* ci_config.json in Resources */ = {isa = PBXBuildFile; fileRef = C5ED751C23A1923500A36F7E /* ci_config.json */; }; + C5ED751E23A1953500A36F7E /* ci_config.json in Resources */ = {isa = PBXBuildFile; fileRef = C5ED751C23A1923500A36F7E /* ci_config.json */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -337,7 +339,6 @@ 779A9C73230E0824004C6575 /* TokenContractClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokenContractClient.swift; sourceTree = ""; }; 779A9C76230E09DB004C6575 /* TokenContractIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokenContractIntegrationTests.swift; sourceTree = ""; }; 779A9C78230E2C4A004C6575 /* FeeEstimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeeEstimator.swift; sourceTree = ""; }; - 779A9C7C230E320B004C6575 /* FeeEstimatorTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeeEstimatorTest.swift; sourceTree = ""; }; 779A9C7F230E3CCF004C6575 /* TokenContractClientTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokenContractClientTests.swift; sourceTree = ""; }; 779A9C81230E457A004C6575 /* DexterExchangeClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DexterExchangeClient.swift; sourceTree = ""; }; 779A9C84230E4707004C6575 /* DexterExchangeClientIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DexterExchangeClientIntegrationTests.swift; sourceTree = ""; }; @@ -500,6 +501,7 @@ C5E729502349973500155217 /* PocketNetworkClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PocketNetworkClient.swift; sourceTree = ""; }; C5E72952234997D200155217 /* PocketNetworkClientTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PocketNetworkClientTest.swift; sourceTree = ""; }; C5E729552349CFB300155217 /* PocketSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PocketSwift.framework; path = Carthage/Build/iOS/PocketSwift.framework; sourceTree = ""; }; + C5ED751C23A1923500A36F7E /* ci_config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ci_config.json; sourceTree = SOURCE_ROOT; }; F4F69CEC90588DB51FE973FC /* Pods_TezosKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TezosKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -695,6 +697,7 @@ 77CE35A321F7DC76006ADABA /* Tests */ = { isa = PBXGroup; children = ( + C5ED751C23A1923500A36F7E /* ci_config.json */, 77B1EAFB2228C03400EA4FCE /* TestObjects.swift */, 7776493A227616B200451DD5 /* FakeObjects.swift */, 77FE788322EEA29300B85B9D /* TestHelpers.swift */, @@ -1007,6 +1010,7 @@ 77CE359421F7DC76006ADABA /* Resources */, 77CE362D21F7EED8006ADABA /* Copy Files */, 77CE362E21F7EEE2006ADABA /* Carthage */, + C5A6258D239942EC00EC9155 /* ShellScript */, ); buildRules = ( ); @@ -1092,6 +1096,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + C5ED751D23A1923500A36F7E /* ci_config.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1099,6 +1104,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + C5ED751E23A1953500A36F7E /* ci_config.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1164,6 +1170,23 @@ shellScript = " "; }; + C5A6258D239942EC00EC9155 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nsource ~/.bash_profile\ndevID=\"{\\\"POCKET_DEV_ID\\\": \\\"$POCKET_DEV_ID\\\"}\"\necho \"${devID}\" > ci_config.json\n"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -1320,7 +1343,6 @@ 77FE788222EE913300B85B9D /* GetBigMapValueRPCTest.swift in Sources */, 77CE36FE21F7F49F006ADABA /* GetBallotsRPCTest.swift in Sources */, 77CE36F221F7F49F006ADABA /* JSONDictionaryResponseAdapterTest.swift in Sources */, - 779A9C7D230E320C004C6575 /* FeeEstimatorTest.swift in Sources */, 77CE36E121F7F49F006ADABA /* RevealOperationTest.swift in Sources */, 77CE36FF21F7F49F006ADABA /* PeriodKindResponseAdapterTest.swift in Sources */, 77B1EB08222A179F00EA4FCE /* OperationWithCounterTest.swift in Sources */, From a53ab898e84a68d7435406181b18838c52cdf094 Mon Sep 17 00:00:00 2001 From: Pabel Nunez Landestoy Date: Tue, 31 Dec 2019 12:07:43 -0400 Subject: [PATCH 25/25] added ci configuration file fortesting, updated pocket network tests --- Tests/TezosKit/PocketNetworkClientTest.swift | 16 +++++++++++++++- ci_config.json | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ci_config.json diff --git a/Tests/TezosKit/PocketNetworkClientTest.swift b/Tests/TezosKit/PocketNetworkClientTest.swift index c15ab55b..a8a95b56 100644 --- a/Tests/TezosKit/PocketNetworkClientTest.swift +++ b/Tests/TezosKit/PocketNetworkClientTest.swift @@ -7,12 +7,26 @@ class PocketNetworkClientTest: XCTestCase { public var networkClient: NetworkClient? public let fakeURLSession = FakeURLSession() public let callbackQueue: DispatchQueue = DispatchQueue(label: "callbackQueue") + public var pocket_dev_id = "" // Setup public override func setUp() { super.setUp() + + if let path = Bundle(for: type(of: self)).path(forResource: "ci_config", ofType: "json") { + do { + let data = try Data(contentsOf: URL(fileURLWithPath: path), options: .mappedIfSafe) + let jsonResult = try JSONSerialization.jsonObject(with: data, options: .mutableLeaves) + if let jsonResult = jsonResult as? Dictionary, let dev_id = jsonResult["POCKET_DEV_ID"] as? String { + self.pocket_dev_id = dev_id + } + } catch { + print("Failed to retrieve the Pocket DevID with error: \(error)") + XCTFail() + } + } // Initialize PocketNetwork Client networkClient = PocketNetworkClient( - devID: "", + devID: self.pocket_dev_id, netID: "MAINNET", callbackQueue: callbackQueue, responseHandler: RPCResponseHandler() diff --git a/ci_config.json b/ci_config.json new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/ci_config.json @@ -0,0 +1 @@ +