Skip to content

Commit

Permalink
Update demo project for v3.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Slipp Douglas Thompson committed Aug 30, 2023
1 parent 9cf8128 commit c4ea58f
Show file tree
Hide file tree
Showing 11 changed files with 709 additions and 131 deletions.
2 changes: 2 additions & 0 deletions Demo/AerisCatalystDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
</dict>
</array>
</dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
Expand Down
273 changes: 175 additions & 98 deletions Demo/AerisDemo.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

72 changes: 66 additions & 6 deletions Demo/AerisDemoSupport/AerisDemoSupport.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@
archiveVersion = 1;
classes = {
};
objectVersion = 48;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
2B00F4BF25BA26BE0038559D /* AerisCore.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BB0F35C25B5FFDB0019CC73 /* AerisCore.xcframework */; };
2B00F4C125BA26BE0038559D /* AerisCoreUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BB0F35825B5FFDB0019CC73 /* AerisCoreUI.xcframework */; };
2B00F4C725BA26BF0038559D /* AerisMapKit.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BB0F35725B5FFDB0019CC73 /* AerisMapKit.xcframework */; };
2B00F4C925BA26BF0038559D /* AerisWeatherKit.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BB0F35A25B5FFDB0019CC73 /* AerisWeatherKit.xcframework */; };
2B00F4CE25BA26E20038559D /* AerisCore.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BB0F35C25B5FFDB0019CC73 /* AerisCore.xcframework */; };
2B00F4D025BA26E20038559D /* AerisCoreUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BB0F35825B5FFDB0019CC73 /* AerisCoreUI.xcframework */; };
2B00F4D225BA26E20038559D /* AerisGoogleMapKit.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BB0F35925B5FFDB0019CC73 /* AerisGoogleMapKit.xcframework */; };
2B00F4D425BA26E20038559D /* AerisMapboxMapKit.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BB0F35B25B5FFDB0019CC73 /* AerisMapboxMapKit.xcframework */; };
2B00F4D625BA26E20038559D /* AerisMapKit.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BB0F35725B5FFDB0019CC73 /* AerisMapKit.xcframework */; };
2B00F4D825BA26E20038559D /* AerisWeatherKit.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BB0F35A25B5FFDB0019CC73 /* AerisWeatherKit.xcframework */; };
2B5823491FF6C1720061B91E /* PAPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B5823451FF6C1720061B91E /* PAPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; };
2B58234A1FF6C1720061B91E /* PAPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B5823461FF6C1720061B91E /* PAPreferences.m */; };
2B58234B1FF6C1720061B91E /* PAPropertyDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B5823471FF6C1720061B91E /* PAPropertyDescriptor.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -142,6 +152,12 @@
2B5823461FF6C1720061B91E /* PAPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PAPreferences.m; sourceTree = "<group>"; };
2B5823471FF6C1720061B91E /* PAPropertyDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PAPropertyDescriptor.h; sourceTree = "<group>"; };
2B5823481FF6C1720061B91E /* PAPropertyDescriptor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PAPropertyDescriptor.m; sourceTree = "<group>"; };
2BB0F35725B5FFDB0019CC73 /* AerisMapKit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = AerisMapKit.xcframework; sourceTree = "<group>"; };
2BB0F35825B5FFDB0019CC73 /* AerisCoreUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = AerisCoreUI.xcframework; sourceTree = "<group>"; };
2BB0F35925B5FFDB0019CC73 /* AerisGoogleMapKit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = AerisGoogleMapKit.xcframework; sourceTree = "<group>"; };
2BB0F35A25B5FFDB0019CC73 /* AerisWeatherKit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = AerisWeatherKit.xcframework; sourceTree = "<group>"; };
2BB0F35B25B5FFDB0019CC73 /* AerisMapboxMapKit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = AerisMapboxMapKit.xcframework; sourceTree = "<group>"; };
2BB0F35C25B5FFDB0019CC73 /* AerisCore.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = AerisCore.xcframework; sourceTree = "<group>"; };
2BB4B6AD24226DF100ECB78D /* AerisDemoSupport.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AerisDemoSupport.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2BD7690C1FF4127A00F758C9 /* AerisDemoSupport.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AerisDemoSupport.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2BD7690F1FF4127A00F758C9 /* AerisDemoSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AerisDemoSupport.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -213,13 +229,23 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2B00F4C725BA26BF0038559D /* AerisMapKit.xcframework in Frameworks */,
2B00F4BF25BA26BE0038559D /* AerisCore.xcframework in Frameworks */,
2B00F4C925BA26BF0038559D /* AerisWeatherKit.xcframework in Frameworks */,
2B00F4C125BA26BE0038559D /* AerisCoreUI.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2BD769081FF4127A00F758C9 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2B00F4D425BA26E20038559D /* AerisMapboxMapKit.xcframework in Frameworks */,
2B00F4D625BA26E20038559D /* AerisMapKit.xcframework in Frameworks */,
2B00F4D025BA26E20038559D /* AerisCoreUI.xcframework in Frameworks */,
2B00F4CE25BA26E20038559D /* AerisCore.xcframework in Frameworks */,
2B00F4D225BA26E20038559D /* AerisGoogleMapKit.xcframework in Frameworks */,
2B00F4D825BA26E20038559D /* AerisWeatherKit.xcframework in Frameworks */,
48B6D52453C88DE1D40CA80A /* Pods_AerisDemoSupport.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -238,9 +264,24 @@
path = PAPreferences;
sourceTree = "<group>";
};
2BB0F35625B5FFDB0019CC73 /* lib */ = {
isa = PBXGroup;
children = (
2BB0F35725B5FFDB0019CC73 /* AerisMapKit.xcframework */,
2BB0F35825B5FFDB0019CC73 /* AerisCoreUI.xcframework */,
2BB0F35925B5FFDB0019CC73 /* AerisGoogleMapKit.xcframework */,
2BB0F35A25B5FFDB0019CC73 /* AerisWeatherKit.xcframework */,
2BB0F35B25B5FFDB0019CC73 /* AerisMapboxMapKit.xcframework */,
2BB0F35C25B5FFDB0019CC73 /* AerisCore.xcframework */,
);
name = lib;
path = ../lib;
sourceTree = "<group>";
};
2BD769021FF4127A00F758C9 = {
isa = PBXGroup;
children = (
2BB0F35625B5FFDB0019CC73 /* lib */,
2BD7690E1FF4127A00F758C9 /* AerisDemoSupport */,
2BD7690D1FF4127A00F758C9 /* Products */,
CEFB89A8B8A437F839FE6E94 /* Pods */,
Expand Down Expand Up @@ -605,7 +646,8 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-AerisDemoSupport/Pods-AerisDemoSupport-resources.sh",
"${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.framework/Resources/GoogleMaps.bundle",
"${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.xcframework/ios-arm64/GoogleMaps.framework/Resources/GoogleMaps.bundle",
"${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.xcframework/ios-arm64_x86_64-simulator/GoogleMaps.framework/Resources/GoogleMaps.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
Expand Down Expand Up @@ -717,7 +759,11 @@
INFOPLIST_FILE = AerisDemoSupport/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down Expand Up @@ -753,7 +799,11 @@
INFOPLIST_FILE = AerisDemoSupport/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down Expand Up @@ -908,7 +958,12 @@
INFOPLIST_FILE = AerisDemoSupport/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
"@executable_path/../../Frameworks",
);
MACH_O_TYPE = staticlib;
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down Expand Up @@ -947,7 +1002,12 @@
INFOPLIST_FILE = AerisDemoSupport/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
"@executable_path/../../Frameworks",
);
MACH_O_TYPE = staticlib;
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ - (void)removeLocation:(AWFPlace *)place {
AWFPlace *defaultLocation = [self defaultLocation];
NSMutableArray *mutablePlaces = [self.locations mutableCopy];
[mutablePlaces enumerateObjectsUsingBlock:^(AWFPlace *p, NSUInteger idx, BOOL *stop) {
if ([p.name isEqualToString:place.name] && [p.state isEqualToString:place.state] && [p.country isEqualToString:place.country]) {
if ([p isEqualToPlace:place]) {
[mutablePlaces removeObject:p];

if ([p isEqualToPlaceByComparingName:defaultLocation]) {
if ([p isEqualToPlace:defaultLocation]) {
[self removeDefaultLocation];
}

Expand All @@ -152,7 +152,7 @@ - (void)removeLocation:(AWFPlace *)place {
- (BOOL)containsLocation:(AWFPlace *)place {
__block BOOL contains = NO;
[self.locations enumerateObjectsUsingBlock:^(AWFPlace *p, NSUInteger idx, BOOL *stop) {
if ([p.name isEqualToString:place.name] && [p.state isEqualToString:place.state] && [p.country isEqualToString:place.country]) {
if ([p isEqualToPlace:place]) {
contains = YES;
*stop = YES;
}
Expand All @@ -164,13 +164,14 @@ - (BOOL)containsLocation:(AWFPlace *)place {
#pragma mark - Private

- (NSDictionary *)placeToDictionary:(AWFPlace *)place {
NSString *name = (place.name) ? place.name : @"";
NSString *state = (place.state) ? place.state : @"";
NSString *country = (place.country) ? place.country : @"";
NSNumber *lat = @(place.coordinate.latitude);
NSNumber *lon = @(place.coordinate.longitude);
NSString *tzname = (place.timeZone.name) ? place.timeZone.name : @"";

return @{nameKey: place.name, stateKey: state, countryKey: country, latKey: lat, lonKey: lon, tznameKey: tzname};
return @{nameKey: name, stateKey: state, countryKey: country, latKey: lat, lonKey: lon, tznameKey: tzname};
}

- (void)updateUserPreferences {
Expand Down
4 changes: 3 additions & 1 deletion Demo/AerisObjCDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>2139</string>
<string>2162</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
Expand All @@ -34,6 +34,8 @@
</dict>
</array>
</dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
Expand Down
13 changes: 8 additions & 5 deletions Demo/AerisObjCDemo/Source/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <AerisDemoSupport/AerisDemoSupport.h>
#if !TARGET_OS_UIKITFORMAC
#if !TARGET_OS_UIKITFORMAC && !TARGET_OS_SIMULATOR
#import <GoogleMaps/GoogleMaps.h>
#import <Mapbox/Mapbox.h>
#endif
Expand All @@ -26,9 +26,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[AerisWeather startWithApiKey:@"__CLIENT_ID__" secret:@"__CLIENT_SECRET__"];
[AWFLogger setLoggingLevel:AWFLogLevelDebug];

#if !TARGET_OS_UIKITFORMAC
// must initialize Google Maps SDK with proper API key before using
[GMSServices provideAPIKey:@"__GOOGLE_KEY__"];
#if !TARGET_OS_UIKITFORMAC && !TARGET_OS_SIMULATOR
if (@available(iOS 14, *)) { // GoogleMaps 8.x.x requires iOS ≥ 14
// must initialize Google Maps SDK with proper API key before using
[GMSServices provideAPIKey:@"__GOOGLE_KEY__"];
}
// must initialize Mapbox with proper token
[MGLAccountManager setAccessToken:@"__MAPBOX_KEY__"];
#endif
Expand Down Expand Up @@ -79,7 +81,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

// handle the translucent status bar in iOS 7
if (AWF_SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) {
//rootController.navigationBar.barTintColor = [UIColor blackColor];
rootController.navigationBar.backgroundColor = UIColor.whiteColor; // needed for iOS ≥14
rootController.navigationBar.barTintColor = UIColor.whiteColor;
rootController.navigationBar.translucent = NO;
rootController.extendedLayoutIncludesOpaqueBars = YES;
}
Expand Down
22 changes: 12 additions & 10 deletions Demo/AerisObjCDemo/Source/CatalogViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@
#import "LightningThreatsViewController.h"
#import "LightningFlashesViewController.h"
#import "LightningStrikesViewController.h"
#import "MaritimeReportViewController.h"
#import "AppleMapViewController.h"
#if !TARGET_OS_UIKITFORMAC
#if !TARGET_OS_UIKITFORMAC && !TARGET_OS_SIMULATOR
#import "GoogleMapViewController.h"
#import "MapboxMapViewController.h"
#endif
Expand Down Expand Up @@ -82,6 +83,7 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
@{ @"title": NSLocalizedString(@"Moon Phases", nil), @"class": [MoonPhasesViewController class] },
@{ @"title": NSLocalizedString(@"Climate Normals", nil), @"class": [NormalsViewController class] },
@{ @"title": NSLocalizedString(@"Today's Tides", nil), @"class": [TidesViewController class] },
@{ @"title": NSLocalizedString(@"Maritime Report", nil), @"class": [MaritimeReportViewController class] },
@{ @"title": NSLocalizedString(@"Indices", nil), @"class": [IndicesViewController class] },
@{ @"title": NSLocalizedString(@"Drought Monitor", nil), @"class": [DroughtMonitorViewController class] }
];
Expand All @@ -100,6 +102,7 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
@{ @"title": NSLocalizedString(@"Moon Phases", nil), @"class": [MoonPhasesViewController class] },
@{ @"title": NSLocalizedString(@"Climate Normals", nil), @"class": [NormalsViewController class] },
@{ @"title": NSLocalizedString(@"Today's Tides", nil), @"class": [TidesViewController class] },
@{ @"title": NSLocalizedString(@"Maritime Report", nil), @"class": [MaritimeReportViewController class] },
@{ @"title": NSLocalizedString(@"Indices", nil), @"class": [IndicesViewController class] },
@{ @"title": NSLocalizedString(@"Drought Monitor", nil), @"class": [DroughtMonitorViewController class] }
];
Expand All @@ -124,16 +127,15 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
@{ @"title": NSLocalizedString(@"Nearby Lightning Strikes", nil), @"class": [LightningStrikesViewController class] },
];

#if TARGET_OS_UIKITFORMAC
NSArray *imageItems = @[
NSMutableArray *imageItems = [NSMutableArray arrayWithArray: @[
@{ @"title": NSLocalizedString(@"Apple Map", nil), @"class": [AppleMapViewController class] }
];
#else
NSArray *imageItems = @[ //@{@"title": NSLocalizedString(@"Static Map Viewer", nil), @"class": [NSObject class]},
@{ @"title": NSLocalizedString(@"Apple Map", nil), @"class": [AppleMapViewController class] },
@{ @"title": NSLocalizedString(@"Google Map", nil), @"class": [GoogleMapViewController class] },
@{ @"title": NSLocalizedString(@"Mapbox Map", nil), @"class": [MapboxMapViewController class] }
];
]];
#if !TARGET_OS_UIKITFORMAC && !TARGET_OS_SIMULATOR
//[imageItems insertObject:@{@"title": NSLocalizedString(@"Static Map Viewer", nil), @"class": [NSObject class]} atIndex:0];
if (@available(iOS 14, *)) { // GoogleMaps 8.x.x requires iOS ≥ 14
[imageItems addObject:@{ @"title": NSLocalizedString(@"Google Map", nil), @"class": [GoogleMapViewController class] }];
}
[imageItems addObject:@{ @"title": NSLocalizedString(@"Mapbox Map", nil), @"class": [MapboxMapViewController class] }];
#endif

self.categories = @[@{ @"title": NSLocalizedString(@"Locations", nil), @"items": locationItems },
Expand Down
25 changes: 18 additions & 7 deletions Demo/AerisObjCDemo/Source/LocationSearchViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,15 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
//NSString* country = (AWFIsNonEmptyString(place.state)) ? [NSString stringWithFormat:@", %@", place.country] : @"";
country = (AWFIsNonEmptyString(place.state)) ? [NSString stringWithFormat:@", %@", country] : @"";

cell.textLabel.text = [NSString stringWithFormat:@"%@, %@%@", place.name, state, country];
if (AWFIsNonEmptyString(place.name)) {
cell.textLabel.text = [NSString stringWithFormat:@"%@, %@%@", place.name, state, country];
} else {
NSNumberFormatter *latLongFormatter = [NSNumberFormatter new];
latLongFormatter.numberStyle = NSNumberFormatterDecimalStyle;
latLongFormatter.minimumFractionDigits = 1;
latLongFormatter.maximumFractionDigits = 4;
cell.textLabel.text = [NSString stringWithFormat:@"(%@, %@)", [latLongFormatter stringFromNumber:@(place.coordinate.latitude)], [latLongFormatter stringFromNumber:@(place.coordinate.longitude)]];
}

if (indexPath.section == 1) {
cell.detailTextLabel.text = [NSString stringWithFormat:@"%.2f mi away", place.relativeTo.distanceMI];
Expand All @@ -180,10 +188,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
// show accessory mark if this location is the user's default one
if ([[UserLocationsManager sharedManager] defaultLocation]) {
AWFPlace *defaultPlace = [[UserLocationsManager sharedManager] defaultLocation];
if ([defaultPlace.name isEqualToString:place.name]
&& [defaultPlace.state isEqualToString:place.state]
&& [defaultPlace.country isEqualToString:place.country])
{
if ([defaultPlace isEqualToPlace:place]) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
} else {
cell.accessoryType = UITableViewCellAccessoryNone;
Expand Down Expand Up @@ -297,8 +302,14 @@ - (void)updateSearchResultsForSearchController:(UISearchController *)searchContr
return;
}

NSArray *objects = (result.results) ? result.results : @[];
weakSelf.searchResults = [NSMutableArray arrayWithArray:objects];
NSMutableArray *objects = [NSMutableArray arrayWithArray:(result.results) ? result.results : @[]];

if (AWFIsValidCoordinateString(query)) {
AWFPlace *latLongPlace = [AWFPlace placeFromString:query];
[objects addObject:latLongPlace];
}

weakSelf.searchResults = objects;
[weakSelf.searchResultsController.tableView reloadData];
}];
});
Expand Down
15 changes: 15 additions & 0 deletions Demo/AerisObjCDemo/Source/MaritimeReportViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// MaritimeReportViewController.h
// AerisDemo
//
// Created by Slipp Douglas Thompson on 6/30/23.
// Copyright © 2023 AerisWeather. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AerisDemoSupport/AerisDemoSupport.h>
#import "GroupedListingViewController.h"

@interface MaritimeReportViewController : GroupedListingViewController

@end
Loading

0 comments on commit c4ea58f

Please sign in to comment.