-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into kenny/deep-linking-spike
- Loading branch information
Showing
14 changed files
with
172 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// RadarOperatingHour.h | ||
// RadarSDK | ||
// | ||
// Created by Kenny Hu on 10/7/24. | ||
// Copyright © 2024 Radar Labs, Inc. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface RadarOperatingHour : NSObject | ||
|
||
@property (nonatomic, strong, readonly) NSDictionary<NSString *, NSArray<NSArray<NSString *> *> *> *hours; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// RadarOperatingHour.h | ||
// RadarSDK | ||
// | ||
// Created by Kenny Hu on 10/7/24. | ||
// Copyright © 2024 Radar Labs, Inc. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface RadarOperatingHours : NSObject | ||
|
||
@property (nonatomic, strong, readonly) NSDictionary<NSString *, NSArray<NSArray<NSString *> *> *> *hours; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// RadarOperatingHour+Internal.h | ||
// RadarSDK | ||
// | ||
// Created by Kenny Hu on 10/7/24. | ||
// Copyright © 2024 Radar Labs, Inc. All rights reserved. | ||
// | ||
|
||
#import "RadarOperatingHour.h" | ||
|
||
@interface RadarOperatingHour() | ||
|
||
- (instancetype)initWithDictionary:(NSDictionary *)dictionary; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// RadarOperatingHour.m | ||
// RadarSDK | ||
// | ||
// Created by Kenny Hu on 10/7/24. | ||
// Copyright © 2024 Radar Labs, Inc. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#import "RadarOperatingHours+Internal.h" | ||
|
||
@implementation RadarOperatingHours | ||
|
||
- (instancetype)initWithDictionary:(NSDictionary *)dictionary { | ||
self = [super init]; | ||
if (self) { | ||
NSMutableDictionary *parsedHours = [NSMutableDictionary new]; | ||
|
||
for (NSString *key in dictionary) { | ||
id value = dictionary[key]; | ||
|
||
if ([value isKindOfClass:[NSArray class]]) { | ||
NSArray *dayPairs = (NSArray *)value; | ||
NSMutableArray *parsedDayPairs = [NSMutableArray new]; | ||
|
||
for (id pair in dayPairs) { | ||
if ([pair isKindOfClass:[NSArray class]] && [pair count] == 2) { | ||
NSString *start = pair[0]; | ||
NSString *end = pair[1]; | ||
|
||
if ([start isKindOfClass:[NSString class]] && [end isKindOfClass:[NSString class]]) { | ||
[parsedDayPairs addObject:@[start, end]]; | ||
} | ||
} | ||
} | ||
|
||
parsedHours[key] = [parsedDayPairs copy]; | ||
} | ||
} | ||
|
||
_hours = [parsedHours copy]; | ||
} | ||
return self; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// RadarOperatingHour+Internal.h | ||
// RadarSDK | ||
// | ||
// Created by Kenny Hu on 10/7/24. | ||
// Copyright © 2024 Radar Labs, Inc. All rights reserved. | ||
// | ||
|
||
#import "RadarOperatingHours.h" | ||
|
||
@interface RadarOperatingHours() | ||
|
||
- (instancetype)initWithDictionary:(NSDictionary *)dictionary; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters