Skip to content

Commit 5ba9ef8

Browse files
Merge pull request #1632 from NYPL-Simplified/deprecation
Deprecation
2 parents 2df514a + a4dee89 commit 5ba9ef8

16 files changed

+346
-251
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@
2828
[submodule "NYPLAudiobookToolkit"]
2929
path = NYPLAudiobookToolkit
3030
url = https://github.com/NYPL-Simplified/NYPLAudiobookToolkit.git
31+
[submodule "availability"]
32+
path = availability
33+
url = https://github.com/go-darwin/availability

NYPLAEToolkit

NYPLAudiobookToolkit

Simplified.xcodeproj/project.pbxproj

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,9 @@
10301030
8C835DD5234D0B900050A18D /* NYPLFacetBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C835DD4234D0B900050A18D /* NYPLFacetBarView.swift */; };
10311031
8CC26F832370C1DF0000D8E1 /* Account.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CC26F822370C1DF0000D8E1 /* Account.swift */; };
10321032
8CE9C471237F84820072E964 /* NYPLBookDetailsProblemDocumentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CE9C470237F84820072E964 /* NYPLBookDetailsProblemDocumentViewController.swift */; };
1033+
95F0AA4B2E091D99007AA753 /* DeprecationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95F0AA4A2E091D99007AA753 /* DeprecationView.swift */; };
1034+
95F0AA4C2E091D99007AA753 /* DeprecationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95F0AA4A2E091D99007AA753 /* DeprecationView.swift */; };
1035+
95F0AA4D2E091D99007AA753 /* DeprecationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95F0AA4A2E091D99007AA753 /* DeprecationView.swift */; };
10331036
A4276F481B00046300CA7194 /* NYPLMyBooksDownloadInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = A4276F471B00046300CA7194 /* NYPLMyBooksDownloadInfo.m */; };
10341037
A42E0DF11B3F5A490095EBAE /* NYPLRemoteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A42E0DF01B3F5A490095EBAE /* NYPLRemoteViewController.m */; };
10351038
A42E0DF41B40F4E00095EBAE /* NYPLCatalogFeedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A42E0DF31B40F4E00095EBAE /* NYPLCatalogFeedViewController.m */; };
@@ -1708,6 +1711,7 @@
17081711
8C835DD4234D0B900050A18D /* NYPLFacetBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NYPLFacetBarView.swift; sourceTree = "<group>"; };
17091712
8CC26F822370C1DF0000D8E1 /* Account.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Account.swift; sourceTree = "<group>"; };
17101713
8CE9C470237F84820072E964 /* NYPLBookDetailsProblemDocumentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NYPLBookDetailsProblemDocumentViewController.swift; sourceTree = "<group>"; };
1714+
95F0AA4A2E091D99007AA753 /* DeprecationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeprecationView.swift; sourceTree = "<group>"; };
17111715
A4276F461B00046300CA7194 /* NYPLMyBooksDownloadInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NYPLMyBooksDownloadInfo.h; sourceTree = "<group>"; };
17121716
A4276F471B00046300CA7194 /* NYPLMyBooksDownloadInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NYPLMyBooksDownloadInfo.m; sourceTree = "<group>"; };
17131717
A42E0DEF1B3F5A490095EBAE /* NYPLRemoteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NYPLRemoteViewController.h; sourceTree = "<group>"; };
@@ -2906,6 +2910,7 @@
29062910
11B20E6C19D9F6DD00877A23 /* NYPLReloadView.h */,
29072911
11B20E6D19D9F6DD00877A23 /* NYPLReloadView.m */,
29082912
17E81F07261522B3001003C2 /* NYPLRoundedButton.swift */,
2913+
95F0AA4A2E091D99007AA753 /* DeprecationView.swift */,
29092914
);
29102915
path = Views;
29112916
sourceTree = "<group>";
@@ -3763,6 +3768,7 @@
37633768
2126FE6625C089110095C45C /* ReaderFormatModule.swift in Sources */,
37643769
7321485C28651E4B000DF0F0 /* NYPLSignInModalFactory.swift in Sources */,
37653770
73EB0A8725821DF4006BC997 /* NYPLCatalogGroupedFeedViewController.m in Sources */,
3771+
95F0AA4B2E091D99007AA753 /* DeprecationView.swift in Sources */,
37663772
73EB0A8825821DF4006BC997 /* NYPLBackgroundExecutor.swift in Sources */,
37673773
73D8D27F25A68D4300DF5F69 /* NYPLBookmarkR2Location.swift in Sources */,
37683774
73EB0A8925821DF4006BC997 /* NYPLProblemDocument.swift in Sources */,
@@ -4024,6 +4030,7 @@
40244030
7359DCB527E92462001C4254 /* NYPLSignInBusinessLogic+OAuthClientCredentials.swift in Sources */,
40254031
73FCA2C625005BA4001B0C5D /* NYPLReloadView.m in Sources */,
40264032
1747335C2853B1190090B1F3 /* NYPLSettingsDeleteServerDataViewController.swift in Sources */,
4033+
95F0AA4C2E091D99007AA753 /* DeprecationView.swift in Sources */,
40274034
73FCA2C925005BA4001B0C5D /* NYPLCatalogGroupedFeedViewController.m in Sources */,
40284035
73FCA2CA25005BA4001B0C5D /* NYPLBackgroundExecutor.swift in Sources */,
40294036
73CB8CC9285012D700603BA1 /* OELoginNavHeader.swift in Sources */,
@@ -4327,6 +4334,7 @@
43274334
11E0208D197F05D9009DEA93 /* UIFont+NYPLSystemFontOverride.m in Sources */,
43284335
03690E291EB2B44300F75D5F /* NYPLReadiumBookmark.swift in Sources */,
43294336
E683953B217663B100371072 /* NYPLFacetViewDefaultDataSource.swift in Sources */,
4337+
95F0AA4D2E091D99007AA753 /* DeprecationView.swift in Sources */,
43304338
174733662857A6950090B1F3 /* NYPLSettingsDeleteLibraryCardViewController.swift in Sources */,
43314339
73B5DFDC26052A1800225C12 /* NYPLBookButtonsState.m in Sources */,
43324340
E6207B652118973800864143 /* NYPLAppTheme.swift in Sources */,
@@ -4721,7 +4729,7 @@
47214729
"$(inherited)",
47224730
"@executable_path/Frameworks",
47234731
);
4724-
MARKETING_VERSION = 3.9.5;
4732+
MARKETING_VERSION = 3.9.7;
47254733
PRODUCT_BUNDLE_IDENTIFIER = org.nypl.labs.SimplyE;
47264734
PRODUCT_MODULE_NAME = SimplyE;
47274735
PROVISIONING_PROFILE = "2e185b6c-271e-4b02-a05e-860b8c3831f6";
@@ -4768,7 +4776,7 @@
47684776
"$(inherited)",
47694777
"@executable_path/Frameworks",
47704778
);
4771-
MARKETING_VERSION = 3.9.5;
4779+
MARKETING_VERSION = 3.9.7;
47724780
PRODUCT_BUNDLE_IDENTIFIER = org.nypl.labs.SimplyE;
47734781
PRODUCT_MODULE_NAME = SimplyE;
47744782
PROVISIONING_PROFILE = "b3d9154d-70e1-48d6-a0c5-869431277a5c";
@@ -5020,8 +5028,11 @@
50205028
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
50215029
CODE_SIGN_ENTITLEMENTS = Simplified/SimplyE.entitlements;
50225030
CODE_SIGN_IDENTITY = "iPhone Developer";
5031+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
50235032
CURRENT_PROJECT_VERSION = 0;
50245033
DEVELOPMENT_TEAM = 7262U6ST2R;
5034+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 7262U6ST2R;
5035+
ENABLE_USER_SCRIPT_SANDBOXING = NO;
50255036
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
50265037
GCC_PRECOMPILE_PREFIX_HEADER = YES;
50275038
GCC_PREFIX_HEADER = "Simplified/AppInfrastructure/Simplified-Prefix.pch";
@@ -5040,14 +5051,15 @@
50405051
"$(inherited)",
50415052
"@executable_path/Frameworks",
50425053
);
5043-
MARKETING_VERSION = 3.9.6;
5054+
MARKETING_VERSION = 3.9.7;
50445055
OTHER_LDFLAGS = (
50455056
"$(inherited)",
50465057
"-ld_classic",
50475058
);
50485059
PRODUCT_BUNDLE_IDENTIFIER = org.nypl.labs.SimplyE;
50495060
PROVISIONING_PROFILE = "2e185b6c-271e-4b02-a05e-860b8c3831f6";
50505061
PROVISIONING_PROFILE_SPECIFIER = "SimplyE Development";
5062+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "SimplyE Dev";
50515063
RUN_CLANG_STATIC_ANALYZER = YES;
50525064
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG SIMPLYE FEATURE_DRM_CONNECTOR FEATURE_CRASH_REPORTING FEATURE_OVERDRIVE_AUTH FEATURE_AUDIOBOOKS AXIS";
50535065
SWIFT_OBJC_BRIDGING_HEADER = "Simplified/AppInfrastructure/SimplyE-Bridging-Header.h";
@@ -5074,8 +5086,11 @@
50745086
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
50755087
CODE_SIGN_ENTITLEMENTS = Simplified/SimplyE.entitlements;
50765088
CODE_SIGN_IDENTITY = "iPhone Distribution";
5089+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
50775090
CURRENT_PROJECT_VERSION = 0;
50785091
DEVELOPMENT_TEAM = 7262U6ST2R;
5092+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 7262U6ST2R;
5093+
ENABLE_USER_SCRIPT_SANDBOXING = NO;
50795094
GCC_PRECOMPILE_PREFIX_HEADER = YES;
50805095
GCC_PREFIX_HEADER = "Simplified/AppInfrastructure/Simplified-Prefix.pch";
50815096
GCC_PREPROCESSOR_DEFINITIONS = (
@@ -5093,14 +5108,15 @@
50935108
"$(inherited)",
50945109
"@executable_path/Frameworks",
50955110
);
5096-
MARKETING_VERSION = 3.9.6;
5111+
MARKETING_VERSION = 3.9.7;
50975112
OTHER_LDFLAGS = (
50985113
"$(inherited)",
50995114
"-ld_classic",
51005115
);
51015116
PRODUCT_BUNDLE_IDENTIFIER = org.nypl.labs.SimplyE;
51025117
PROVISIONING_PROFILE = "b3d9154d-70e1-48d6-a0c5-869431277a5c";
51035118
PROVISIONING_PROFILE_SPECIFIER = "SimplyE Distribution";
5119+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "SimplyE Dev";
51045120
RUN_CLANG_STATIC_ANALYZER = YES;
51055121
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "SIMPLYE FEATURE_DRM_CONNECTOR FEATURE_CRASH_REPORTING FEATURE_OVERDRIVE_AUTH FEATURE_AUDIOBOOKS AXIS";
51065122
SWIFT_OBJC_BRIDGING_HEADER = "Simplified/AppInfrastructure/SimplyE-Bridging-Header.h";

Simplified/Announcements/NYPLAnnouncementBusinessLogic.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class NYPLAnnouncementBusinessLogic {
8383
- Returns: The alert controller to be presented.
8484
*/
8585
private func alert(announcements: [Announcement]) -> UIAlertController? {
86-
let title = NSLocalizedString("Announcement", comment: "")
86+
let title = NSLocalizedString("Important Update", comment: "")
8787
var currentAlert: UIAlertController? = nil
8888

8989
let alerts = announcements.map {

Simplified/AppInfrastructure/NYPLConfiguration.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class NYPLConfiguration: NSObject {
2828
@objc static var accentColor: UIColor {
2929
return UIColor(red: 0.0/255.0, green: 144/255.0, blue: 196/255.0, alpha:1.0)
3030
}
31+
32+
@objc static var blueBackgroundColor: UIColor {
33+
return UIColor(red: 20/255.0, green: 54/255.0, blue: 97/255.0, alpha:1.0)
34+
}
3135

3236
@objc static var readerBackgroundColor: UIColor {
3337
return UIColor(white: 250/255.0, alpha:1.0)

Simplified/AppInfrastructure/Simplified-Prefix.pch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifndef __cplusplus
22

3-
@import Darwin.Availability;
3+
//@import Darwin.availability;
44

55
#ifndef __IPHONE_3_0
66
#warning "This project uses features only available in iOS SDK 3.0 and later."

Simplified/Catalog/NYPLCatalogGroupedFeedViewController.m

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ @interface NYPLCatalogGroupedFeedViewController ()
3434
@property (nonatomic) UIRefreshControl *refreshControl;
3535
@property (nonatomic) NYPLOpenSearchDescription *searchDescription;
3636
@property (nonatomic) NYPLFacetBarView *facetBarView;
37+
@property (nonatomic) DeprecationView *deprecationView;
3738
@property (nonatomic) UITableView *tableView;
3839
@property (nonatomic) NYPLBook *mostRecentBookSelected;
3940
@property (nonatomic) int tempBookPosition;
@@ -95,14 +96,20 @@ - (void)viewDidLoad
9596
[self.tableView addSubview:self.refreshControl];
9697
[self.view addSubview:self.tableView];
9798

98-
self.facetBarView = [[NYPLFacetBarView alloc] initWithOrigin:CGPointZero width:self.view.bounds.size.width];
99+
self.deprecationView = [[DeprecationView alloc] initWithOrigin:CGPointZero width:self.view.bounds.size.width];
100+
[self.view addSubview:self.deprecationView];
101+
[self.deprecationView autoPinEdgeToSuperviewEdge:ALEdgeLeading];
102+
[self.deprecationView autoPinEdgeToSuperviewEdge:ALEdgeTrailing];
103+
[self.deprecationView autoPinEdgeToSuperviewSafeArea:ALEdgeTop];
104+
105+
self.facetBarView = [[NYPLFacetBarView alloc] initWithOrigin:CGPointMake(0, self.deprecationView.frame.size.height) width:self.view.bounds.size.width];
99106
self.facetBarView.entryPointView.delegate = self;
100107
self.facetBarView.entryPointView.dataSource = self;
101108

102109
[self.view addSubview:self.facetBarView];
103110
[self.facetBarView autoPinEdgeToSuperviewEdge:ALEdgeLeading];
104111
[self.facetBarView autoPinEdgeToSuperviewEdge:ALEdgeTrailing];
105-
[self.facetBarView autoPinEdgeToSuperviewSafeArea:ALEdgeTop];
112+
[self.facetBarView autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:_deprecationView];
106113

107114
if(self.feed.openSearchURL) {
108115
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
@@ -131,7 +138,7 @@ - (void)didMoveToParentViewController:(UIViewController *)parent
131138
[super didMoveToParentViewController:parent];
132139

133140
if(parent) {
134-
CGFloat top = self.view.safeAreaInsets.top;
141+
CGFloat top = self.view.safeAreaInsets.top + self.deprecationView.frame.size.height + kTableViewInsetAdjustmentWithEntryPoints;
135142
if (self.facetBarView.frame.size.height > 0) {
136143
top = CGRectGetMaxY(self.facetBarView.frame) + kTableViewInsetAdjustmentWithEntryPoints;
137144
}

0 commit comments

Comments
 (0)