diff --git a/ios/Classes/AblyFlutterPlugin.m b/ios/Classes/AblyFlutterPlugin.m index 7fde535df..51f5ee8a0 100644 --- a/ios/Classes/AblyFlutterPlugin.m +++ b/ios/Classes/AblyFlutterPlugin.m @@ -95,7 +95,7 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; ARTDataQuery *const dataQuery = (ARTDataQuery*)[_dataMap objectForKey: TxTransportKeys_params]; ARTRest *const client = [ably getRest:messageData.handle]; ARTRestChannel *const channel = [client.channels get:channelName]; - const id cbk = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { + const id callback = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { if(error){ result([ FlutterError @@ -109,9 +109,9 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; } }; if (dataQuery) { - [channel history:dataQuery callback:cbk error: nil]; + [channel history:dataQuery callback:callback error: nil]; } else { - [channel history:cbk]; + [channel history:callback]; } }; @@ -124,7 +124,7 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; ARTPresenceQuery *const dataQuery = (ARTPresenceQuery*)[_dataMap objectForKey: TxTransportKeys_params]; ARTRest *const client = [ably getRest:messageData.handle]; ARTRestChannel *const channel = [client.channels get:channelName]; - const id cbk = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { + const id callback = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { if(error){ result([ FlutterError @@ -138,9 +138,9 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; } }; if (dataQuery) { - [[channel presence] get:dataQuery callback:cbk error:nil]; + [[channel presence] get:dataQuery callback:callback error:nil]; } else { - [[channel presence] get:cbk]; + [[channel presence] get:callback]; } }; @@ -153,7 +153,7 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; ARTPresenceQuery *const dataQuery = (ARTPresenceQuery*)[_dataMap objectForKey: TxTransportKeys_params]; ARTRest *const client = [ably getRest:messageData.handle]; ARTRestChannel *const channel = [client.channels get:channelName]; - const id cbk = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { + const id callback = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { if(error){ result([ FlutterError @@ -167,9 +167,9 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; } }; if (dataQuery) { - [[channel presence] history:dataQuery callback:cbk error:nil]; + [[channel presence] history:dataQuery callback:callback error:nil]; } else { - [[channel presence] history:cbk]; + [[channel presence] history:callback]; } }; @@ -291,7 +291,7 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; ARTRealtimeChannelOptions *const channelOptions = (ARTRealtimeChannelOptions*)[realtimePayload objectForKey:TxTransportKeys_options]; ARTRealtimeChannel *const channel = [realtimeWithHandle.channels get:channelName]; - const id cbk = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { + const id callback = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { if (error) { result([ FlutterError @@ -304,7 +304,7 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; result([[AblyFlutterMessage alloc] initWithMessage:paginatedResult handle: paginatedResultHandle]); } }; - [channel setOptions:channelOptions callback:cbk]; + [channel setOptions:channelOptions callback:callback]; result(nil); }; @@ -317,7 +317,7 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; ARTRealtimeHistoryQuery *const dataQuery = (ARTRealtimeHistoryQuery*)[_dataMap objectForKey: TxTransportKeys_params]; ARTRealtime *const client = [ably realtimeWithHandle:messageData.handle]; ARTRealtimeChannel *const channel = [client.channels get:channelName]; - const id cbk = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { + const id callback = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { if (error) { result([ FlutterError @@ -331,9 +331,9 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; } }; if (dataQuery) { - [channel history:dataQuery callback:cbk error: nil]; + [channel history:dataQuery callback:callback error: nil]; } else { - [channel history:cbk]; + [channel history:callback]; } }; @@ -346,7 +346,7 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; ARTRealtimePresenceQuery *const dataQuery = (ARTRealtimePresenceQuery*)[_dataMap objectForKey: TxTransportKeys_params]; ARTRealtime *const client = [ably realtimeWithHandle:messageData.handle]; ARTRealtimeChannel *const channel = [client.channels get:channelName]; - const id cbk = ^(NSArray * _Nullable presenceMembers, ARTErrorInfo * _Nullable error) { + const id callback = ^(NSArray * _Nullable presenceMembers, ARTErrorInfo * _Nullable error) { if (error) { result([ FlutterError @@ -359,9 +359,9 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; } }; if (dataQuery) { - [[channel presence] get:dataQuery callback:cbk]; + [[channel presence] get:dataQuery callback:callback]; } else { - [[channel presence] get:cbk]; + [[channel presence] get:callback]; } }; @@ -374,7 +374,7 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; ARTRealtimeHistoryQuery *const dataQuery = (ARTRealtimeHistoryQuery*)[_dataMap objectForKey: TxTransportKeys_params]; ARTRealtime *const client = [ably realtimeWithHandle:messageData.handle]; ARTRealtimeChannel *const channel = [client.channels get:channelName]; - const id cbk = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { + const id callback = ^(ARTPaginatedResult * _Nullable paginatedResult, ARTErrorInfo * _Nullable error) { if (error) { result([ FlutterError @@ -388,9 +388,9 @@ -(void)registerWithCompletionHandler:(FlutterResult)completionHandler; } }; if (dataQuery) { - [[channel presence] history:dataQuery callback:cbk error:nil]; + [[channel presence] history:dataQuery callback:callback error:nil]; } else { - [[channel presence] history:cbk]; + [[channel presence] history:callback]; } };