Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Zotero.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
618404262A4456A9005AAF22 /* IdentifierLookupController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 618404252A4456A9005AAF22 /* IdentifierLookupController.swift */; };
618D83E72BAAC88C00E7966B /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 618D83E62BAAC88C00E7966B /* PrivacyInfo.xcprivacy */; };
618D83E82BAAC88C00E7966B /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 618D83E62BAAC88C00E7966B /* PrivacyInfo.xcprivacy */; };
61975C422D38E6E8005BB41A /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = 61975C412D38E6E8005BB41A /* fonts */; };
61A0C8472B8F669C0048FF92 /* PSPDFKitUI+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61A0C8462B8F669B0048FF92 /* PSPDFKitUI+Extensions.swift */; };
61ABA7512A6137D1002A4219 /* ShareableImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61ABA7502A6137D1002A4219 /* ShareableImage.swift */; };
61BD13952A5831EF008A0704 /* TextKit1TextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61BD13942A5831EF008A0704 /* TextKit1TextView.swift */; };
Expand Down Expand Up @@ -1307,6 +1308,7 @@
61639F842AE03B8500026003 /* InstantPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstantPresenter.swift; sourceTree = "<group>"; };
618404252A4456A9005AAF22 /* IdentifierLookupController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IdentifierLookupController.swift; sourceTree = "<group>"; };
618D83E62BAAC88C00E7966B /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
61975C412D38E6E8005BB41A /* fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; path = fonts; sourceTree = "<group>"; };
61A0C8462B8F669B0048FF92 /* PSPDFKitUI+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PSPDFKitUI+Extensions.swift"; sourceTree = "<group>"; };
61ABA7502A6137D1002A4219 /* ShareableImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareableImage.swift; sourceTree = "<group>"; };
61BD13942A5831EF008A0704 /* TextKit1TextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextKit1TextView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2843,6 +2845,7 @@
isa = PBXGroup;
children = (
B3F6415E2A28B1EF00A78CB0 /* ci_scripts */,
61975C412D38E6E8005BB41A /* fonts */,
B30BA8C3255D415600361D25 /* Bundled */,
B32A495A2A44730C00080945 /* licenses */,
B30D59572206F60400884C4A /* Zotero */,
Expand Down Expand Up @@ -4511,6 +4514,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
61975C422D38E6E8005BB41A /* fonts in Resources */,
B3593F33241A61C700760E20 /* ItemDetailNoteContentView.xib in Resources */,
618D83E72BAAC88C00E7966B /* PrivacyInfo.xcprivacy in Resources */,
B32A273D254841B80081E061 /* CreatorEditViewController.xib in Resources */,
Expand Down
10 changes: 9 additions & 1 deletion Zotero/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,15 @@ extension AppDelegate: SceneActivityCounter {
extension AppDelegate: UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
if let key = Licenses.shared.pspdfkitKey {
PSPDFKit.SDK.setLicenseKey(key)
let additionalFontDirectory = Bundle.main.bundleURL.appendingPathComponent("fonts", isDirectory: true).path
let options: [SDK.Setting: Any] = [.additionalFontDirectories: [additionalFontDirectory]]
PSPDFKit.SDK.setLicenseKey(key, options: options)
}
DDLogInfo("AppDelegate: clearPSPDFKitCacheGuard: \(Defaults.shared.clearPSPDFKitCacheGuard); currentClearPSPDFKitCacheGuard: \(Defaults.currentClearPSPDFKitCacheGuard)")
if Defaults.shared.clearPSPDFKitCacheGuard < Defaults.currentClearPSPDFKitCacheGuard {
PSPDFKit.SDK.shared.cache.clear()
DDLogInfo("AppDelegate: did clear PSPDFKit cache")
Defaults.shared.clearPSPDFKitCacheGuard = Defaults.currentClearPSPDFKitCacheGuard
}
PSPDFKit.SDK.shared.styleManager.setLastUsedValue(AnnotationsConfig.imageAnnotationLineWidth,
forProperty: "lineWidth",
Expand Down
5 changes: 5 additions & 0 deletions Zotero/Models/Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ final class Defaults {
@UserDefault(key: "DidPerformFullSyncFix", defaultValue: true)
var didPerformFullSyncFix: Bool

// Increment currentClearPSPDFKitCacheGuard by 1, whenever the upcoming release should clear the PSPDFKit cache.
static let currentClearPSPDFKitCacheGuard = 1
@UserDefault(key: "ClearPSPDFKitCacheGuard", defaultValue: currentClearPSPDFKitCacheGuard - 1)
var clearPSPDFKitCacheGuard: Int

// MARK: - Actions

func reset() {
Expand Down
Binary file added fonts/NotoSansSC-VariableFont_wght.ttf
Binary file not shown.