Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbarela committed Aug 26, 2022
2 parents 043911e + 67810e8 commit 925a7df
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 25 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
Adheres to [Semantic Versioning](http://semver.org/).

---
## 4.0.4

##### Bug Fixes
* set the locale for date parsing to fix bug with 24 hour locales with the time preference set to 12 hours

## 4.0.3

##### Bug Fixes
Expand Down
6 changes: 3 additions & 3 deletions MAGE.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3022,7 +3022,7 @@
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
shellScript = $SRCROOT/Scripts/set_build_number.sh;
shellScript = "$SRCROOT/Scripts/set_build_number.sh\n";
};
7DDC4C252A7737ED0BB25ECE /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -3813,7 +3813,7 @@
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 4.0.3;
MARKETING_VERSION = 4.0.4;
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/AFNetworking/AFNetworking.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/DateTools/DateTools.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/HexColors/HexColors.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/MDFInternationalization/MDFInternationalization.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/MDFTextAccessibility/MDFTextAccessibility.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/MagicalRecord/MagicalRecord.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/MaterialComponents/MaterialComponents.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/MotionAnimator/MotionAnimator.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/MotionInterchange/MotionInterchange.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/PureLayout/PureLayout.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/UIImage_Categories/UIImage-Categories.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/geopackage_ios/geopackage-ios.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/libPhoneNumber_iOS/libPhoneNumber-iOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/mgrs/mgrs.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/ogc_api_features_json_ios/ogc-api-features-json-ios.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/proj4_ios/proj4-ios.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/sf_geojson_ios/sf-geojson-ios.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/sf_ios/sf-ios.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/sf_proj_ios/sf-proj-ios.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/sf_wkb_ios/sf-wkb-ios.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/sf_wkt_ios/sf-wkt-ios.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/tiff_ios/tiff-ios.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/zxcvbn_ios/zxcvbn-ios.modulemap\"";
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
Expand Down Expand Up @@ -3847,7 +3847,7 @@
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 4.0.3;
MARKETING_VERSION = 4.0.4;
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
PRODUCT_NAME = MAGE;
Expand Down
54 changes: 32 additions & 22 deletions Mage/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -303,17 +303,22 @@ - (BaseMapOverlay *) getBaseMap {

self.backgroundGeoPackage = [manager open:@"countries"];
if (self.backgroundGeoPackage) {
GPKGFeatureDao * featureDao = [self.backgroundGeoPackage featureDaoWithTableName:@"countries"];

// If indexed, add as a tile overlay
GPKGFeatureTiles * featureTiles = [[GPKGFeatureTiles alloc] initWithGeoPackage:self.backgroundGeoPackage andFeatureDao:featureDao];
[featureTiles setIndexManager:[[GPKGFeatureIndexManager alloc] initWithGeoPackage:self.backgroundGeoPackage andFeatureDao:featureDao]];

self.backgroundOverlay = [[BaseMapOverlay alloc] initWithFeatureTiles:featureTiles];
[self.backgroundOverlay setMinZoom:0];
self.backgroundOverlay.darkTheme = NO;

self.backgroundOverlay.canReplaceMapContent = true;
@try {
GPKGFeatureDao * featureDao = [self.backgroundGeoPackage featureDaoWithTableName:@"countries"];

// If indexed, add as a tile overlay
GPKGFeatureTiles * featureTiles = [[GPKGFeatureTiles alloc] initWithGeoPackage:self.backgroundGeoPackage andFeatureDao:featureDao];
[featureTiles setIndexManager:[[GPKGFeatureIndexManager alloc] initWithGeoPackage:self.backgroundGeoPackage andFeatureDao:featureDao]];

self.backgroundOverlay = [[BaseMapOverlay alloc] initWithFeatureTiles:featureTiles];
[self.backgroundOverlay setMinZoom:0];
self.backgroundOverlay.darkTheme = NO;

self.backgroundOverlay.canReplaceMapContent = true;
}
@catch (NSException *e) {
NSLog(@"Exception initializing the base map GP %@", e);
}
}

return self.backgroundOverlay;
Expand All @@ -340,17 +345,22 @@ - (BaseMapOverlay *) getDarkBaseMap {

self.darkBackgroundGeoPackage = [manager open:@"countries_dark"];
if (self.darkBackgroundGeoPackage) {
GPKGFeatureDao * darkFeatureDao = [self.darkBackgroundGeoPackage featureDaoWithTableName:@"countries"];

// If indexed, add as a tile overlay
GPKGFeatureTiles * darkFeatureTiles = [[GPKGFeatureTiles alloc] initWithGeoPackage:self.darkBackgroundGeoPackage andFeatureDao:darkFeatureDao];
[darkFeatureTiles setIndexManager:[[GPKGFeatureIndexManager alloc] initWithGeoPackage:self.darkBackgroundGeoPackage andFeatureDao:darkFeatureDao]];

self.darkBackgroundOverlay = [[BaseMapOverlay alloc] initWithFeatureTiles:darkFeatureTiles];
[self.darkBackgroundOverlay setMinZoom:0];
self.darkBackgroundOverlay.darkTheme = YES;

self.darkBackgroundOverlay.canReplaceMapContent = true;
@try {
GPKGFeatureDao * darkFeatureDao = [self.darkBackgroundGeoPackage featureDaoWithTableName:@"countries"];

// If indexed, add as a tile overlay
GPKGFeatureTiles * darkFeatureTiles = [[GPKGFeatureTiles alloc] initWithGeoPackage:self.darkBackgroundGeoPackage andFeatureDao:darkFeatureDao];
[darkFeatureTiles setIndexManager:[[GPKGFeatureIndexManager alloc] initWithGeoPackage:self.darkBackgroundGeoPackage andFeatureDao:darkFeatureDao]];

self.darkBackgroundOverlay = [[BaseMapOverlay alloc] initWithFeatureTiles:darkFeatureTiles];
[self.darkBackgroundOverlay setMinZoom:0];
self.darkBackgroundOverlay.darkTheme = YES;

self.darkBackgroundOverlay.canReplaceMapContent = true;
}
@catch (NSException *e) {
NSLog(@"Exception initializing the dark base map GP %@", e);
}
}

return self.darkBackgroundOverlay;
Expand Down
6 changes: 6 additions & 0 deletions MageTests/StoredPasswordTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import <XCTest/XCTest.h>
#import "StoredPassword.h"
#import "NSDate+Iso8601.h"

@interface StoredPasswordTests : XCTestCase

Expand Down Expand Up @@ -38,4 +39,9 @@ - (void) testClearPassword {
XCTAssertNil(newToken);
}

- (void)testParse {
NSDate *date = [NSDate dateFromIso8601String:@"2022-08-26T19:38:58.121Z"];
NSLog(@"Parsed %@ into date %@", @"2022-08-26T19:38:58.121Z", date);
}

@end
4 changes: 4 additions & 0 deletions sdk/NSDate+Iso8601.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ + (NSDateFormatter *) getDateFormatter {

[dateFormatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"UTC"]];
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"];
NSLog(@"The current device locale %@",[NSLocale currentLocale].localeIdentifier);
NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
[dateFormatter setLocale:locale];
NSLog(@"The date formatter locale %@", dateFormatter.locale.localeIdentifier);

return dateFormatter;
}
Expand Down

0 comments on commit 925a7df

Please sign in to comment.