diff --git a/ios/SiftReactNative.m b/ios/SiftReactNative.m index aeaa054..9a6df73 100644 --- a/ios/SiftReactNative.m +++ b/ios/SiftReactNative.m @@ -14,13 +14,14 @@ - (dispatch_queue_t)methodQueue RCT_EXPORT_METHOD(setSiftConfig:(NSString *)accountId beaconKey:(NSString *)beaconKey disallowCollectingLocationData: (BOOL)disallowCollectingLocationData serverUrlFormat:(NSString *)serverUrlFormat) { - [[Sift sharedInstance] setAccountId:accountId]; - [[Sift sharedInstance] setBeaconKey:beaconKey]; - [[Sift sharedInstance] setDisallowCollectingLocationData:disallowCollectingLocationData]; + Sift *sift = [Sift sharedInstance]; + [sift setAccountId:accountId]; + [sift setBeaconKey:beaconKey]; + [sift setDisallowCollectingLocationData:disallowCollectingLocationData]; if ([serverUrlFormat length] > 0) { - [[Sift sharedInstance] setServerUrlFormat:serverUrlFormat]; + [sift setServerUrlFormat:serverUrlFormat]; } - [[Sift sharedInstance] upload]; + [sift upload]; } RCT_EXPORT_METHOD(setUserId: (NSString *)userId) {