Skip to content

Commit 4c10985

Browse files
committed
Fixing white space and using reverseObjectEnumerator
1 parent ab1debe commit 4c10985

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

iOS_SDK/OneSignalSDK/Source/NSURL+OneSignal.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ @implementation NSURL (OneSignal)
3232
- (NSString *)valueFromQueryParameter:(NSString *)parameter {
3333
NSURLComponents *components = [NSURLComponents componentsWithURL:self resolvingAgainstBaseURL:false];
3434

35-
for(NSURLQueryItem *item in components.queryItems)
35+
for (NSURLQueryItem *item in components.queryItems)
3636
if([item.name isEqualToString:parameter])
3737
return item.value;
3838

@@ -42,8 +42,7 @@ - (NSString *)valueFromQueryParameter:(NSString *)parameter {
4242
- (NSString*)supportedFileExtension {
4343
NSURLComponents *components = [NSURLComponents componentsWithURL:self resolvingAgainstBaseURL:false];
4444

45-
for(int i = (int)components.queryItems.count-1; i > -1; i--) {
46-
NSURLQueryItem *item = components.queryItems[i];
45+
for (NSURLQueryItem *item in [components.queryItems reverseObjectEnumerator]) {
4746
NSString *value = item.value;
4847
NSString *extension = [self findExtensionInParam:value];
4948
if (extension)

iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ + (NSString*)downloadMediaAndSaveInBundle:(NSString*)urlString {
840840
}
841841

842842
if (error) {
843-
[OneSignal onesignal_Log:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Encountered an error while attempting to download file with URL: %@", error]];
843+
[OneSignal onesignal_Log:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"Encountered an error while attempting to download file with URL: %@", error]];
844844
return nil;
845845
}
846846

0 commit comments

Comments
 (0)