diff --git a/Sources/SBTUITestTunnelClient/SBTUITestTunnelClient.m b/Sources/SBTUITestTunnelClient/SBTUITestTunnelClient.m index 05a9f240..e4dd72ed 100755 --- a/Sources/SBTUITestTunnelClient/SBTUITestTunnelClient.m +++ b/Sources/SBTUITestTunnelClient/SBTUITestTunnelClient.m @@ -338,12 +338,12 @@ - (BOOL)stubRequestsRemoveAll if (objectBase64) { NSData *objectData = [[NSData alloc] initWithBase64EncodedString:objectBase64 options:0]; - NSDictionary *result = [NSKeyedUnarchiver unarchiveTopLevelObjectWithData:objectData error:nil]; - - return result ?: @{}; + NSArray *result = [NSKeyedUnarchiver unarchiveTopLevelObjectWithData:objectData error:nil]; + + return result ?: @[]; } - return @{}; + return @[]; } #pragma mark - Rewrite Commands diff --git a/Sources/SBTUITestTunnelClient/include/SBTUITestTunnelClientProtocol.h b/Sources/SBTUITestTunnelClient/include/SBTUITestTunnelClientProtocol.h index 0ab933c0..0a659c24 100644 --- a/Sources/SBTUITestTunnelClient/include/SBTUITestTunnelClientProtocol.h +++ b/Sources/SBTUITestTunnelClient/include/SBTUITestTunnelClientProtocol.h @@ -115,7 +115,7 @@ /** * Returns all active stubs * - * @return A dictionary containing all active stubs + * @return An array containing all active stubs */ - (nonnull NSArray *)stubRequestsAll; diff --git a/Sources/SBTUITestTunnelServer/SBTUITestTunnelServer.m b/Sources/SBTUITestTunnelServer/SBTUITestTunnelServer.m index 47e74939..db1344e2 100644 --- a/Sources/SBTUITestTunnelServer/SBTUITestTunnelServer.m +++ b/Sources/SBTUITestTunnelServer/SBTUITestTunnelServer.m @@ -393,7 +393,7 @@ - (NSDictionary *)commandStubRequestsAll:(NSDictionary *)parameters { NSString *ret = nil; - NSDictionary *activeStubs = [SBTProxyURLProtocol stubRequestsAll]; + NSArray *activeStubs = [SBTProxyURLProtocol stubRequestsAll]; NSData *data = [NSKeyedArchiver archivedDataWithRootObject:activeStubs requiringSecureCoding:NO error:nil]; if (data) {