diff --git a/Frameworks/Bindings.txt b/Frameworks/Bindings.txt index f419aae26b68fa13d5009d2ebb8b7af1038baf92..6fea50f1471b3500d5e78bfbe2757f5a5f3a70bd 100644 --- a/Frameworks/Bindings.txt +++ b/Frameworks/Bindings.txt @@ -1,4 +1,4 @@ -https://git.xx.network/elixxir/client/-/commit/b67054452c865d2fa101e39c7ed85cbd69a99a93 +https://git.xx.network/elixxir/client/-/commit/a70dac7e6cd783e37be0dd3f91919acd9f973e9e go version go1.17.13 darwin/arm64 Xcode 14.0 Build version 14A309 gomobile bind target: ios,iossimulator,macos diff --git a/Frameworks/Bindings.xcframework/Info.plist b/Frameworks/Bindings.xcframework/Info.plist index 1e6b67e7e5ab26303902b1288f432c61b61a6f28..deb2b9ab75cf32a71a0876630c4fbc5c5532b607 100644 --- a/Frameworks/Bindings.xcframework/Info.plist +++ b/Frameworks/Bindings.xcframework/Info.plist @@ -6,34 +6,32 @@ <array> <dict> <key>LibraryIdentifier</key> - <string>ios-arm64</string> + <string>macos-arm64_x86_64</string> <key>LibraryPath</key> <string>Bindings.framework</string> <key>SupportedArchitectures</key> <array> <string>arm64</string> + <string>x86_64</string> </array> <key>SupportedPlatform</key> - <string>ios</string> + <string>macos</string> </dict> <dict> <key>LibraryIdentifier</key> - <string>ios-arm64_x86_64-simulator</string> + <string>ios-arm64</string> <key>LibraryPath</key> <string>Bindings.framework</string> <key>SupportedArchitectures</key> <array> <string>arm64</string> - <string>x86_64</string> </array> <key>SupportedPlatform</key> <string>ios</string> - <key>SupportedPlatformVariant</key> - <string>simulator</string> </dict> <dict> <key>LibraryIdentifier</key> - <string>macos-arm64_x86_64</string> + <string>ios-arm64_x86_64-simulator</string> <key>LibraryPath</key> <string>Bindings.framework</string> <key>SupportedArchitectures</key> @@ -42,7 +40,9 @@ <string>x86_64</string> </array> <key>SupportedPlatform</key> - <string>macos</string> + <string>ios</string> + <key>SupportedPlatformVariant</key> + <string>simulator</string> </dict> </array> <key>CFBundlePackageType</key> diff --git a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings index 137ad1861f2e96ea04558855aea0d46b1880db75..a2c23803b173a84e8b76cc77289cab5476164316 100644 Binary files a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings and b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings differ diff --git a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h index 75e661bc7b2b7fe085392edaa986953ade073942..2598d8aa6f079549a85d885bc8b92c6f8ce0f5cb 100644 --- a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h @@ -659,12 +659,12 @@ parameters below. Parameters: - cmixId - a Cmix object ID in the tracker. - maxNumMessages - the upper bound of the random number of messages sent - each sending cycle. + each sending cycle. Suggested value: 5. - avgSendDeltaMS - the average duration, in milliseconds, to wait between - sends. + sends. Suggested value: 60000. - randomRangeMS - the upper bound of the interval between sending cycles, in milliseconds. Sends occur every avgSendDeltaMS +/- a random duration with - an upper bound of randomRangeMS. + an upper bound of randomRangeMS. Suggested value: 1000. */ - (nullable instancetype)initManager:(long)cmixId maxNumMessages:(long)maxNumMessages avgSendDeltaMS:(long)avgSendDeltaMS randomRangeMS:(long)randomRangeMS; /** @@ -1141,9 +1141,11 @@ This should be done when a new transfer is received on the ReceiveCallback. Parameters: - tidBytes - file transfer ID - callback - callback that reports file reception progress - - period - duration to wait between progress callbacks triggering + - period - Duration (in ms) to wait between progress callbacks triggering. + This value should depend on how frequently you want to receive + updates, and should be tuned to your implementation. */ -- (BOOL)registerReceivedProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferReceiveProgressCallback> _Nullable)callback period:(NSString* _Nullable)period error:(NSError* _Nullable* _Nullable)error; +- (BOOL)registerReceivedProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferReceiveProgressCallback> _Nullable)callback period:(long)period error:(NSError* _Nullable* _Nullable)error; /** * RegisterSentProgressCallback allows for the registration of a callback to track the progress of an individual sent file transfer. @@ -1154,9 +1156,11 @@ called when resuming clients or registering extra callbacks. Parameters: - tidBytes - file transfer ID - callback - callback that reports file reception progress - - period - duration to wait between progress callbacks triggering + - period - Duration (in ms) to wait between progress callbacks triggering. + This value should depend on how frequently you want to receive + updates, and should be tuned to your implementation. */ -- (BOOL)registerSentProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferSentProgressCallback> _Nullable)callback period:(NSString* _Nullable)period error:(NSError* _Nullable* _Nullable)error; +- (BOOL)registerSentProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferSentProgressCallback> _Nullable)callback period:(long)period error:(NSError* _Nullable* _Nullable)error; /** * Send is the bindings-level function for sending a file. @@ -2155,12 +2159,12 @@ parameters below. Parameters: - cmixId - a Cmix object ID in the tracker. - maxNumMessages - the upper bound of the random number of messages sent - each sending cycle. + each sending cycle. Suggested value: 5. - avgSendDeltaMS - the average duration, in milliseconds, to wait between - sends. + sends. Suggested value: 60000. - randomRangeMS - the upper bound of the interval between sending cycles, in milliseconds. Sends occur every avgSendDeltaMS +/- a random duration with - an upper bound of randomRangeMS. + an upper bound of randomRangeMS. Suggested value: 1000. */ FOUNDATION_EXPORT BindingsDummyTraffic* _Nullable BindingsNewDummyTrafficManager(long cmixId, long maxNumMessages, long avgSendDeltaMS, long randomRangeMS, NSError* _Nullable* _Nullable error); diff --git a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings index 989df75ac0f6314f2bd0ce85dc6d3bc9e16db562..2c83bf7701115d1a887861e4be349e8b72c4686f 100644 Binary files a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings and b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings differ diff --git a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h index 75e661bc7b2b7fe085392edaa986953ade073942..2598d8aa6f079549a85d885bc8b92c6f8ce0f5cb 100644 --- a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h @@ -659,12 +659,12 @@ parameters below. Parameters: - cmixId - a Cmix object ID in the tracker. - maxNumMessages - the upper bound of the random number of messages sent - each sending cycle. + each sending cycle. Suggested value: 5. - avgSendDeltaMS - the average duration, in milliseconds, to wait between - sends. + sends. Suggested value: 60000. - randomRangeMS - the upper bound of the interval between sending cycles, in milliseconds. Sends occur every avgSendDeltaMS +/- a random duration with - an upper bound of randomRangeMS. + an upper bound of randomRangeMS. Suggested value: 1000. */ - (nullable instancetype)initManager:(long)cmixId maxNumMessages:(long)maxNumMessages avgSendDeltaMS:(long)avgSendDeltaMS randomRangeMS:(long)randomRangeMS; /** @@ -1141,9 +1141,11 @@ This should be done when a new transfer is received on the ReceiveCallback. Parameters: - tidBytes - file transfer ID - callback - callback that reports file reception progress - - period - duration to wait between progress callbacks triggering + - period - Duration (in ms) to wait between progress callbacks triggering. + This value should depend on how frequently you want to receive + updates, and should be tuned to your implementation. */ -- (BOOL)registerReceivedProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferReceiveProgressCallback> _Nullable)callback period:(NSString* _Nullable)period error:(NSError* _Nullable* _Nullable)error; +- (BOOL)registerReceivedProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferReceiveProgressCallback> _Nullable)callback period:(long)period error:(NSError* _Nullable* _Nullable)error; /** * RegisterSentProgressCallback allows for the registration of a callback to track the progress of an individual sent file transfer. @@ -1154,9 +1156,11 @@ called when resuming clients or registering extra callbacks. Parameters: - tidBytes - file transfer ID - callback - callback that reports file reception progress - - period - duration to wait between progress callbacks triggering + - period - Duration (in ms) to wait between progress callbacks triggering. + This value should depend on how frequently you want to receive + updates, and should be tuned to your implementation. */ -- (BOOL)registerSentProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferSentProgressCallback> _Nullable)callback period:(NSString* _Nullable)period error:(NSError* _Nullable* _Nullable)error; +- (BOOL)registerSentProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferSentProgressCallback> _Nullable)callback period:(long)period error:(NSError* _Nullable* _Nullable)error; /** * Send is the bindings-level function for sending a file. @@ -2155,12 +2159,12 @@ parameters below. Parameters: - cmixId - a Cmix object ID in the tracker. - maxNumMessages - the upper bound of the random number of messages sent - each sending cycle. + each sending cycle. Suggested value: 5. - avgSendDeltaMS - the average duration, in milliseconds, to wait between - sends. + sends. Suggested value: 60000. - randomRangeMS - the upper bound of the interval between sending cycles, in milliseconds. Sends occur every avgSendDeltaMS +/- a random duration with - an upper bound of randomRangeMS. + an upper bound of randomRangeMS. Suggested value: 1000. */ FOUNDATION_EXPORT BindingsDummyTraffic* _Nullable BindingsNewDummyTrafficManager(long cmixId, long maxNumMessages, long avgSendDeltaMS, long randomRangeMS, NSError* _Nullable* _Nullable error); diff --git a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings index 9546147463d929ca162bac115eb326e62efd3bbc..d1b609f49fbf7a97dd9a0462f452ed83235ad238 100644 Binary files a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings and b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings differ diff --git a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h index 75e661bc7b2b7fe085392edaa986953ade073942..2598d8aa6f079549a85d885bc8b92c6f8ce0f5cb 100644 --- a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h @@ -659,12 +659,12 @@ parameters below. Parameters: - cmixId - a Cmix object ID in the tracker. - maxNumMessages - the upper bound of the random number of messages sent - each sending cycle. + each sending cycle. Suggested value: 5. - avgSendDeltaMS - the average duration, in milliseconds, to wait between - sends. + sends. Suggested value: 60000. - randomRangeMS - the upper bound of the interval between sending cycles, in milliseconds. Sends occur every avgSendDeltaMS +/- a random duration with - an upper bound of randomRangeMS. + an upper bound of randomRangeMS. Suggested value: 1000. */ - (nullable instancetype)initManager:(long)cmixId maxNumMessages:(long)maxNumMessages avgSendDeltaMS:(long)avgSendDeltaMS randomRangeMS:(long)randomRangeMS; /** @@ -1141,9 +1141,11 @@ This should be done when a new transfer is received on the ReceiveCallback. Parameters: - tidBytes - file transfer ID - callback - callback that reports file reception progress - - period - duration to wait between progress callbacks triggering + - period - Duration (in ms) to wait between progress callbacks triggering. + This value should depend on how frequently you want to receive + updates, and should be tuned to your implementation. */ -- (BOOL)registerReceivedProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferReceiveProgressCallback> _Nullable)callback period:(NSString* _Nullable)period error:(NSError* _Nullable* _Nullable)error; +- (BOOL)registerReceivedProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferReceiveProgressCallback> _Nullable)callback period:(long)period error:(NSError* _Nullable* _Nullable)error; /** * RegisterSentProgressCallback allows for the registration of a callback to track the progress of an individual sent file transfer. @@ -1154,9 +1156,11 @@ called when resuming clients or registering extra callbacks. Parameters: - tidBytes - file transfer ID - callback - callback that reports file reception progress - - period - duration to wait between progress callbacks triggering + - period - Duration (in ms) to wait between progress callbacks triggering. + This value should depend on how frequently you want to receive + updates, and should be tuned to your implementation. */ -- (BOOL)registerSentProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferSentProgressCallback> _Nullable)callback period:(NSString* _Nullable)period error:(NSError* _Nullable* _Nullable)error; +- (BOOL)registerSentProgressCallback:(NSData* _Nullable)tidBytes callback:(id<BindingsFileTransferSentProgressCallback> _Nullable)callback period:(long)period error:(NSError* _Nullable* _Nullable)error; /** * Send is the bindings-level function for sending a file. @@ -2155,12 +2159,12 @@ parameters below. Parameters: - cmixId - a Cmix object ID in the tracker. - maxNumMessages - the upper bound of the random number of messages sent - each sending cycle. + each sending cycle. Suggested value: 5. - avgSendDeltaMS - the average duration, in milliseconds, to wait between - sends. + sends. Suggested value: 60000. - randomRangeMS - the upper bound of the interval between sending cycles, in milliseconds. Sends occur every avgSendDeltaMS +/- a random duration with - an upper bound of randomRangeMS. + an upper bound of randomRangeMS. Suggested value: 1000. */ FOUNDATION_EXPORT BindingsDummyTraffic* _Nullable BindingsNewDummyTrafficManager(long cmixId, long maxNumMessages, long avgSendDeltaMS, long randomRangeMS, NSError* _Nullable* _Nullable error); diff --git a/Sources/XXClient/FileTransfer/Functions/FileTransferRegisterReceivedProgressCallback.swift b/Sources/XXClient/FileTransfer/Functions/FileTransferRegisterReceivedProgressCallback.swift index b094b3ca0e91c3457e084dbf6f398c8a3882d74d..239fc6a6d463530b6f4b0083e5f9126259d11e3e 100644 --- a/Sources/XXClient/FileTransfer/Functions/FileTransferRegisterReceivedProgressCallback.swift +++ b/Sources/XXClient/FileTransfer/Functions/FileTransferRegisterReceivedProgressCallback.swift @@ -2,11 +2,11 @@ import Bindings import XCTestDynamicOverlay public struct FileTransferRegisterReceivedProgressCallback { - public var run: (Data, String, FileTransferProgressCallback) throws -> Void + public var run: (Data, Int, FileTransferProgressCallback) throws -> Void public func callAsFunction( transferId: Data, - period: String, + period: Int, callback: FileTransferProgressCallback ) throws { try run(transferId, period, callback) diff --git a/Sources/XXClient/FileTransfer/Functions/FileTransferRegisterSentProgressCallback.swift b/Sources/XXClient/FileTransfer/Functions/FileTransferRegisterSentProgressCallback.swift index c1cfcbc40b0cf0c2d9c683af90793f24e061b4a7..35181c17fd112d6ae0077275e9c21091cf99c690 100644 --- a/Sources/XXClient/FileTransfer/Functions/FileTransferRegisterSentProgressCallback.swift +++ b/Sources/XXClient/FileTransfer/Functions/FileTransferRegisterSentProgressCallback.swift @@ -2,11 +2,11 @@ import Bindings import XCTestDynamicOverlay public struct FileTransferRegisterSentProgressCallback { - public var run: (Data, String, FileTransferProgressCallback) throws -> Void + public var run: (Data, Int, FileTransferProgressCallback) throws -> Void public func callAsFunction( transferId: Data, - period: String, + period: Int, callback: FileTransferProgressCallback ) throws { try run(transferId, period, callback) diff --git a/Sources/XXClient/Functions/NewDummyTrafficManager.swift b/Sources/XXClient/Functions/NewDummyTrafficManager.swift index 3a031033e07924cf72abbed94d45d469c41cdb22..d4b972a1838f4f7ec40ff1be1f30f1ad0c1a53e4 100644 --- a/Sources/XXClient/Functions/NewDummyTrafficManager.swift +++ b/Sources/XXClient/Functions/NewDummyTrafficManager.swift @@ -6,9 +6,9 @@ public struct NewDummyTrafficManager { public func callAsFunction( cMixId: Int, - maxNumMessages: Int, - avgSendDeltaMS: Int, - randomRangeMS: Int + maxNumMessages: Int = 5, + avgSendDeltaMS: Int = 60_000, + randomRangeMS: Int = 1_000 ) throws -> DummyTraffic { try run(cMixId, maxNumMessages, avgSendDeltaMS, randomRangeMS) }