[ios] change convertProviderData to use a for in statement
This commit is contained in:
parent
d9035e9515
commit
06d20cac5c
|
@ -643,11 +643,9 @@ RCT_EXPORT_METHOD(reauthenticate:(NSString *)provider authToken:(NSString *)auth
|
|||
@return NSArray
|
||||
*/
|
||||
- (NSArray <NSObject *> *) convertProviderData:(NSArray <id<FIRUserInfo>> *) providerData {
|
||||
NSEnumerator *items = [providerData objectEnumerator];
|
||||
NSMutableArray *output = [NSMutableArray array];
|
||||
|
||||
id<FIRUserInfo> userInfo;
|
||||
while (userInfo = [items nextObject]) {
|
||||
for (id<FIRUserInfo> userInfo in providerData) {
|
||||
[output addObject:@{
|
||||
@"providerId": userInfo.providerID,
|
||||
@"uid": userInfo.uid,
|
||||
|
@ -677,8 +675,8 @@ RCT_EXPORT_METHOD(reauthenticate:(NSString *)provider authToken:(NSString *)auth
|
|||
@"refreshToken": user.refreshToken,
|
||||
@"providerId": [user.providerID lowercaseString],
|
||||
@"providerData": [self convertProviderData: user.providerData]
|
||||
} mutableCopy
|
||||
];
|
||||
} mutableCopy
|
||||
];
|
||||
|
||||
if ([user valueForKey:@"photoURL"] != nil) {
|
||||
[userDict setValue: [NSString stringWithFormat:@"%@", user.photoURL] forKey:@"photoURL"];
|
||||
|
|
Loading…
Reference in New Issue