Skip to content

Commit

Permalink
Merge pull request #62 from XYOracleNetwork/develop
Browse files Browse the repository at this point in the history
update includes timing change for bridge send, refactor, and readme u…
  • Loading branch information
Phillip Lorenzo authored Apr 24, 2020
2 parents 041b1f2 + 06c747c commit 04c77c3
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 68 deletions.
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ platform :ios, '11.0'
use_frameworks!

target 'iOSExample' do
pod 'sdk-xyo-swift', '~> 1.0.11'
pod 'sdk-xyo-swift', '~> 1.0.16'
end
16 changes: 8 additions & 8 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ PODS:
- PromisesObjC (1.2.8)
- PromisesSwift (1.2.8):
- PromisesObjC (= 1.2.8)
- sdk-core-swift (3.1.2):
- sdk-core-swift (3.1.6):
- secp256k1.swift
- sdk-xyo-swift (1.0.11):
- sdk-core-swift (~> 3.1.2)
- XyBleSdk (~> 3.1.2)
- sdk-xyo-swift (1.0.16):
- sdk-core-swift (~> 3.1.3)
- XyBleSdk (~> 3.1.6)
- secp256k1.swift (0.1.4)
- XyBaseSdk (1.0.1):
- PromisesSwift
- XyBleSdk (3.1.6):
- XyBaseSdk

DEPENDENCIES:
- sdk-xyo-swift (~> 1.0.11)
- sdk-xyo-swift (~> 1.0.16)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
Expand All @@ -29,12 +29,12 @@ SPEC REPOS:
SPEC CHECKSUMS:
PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
PromisesSwift: 37bad6f4daddb02f7c9c531efe91e8b21c13ee2f
sdk-core-swift: 9f7c3edb2bc9819b5b0a64cdaf8a6eedcbd58ca2
sdk-xyo-swift: 6facd5b60ddda5c685678f6232c6b923f7f169ba
sdk-core-swift: d9de800e89efd5f7d43d1e1bbf689c5538000eb8
sdk-xyo-swift: a85bc7781c7ee033eb047e96c032fc203f541851
secp256k1.swift: a7e7a214f6db6ce5db32cc6b2b45e5c4dd633634
XyBaseSdk: 679d4f8ddbfc70ec1ff8a4cbdccf5bf81a1894f2
XyBleSdk: be5259286588d290cf79d9dfe2dce193de504f49

PODFILE CHECKSUM: 8353ccfd77c4fa8b52aedb3fe7cff162becc3af8
PODFILE CHECKSUM: 4ef3249114a259f359462e3b9fcbdbc396364506

COCOAPODS: 1.9.1
74 changes: 37 additions & 37 deletions Example/XyoSdkExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
0AEC98B623592F4B00E47796 /* iOSExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AEC98B523592F4B00E47796 /* iOSExampleUITests.swift */; };
0AEC9921235935DB00E47796 /* XyoExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AEC9920235935DB00E47796 /* XyoExampleViewController.swift */; };
0AEC995E235A3EAE00E47796 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0AEC995D235A3EAE00E47796 /* Main.storyboard */; };
431751F0486D04551417E615 /* Pods_iOSExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CE61CB1F1B5AFE9D3917B17 /* Pods_iOSExample.framework */; };
9EB5192E4CF24D4172F0D15F /* Pods_iOSExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC7D7BFAE01709D1207879D5 /* Pods_iOSExample.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -44,10 +44,10 @@
0AEC9920235935DB00E47796 /* XyoExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XyoExampleViewController.swift; sourceTree = "<group>"; };
0AEC995D235A3EAE00E47796 /* Main.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
324EA14AF326520A70B6AE7C /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
4CE61CB1F1B5AFE9D3917B17 /* Pods_iOSExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iOSExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5882E7006B1D2655A2EA82FD /* Pods-iOSExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOSExample.release.xcconfig"; path = "Target Support Files/Pods-iOSExample/Pods-iOSExample.release.xcconfig"; sourceTree = "<group>"; };
94D24B3FC73A22A86214F8B7 /* sdk-xyo-swift.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = "sdk-xyo-swift.podspec"; path = "../sdk-xyo-swift.podspec"; sourceTree = "<group>"; };
B5819FDF30B92E7EE6E1C232 /* Pods-iOSExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOSExample.debug.xcconfig"; path = "Target Support Files/Pods-iOSExample/Pods-iOSExample.debug.xcconfig"; sourceTree = "<group>"; };
B620028351EB70AD405DC7A8 /* Pods-iOSExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOSExample.debug.xcconfig"; path = "Target Support Files/Pods-iOSExample/Pods-iOSExample.debug.xcconfig"; sourceTree = "<group>"; };
CC7D7BFAE01709D1207879D5 /* Pods_iOSExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iOSExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E9B1374E51F5D0016417445F /* Pods-iOSExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOSExample.release.xcconfig"; path = "Target Support Files/Pods-iOSExample/Pods-iOSExample.release.xcconfig"; sourceTree = "<group>"; };
FC0196377632BCEBE33FBDF3 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -56,7 +56,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
431751F0486D04551417E615 /* Pods_iOSExample.framework in Frameworks */,
9EB5192E4CF24D4172F0D15F /* Pods_iOSExample.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -106,16 +106,16 @@
1C3C61D9F5EAF4BD5C47380A /* Pods */ = {
isa = PBXGroup;
children = (
B5819FDF30B92E7EE6E1C232 /* Pods-iOSExample.debug.xcconfig */,
5882E7006B1D2655A2EA82FD /* Pods-iOSExample.release.xcconfig */,
B620028351EB70AD405DC7A8 /* Pods-iOSExample.debug.xcconfig */,
E9B1374E51F5D0016417445F /* Pods-iOSExample.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
271877F0F64975B79338B928 /* Frameworks */ = {
4794A56A762DCB939C563333 /* Frameworks */ = {
isa = PBXGroup;
children = (
4CE61CB1F1B5AFE9D3917B17 /* Pods_iOSExample.framework */,
CC7D7BFAE01709D1207879D5 /* Pods_iOSExample.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand All @@ -128,7 +128,7 @@
0AEC98B423592F4B00E47796 /* iOSExampleUITests */,
607FACD11AFB9204008FA782 /* Products */,
1C3C61D9F5EAF4BD5C47380A /* Pods */,
271877F0F64975B79338B928 /* Frameworks */,
4794A56A762DCB939C563333 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -158,11 +158,11 @@
isa = PBXNativeTarget;
buildConfigurationList = 0AEC98B823592F4B00E47796 /* Build configuration list for PBXNativeTarget "iOSExample" */;
buildPhases = (
BFBD883EFE2FFFDD110A982E /* [CP] Check Pods Manifest.lock */,
A9B81A2E86997F22BA3A9B64 /* [CP] Check Pods Manifest.lock */,
0AEC989523592F4900E47796 /* Sources */,
0AEC989623592F4900E47796 /* Frameworks */,
0AEC989723592F4900E47796 /* Resources */,
DDE073489508158BFF874372 /* [CP] Embed Pods Frameworks */,
1677D82150702DCDFAED71B9 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -254,29 +254,7 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
BFBD883EFE2FFFDD110A982E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-iOSExample-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
DDE073489508158BFF874372 /* [CP] Embed Pods Frameworks */ = {
1677D82150702DCDFAED71B9 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down Expand Up @@ -306,6 +284,28 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iOSExample/Pods-iOSExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
A9B81A2E86997F22BA3A9B64 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-iOSExample-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -352,7 +352,7 @@
/* Begin XCBuildConfiguration section */
0AEC98B923592F4B00E47796 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B5819FDF30B92E7EE6E1C232 /* Pods-iOSExample.debug.xcconfig */;
baseConfigurationReference = B620028351EB70AD405DC7A8 /* Pods-iOSExample.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
Expand Down Expand Up @@ -384,7 +384,7 @@
};
0AEC98BA23592F4B00E47796 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 5882E7006B1D2655A2EA82FD /* Pods-iOSExample.release.xcconfig */;
baseConfigurationReference = E9B1374E51F5D0016417445F /* Pods-iOSExample.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ Include the library in your Podfile

```Podfile
target 'YourAppName' do
pod 'sdk-xyo-swift', '1.0.16'
pod 'sdk-xyo-swift', '1.0.17'
```

Try some code to test. Look below for specific usage.
Expand Down
8 changes: 4 additions & 4 deletions Source/BleTcpBridge/XyoBleToTcpBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class XyoBleToTcpBridge: XyoRelayNode {
private var haulted: Bool = false
public var bleBridgeLimit: Int = 10
public var tcpBridgeLimit: Int = 150
public var bridgeInterval: UInt32 = 4
public var bridgeInterval: UInt32 = 5
public var archivists = [String : XyoTcpPeer]()


Expand Down Expand Up @@ -148,7 +148,7 @@ extension XyoBleToTcpBridge: XYSmartScanDelegate {
awaiter.fulfill(nil)
self.lastConnectTime = Date()

self.bridgeIfNeccacry()
self.bridgeIfNecessary()
})

_ = try await(awaiter)
Expand All @@ -159,7 +159,7 @@ extension XyoBleToTcpBridge: XYSmartScanDelegate {
}
}

private func bridgeIfNeccacry () {
private func bridgeIfNecessary () {
do {
if (try originState.getIndex().getValueCopy().getUInt32(offset: 0) % self.bridgeInterval == 0) {
self.bridge()
Expand All @@ -182,7 +182,7 @@ extension XyoBleToTcpBridge: XyoPipeCharacteristicListener {
self.enableBoundWitnessesSoft(enable: true)
pipe.close()

self.bridgeIfNeccacry()
self.bridgeIfNecessary()
})
}
} else {
Expand Down
6 changes: 3 additions & 3 deletions Sources/sdk-xyo-swift/BleTcpBridge/XyoBleToTcpBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ extension XyoBleToTcpBridge: XYSmartScanDelegate {
awaiter.fulfill(nil)
self.lastConnectTime = Date()

self.bridgeIfNeccacry()
self.bridgeIfNecessary()
})

_ = try await(awaiter)
Expand All @@ -159,7 +159,7 @@ extension XyoBleToTcpBridge: XYSmartScanDelegate {
}
}

private func bridgeIfNeccacry () {
private func bridgeIfNecessary () {
do {
if (try originState.getIndex().getValueCopy().getUInt32(offset: 0) % self.bridgeInterval == 0) {
self.bridge()
Expand All @@ -182,7 +182,7 @@ extension XyoBleToTcpBridge: XyoPipeCharacteristicListener {
self.enableBoundWitnessesSoft(enable: true)
pipe.close()

self.bridgeIfNeccacry()
self.bridgeIfNecessary()
})
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion sdk-xyo-swift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'sdk-xyo-swift'
s.version = '1.0.16'
s.version = '1.0.17'
s.summary = 'An easy to use XYO Platform wrapper for swift developers.'

s.description = <<-DESC
Expand Down
Loading

0 comments on commit 04c77c3

Please sign in to comment.