Skip to content

Commit 925a7df

Browse files
committed
Merge branch 'develop'
2 parents 043911e + 67810e8 commit 925a7df

File tree

5 files changed

+50
-25
lines changed

5 files changed

+50
-25
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
33
Adheres to [Semantic Versioning](http://semver.org/).
44

55
---
6+
## 4.0.4
7+
8+
##### Bug Fixes
9+
* set the locale for date parsing to fix bug with 24 hour locales with the time preference set to 12 hours
10+
611
## 4.0.3
712

813
##### Bug Fixes

MAGE.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3022,7 +3022,7 @@
30223022
);
30233023
runOnlyForDeploymentPostprocessing = 1;
30243024
shellPath = /bin/sh;
3025-
shellScript = $SRCROOT/Scripts/set_build_number.sh;
3025+
shellScript = "$SRCROOT/Scripts/set_build_number.sh\n";
30263026
};
30273027
7DDC4C252A7737ED0BB25ECE /* [CP] Check Pods Manifest.lock */ = {
30283028
isa = PBXShellScriptBuildPhase;
@@ -3813,7 +3813,7 @@
38133813
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
38143814
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
38153815
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
3816-
MARKETING_VERSION = 4.0.3;
3816+
MARKETING_VERSION = 4.0.4;
38173817
OTHER_LDFLAGS = "$(inherited)";
38183818
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\"";
38193819
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
@@ -3847,7 +3847,7 @@
38473847
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
38483848
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
38493849
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
3850-
MARKETING_VERSION = 4.0.3;
3850+
MARKETING_VERSION = 4.0.4;
38513851
OTHER_LDFLAGS = "$(inherited)";
38523852
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
38533853
PRODUCT_NAME = MAGE;

Mage/AppDelegate.m

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -303,17 +303,22 @@ - (BaseMapOverlay *) getBaseMap {
303303

304304
self.backgroundGeoPackage = [manager open:@"countries"];
305305
if (self.backgroundGeoPackage) {
306-
GPKGFeatureDao * featureDao = [self.backgroundGeoPackage featureDaoWithTableName:@"countries"];
307-
308-
// If indexed, add as a tile overlay
309-
GPKGFeatureTiles * featureTiles = [[GPKGFeatureTiles alloc] initWithGeoPackage:self.backgroundGeoPackage andFeatureDao:featureDao];
310-
[featureTiles setIndexManager:[[GPKGFeatureIndexManager alloc] initWithGeoPackage:self.backgroundGeoPackage andFeatureDao:featureDao]];
311-
312-
self.backgroundOverlay = [[BaseMapOverlay alloc] initWithFeatureTiles:featureTiles];
313-
[self.backgroundOverlay setMinZoom:0];
314-
self.backgroundOverlay.darkTheme = NO;
315-
316-
self.backgroundOverlay.canReplaceMapContent = true;
306+
@try {
307+
GPKGFeatureDao * featureDao = [self.backgroundGeoPackage featureDaoWithTableName:@"countries"];
308+
309+
// If indexed, add as a tile overlay
310+
GPKGFeatureTiles * featureTiles = [[GPKGFeatureTiles alloc] initWithGeoPackage:self.backgroundGeoPackage andFeatureDao:featureDao];
311+
[featureTiles setIndexManager:[[GPKGFeatureIndexManager alloc] initWithGeoPackage:self.backgroundGeoPackage andFeatureDao:featureDao]];
312+
313+
self.backgroundOverlay = [[BaseMapOverlay alloc] initWithFeatureTiles:featureTiles];
314+
[self.backgroundOverlay setMinZoom:0];
315+
self.backgroundOverlay.darkTheme = NO;
316+
317+
self.backgroundOverlay.canReplaceMapContent = true;
318+
}
319+
@catch (NSException *e) {
320+
NSLog(@"Exception initializing the base map GP %@", e);
321+
}
317322
}
318323

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

341346
self.darkBackgroundGeoPackage = [manager open:@"countries_dark"];
342347
if (self.darkBackgroundGeoPackage) {
343-
GPKGFeatureDao * darkFeatureDao = [self.darkBackgroundGeoPackage featureDaoWithTableName:@"countries"];
344-
345-
// If indexed, add as a tile overlay
346-
GPKGFeatureTiles * darkFeatureTiles = [[GPKGFeatureTiles alloc] initWithGeoPackage:self.darkBackgroundGeoPackage andFeatureDao:darkFeatureDao];
347-
[darkFeatureTiles setIndexManager:[[GPKGFeatureIndexManager alloc] initWithGeoPackage:self.darkBackgroundGeoPackage andFeatureDao:darkFeatureDao]];
348-
349-
self.darkBackgroundOverlay = [[BaseMapOverlay alloc] initWithFeatureTiles:darkFeatureTiles];
350-
[self.darkBackgroundOverlay setMinZoom:0];
351-
self.darkBackgroundOverlay.darkTheme = YES;
352-
353-
self.darkBackgroundOverlay.canReplaceMapContent = true;
348+
@try {
349+
GPKGFeatureDao * darkFeatureDao = [self.darkBackgroundGeoPackage featureDaoWithTableName:@"countries"];
350+
351+
// If indexed, add as a tile overlay
352+
GPKGFeatureTiles * darkFeatureTiles = [[GPKGFeatureTiles alloc] initWithGeoPackage:self.darkBackgroundGeoPackage andFeatureDao:darkFeatureDao];
353+
[darkFeatureTiles setIndexManager:[[GPKGFeatureIndexManager alloc] initWithGeoPackage:self.darkBackgroundGeoPackage andFeatureDao:darkFeatureDao]];
354+
355+
self.darkBackgroundOverlay = [[BaseMapOverlay alloc] initWithFeatureTiles:darkFeatureTiles];
356+
[self.darkBackgroundOverlay setMinZoom:0];
357+
self.darkBackgroundOverlay.darkTheme = YES;
358+
359+
self.darkBackgroundOverlay.canReplaceMapContent = true;
360+
}
361+
@catch (NSException *e) {
362+
NSLog(@"Exception initializing the dark base map GP %@", e);
363+
}
354364
}
355365

356366
return self.darkBackgroundOverlay;

MageTests/StoredPasswordTests.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#import <XCTest/XCTest.h>
1010
#import "StoredPassword.h"
11+
#import "NSDate+Iso8601.h"
1112

1213
@interface StoredPasswordTests : XCTestCase
1314

@@ -38,4 +39,9 @@ - (void) testClearPassword {
3839
XCTAssertNil(newToken);
3940
}
4041

42+
- (void)testParse {
43+
NSDate *date = [NSDate dateFromIso8601String:@"2022-08-26T19:38:58.121Z"];
44+
NSLog(@"Parsed %@ into date %@", @"2022-08-26T19:38:58.121Z", date);
45+
}
46+
4147
@end

sdk/NSDate+Iso8601.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ + (NSDateFormatter *) getDateFormatter {
2626

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

3034
return dateFormatter;
3135
}

0 commit comments

Comments
 (0)