@@ -864,8 +864,8 @@ + (void)startWithUserId:(NSString *)userId
864864 // Issue start API call.
865865 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
866866 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
867- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_START params: params];
868- [req onResponse: ^(id <LPNetworkOperationProtocol> operation, NSDictionary *response) {
867+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_START params: params];
868+ [request onResponse: ^(id <LPNetworkOperationProtocol> operation, NSDictionary *response) {
869869 LP_TRY
870870 state.hasStarted = YES ;
871871 state.startSuccessful = YES ;
@@ -945,12 +945,12 @@ + (void)startWithUserId:(NSString *)userId
945945 if (arc4random () % 1000 == 0 ) {
946946 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
947947 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
948- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_LOG
948+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_LOG
949949 params: @{
950950 LP_PARAM_TYPE: LP_VALUE_SDK_START_LATENCY,
951951 @" startLatency" : [@(latency) description ]
952952 }];
953- [[LPRequestSender sharedInstance ] sendRequest: req ];
953+ [[LPRequestSender sharedInstance ] sendRequest: request ];
954954 }
955955 }
956956
@@ -968,7 +968,7 @@ + (void)startWithUserId:(NSString *)userId
968968 }
969969 LP_END_TRY
970970 }];
971- [req onError: ^(NSError *err) {
971+ [request onError: ^(NSError *err) {
972972 LP_TRY
973973 state.hasStarted = YES ;
974974 state.startSuccessful = NO ;
@@ -979,7 +979,7 @@ + (void)startWithUserId:(NSString *)userId
979979
980980 [self triggerStartResponse: NO ];
981981 }];
982- [[LPRequestSender sharedInstance ] sendIfConnectedRequest: req ];
982+ [[LPRequestSender sharedInstance ] sendIfConnected: request ];
983983 [self triggerStartIssued ];
984984
985985 // Pause.
@@ -1044,8 +1044,8 @@ + (void)startWithUserId:(NSString *)userId
10441044 objectForKey: @" UIApplicationExitsOnSuspend" ] boolValue ];
10451045 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
10461046 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
1047- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_STOP params: nil ];
1048- [[LPRequestSender sharedInstance ] sendIfConnectedSync: exitOnSuspend request: req ];
1047+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_STOP params: nil ];
1048+ [[LPRequestSender sharedInstance ] sendIfConnected: request sync: exitOnSuspend ];
10491049 LP_END_TRY
10501050 }];
10511051
@@ -1056,8 +1056,8 @@ + (void)startWithUserId:(NSString *)userId
10561056 if ([[UIApplication sharedApplication ] applicationState ] == UIApplicationStateActive) {
10571057 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
10581058 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
1059- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_HEARTBEAT params: nil ];
1060- [[LPRequestSender sharedInstance ] sendIfDelayedRequest: req ];
1059+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_HEARTBEAT params: nil ];
1060+ [[LPRequestSender sharedInstance ] sendIfDelayed: request ];
10611061
10621062 }
10631063 LP_END_TRY
@@ -1160,15 +1160,15 @@ + (void)pause
11601160 [request onError: ^(NSError *error) {
11611161 finishTaskHandler ();
11621162 }];
1163- [[LPRequestSender sharedInstance ] sendIfConnectedRequest : request];
1163+ [[LPRequestSender sharedInstance ] sendIfConnected : request];
11641164}
11651165
11661166+ (void )resume
11671167{
11681168 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
11691169 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
11701170 id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_RESUME_SESSION params: nil ];
1171- [[LPRequestSender sharedInstance ] sendIfDelayedRequest : request];
1171+ [[LPRequestSender sharedInstance ] sendIfDelayed : request];
11721172}
11731173
11741174+ (void )trackCrashes
@@ -1909,8 +1909,8 @@ + (void)trackInternal:(NSString *)event withArgs:(NSDictionary *)args
19091909{
19101910 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
19111911 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
1912- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_TRACK params: args];
1913- [[LPRequestSender sharedInstance ] sendRequest: req ];
1912+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_TRACK params: args];
1913+ [[LPRequestSender sharedInstance ] sendRequest: request ];
19141914
19151915 // Perform event actions.
19161916 NSString *messageId = args[LP_PARAM_MESSAGE_ID];
@@ -2042,11 +2042,11 @@ + (void)setUserIdInternal:(NSString *)userId withAttributes:(NSDictionary *)attr
20422042
20432043 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
20442044 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
2045- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_SET_USER_ATTRIBUTES params: @{
2045+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_SET_USER_ATTRIBUTES params: @{
20462046 LP_PARAM_USER_ATTRIBUTES: attributes ? [LPJSON stringFromJSON: attributes] : @" " ,
20472047 LP_PARAM_NEW_USER_ID: userId ? userId : @" "
20482048 }];
2049- [[LPRequestSender sharedInstance ] sendRequest: req ];
2049+ [[LPRequestSender sharedInstance ] sendRequest: request ];
20502050
20512051 if (userId.length ) {
20522052 [[LPAPIConfig sharedConfig ] setUserId: userId];
@@ -2118,10 +2118,10 @@ + (void)setTrafficSourceInfoInternal:(NSDictionary *)info
21182118{
21192119 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
21202120 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
2121- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_SET_TRAFFIC_SOURCE_INFO params: @{
2121+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_SET_TRAFFIC_SOURCE_INFO params: @{
21222122 LP_PARAM_TRAFFIC_SOURCE: info
21232123 }];
2124- [[LPRequestSender sharedInstance ] sendRequest: req ];
2124+ [[LPRequestSender sharedInstance ] sendRequest: request ];
21252125}
21262126
21272127+ (void )advanceTo : (NSString *)state
@@ -2173,8 +2173,8 @@ + (void)advanceToInternal:(NSString *)state withArgs:(NSDictionary *)args
21732173{
21742174 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
21752175 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
2176- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_ADVANCE params: args];
2177- [[LPRequestSender sharedInstance ] sendRequest: req ];
2176+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_ADVANCE params: args];
2177+ [[LPRequestSender sharedInstance ] sendRequest: request ];
21782178 LPContextualValues *contextualValues = [[LPContextualValues alloc ] init ];
21792179 contextualValues.parameters = params;
21802180 [self maybePerformActions: @[@" state" ]
@@ -2202,8 +2202,8 @@ + (void)pauseStateInternal
22022202{
22032203 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
22042204 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
2205- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_PAUSE_STATE params: @{}];
2206- [[LPRequestSender sharedInstance ] sendRequest: req ];
2205+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_PAUSE_STATE params: @{}];
2206+ [[LPRequestSender sharedInstance ] sendRequest: request ];
22072207}
22082208
22092209+ (void )resumeState
@@ -2224,8 +2224,8 @@ + (void)resumeStateInternal
22242224{
22252225 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
22262226 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
2227- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_RESUME_STATE params: @{}];
2228- [[LPRequestSender sharedInstance ] sendRequest: req ];
2227+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_RESUME_STATE params: @{}];
2228+ [[LPRequestSender sharedInstance ] sendRequest: request ];
22292229}
22302230
22312231+ (void )forceContentUpdate
@@ -2253,10 +2253,10 @@ + (void)forceContentUpdate:(LeanplumVariablesChangedBlock)block
22532253
22542254 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
22552255 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
2256- LeanplumRequest* req = [reqFactory
2256+ id <LPRequesting> request = [reqFactory
22572257 createPostForApiMethod: LP_METHOD_GET_VARS
22582258 params: params];
2259- [req onResponse: ^(id <LPNetworkOperationProtocol> operation, NSDictionary *response) {
2259+ [request onResponse: ^(id <LPNetworkOperationProtocol> operation, NSDictionary *response) {
22602260 LP_TRY
22612261 NSDictionary *values = response[LP_KEY_VARS];
22622262 NSDictionary *messages = response[LP_KEY_MESSAGES];
@@ -2291,13 +2291,13 @@ + (void)forceContentUpdate:(LeanplumVariablesChangedBlock)block
22912291 block ();
22922292 }
22932293 }];
2294- [req onError: ^(NSError *error) {
2294+ [request onError: ^(NSError *error) {
22952295 if (block) {
22962296 block ();
22972297 }
22982298 [[self inbox ] triggerInboxSyncedWithStatus: NO ];
22992299 }];
2300- [[LPRequestSender sharedInstance ] sendIfConnectedRequest: req ];
2300+ [[LPRequestSender sharedInstance ] sendIfConnected: request ];
23012301 LP_END_TRY
23022302}
23032303
@@ -2543,11 +2543,11 @@ + (void)maybeSendLog:(NSString *)message {
25432543 @try {
25442544 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
25452545 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
2546- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_LOG params: @{
2546+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_LOG params: @{
25472547 LP_PARAM_TYPE: LP_VALUE_SDK_LOG,
25482548 LP_PARAM_MESSAGE: message
25492549 }];
2550- [[LPRequestSender sharedInstance ] sendEventuallyRequest: req ];
2550+ [[LPRequestSender sharedInstance ] sendEventually: request ];
25512551 } @catch (NSException *exception) {
25522552 NSLog (@" Leanplum: Unable to send log: %@ " , exception);
25532553 } @finally {
@@ -2636,19 +2636,19 @@ + (void)setUserLocationAttributeWithLatitude:(double)latitude
26362636
26372637 LPRequestFactory *reqFactory = [[LPRequestFactory alloc ]
26382638 initWithFeatureFlagManager: [LPFeatureFlagManager sharedManager ]];
2639- id <LPRequesting> req = [reqFactory createPostForApiMethod: LP_METHOD_SET_USER_ATTRIBUTES params: params];
2640- [req onResponse: ^(id <LPNetworkOperationProtocol> operation, id json) {
2639+ id <LPRequesting> request = [reqFactory createPostForApiMethod: LP_METHOD_SET_USER_ATTRIBUTES params: params];
2640+ [request onResponse: ^(id <LPNetworkOperationProtocol> operation, id json) {
26412641 if (response) {
26422642 response (YES );
26432643 }
26442644 }];
2645- [req onError: ^(NSError *error) {
2645+ [request onError: ^(NSError *error) {
26462646 LPLog (LPError, @" setUserAttributes failed with error: %@ " , error);
26472647 if (response) {
26482648 response (NO );
26492649 }
26502650 }];
2651- [[LPRequestSender sharedInstance ] sendRequest: req ];
2651+ [[LPRequestSender sharedInstance ] sendRequest: request ];
26522652 LP_END_TRY
26532653}
26542654
0 commit comments