Browse Source

Merge branch 'develop_PDFReaderProV4.6.0_appStore' into develop_PDFReaderProV4.6.1

tangchao 5 months ago
parent
commit
a39663e9a4

+ 20 - 2
PDF Office/PDF Master Pro/PDF-Reader-Pro-Edition.entitlements

@@ -4,13 +4,31 @@
 <dict>
 	<key>com.apple.security.app-sandbox</key>
 	<true/>
-	<key>com.apple.security.files.downloads.read-write</key>
-	<true/>
 	<key>com.apple.security.files.user-selected.read-write</key>
 	<true/>
 	<key>com.apple.security.network.client</key>
 	<true/>
 	<key>com.apple.security.print</key>
 	<true/>
+	<key>com.apple.security.scripting-targets</key>
+	<dict>
+		<key>com.apple.mail</key>
+		<array>
+			<string>com.apple.mail.compose</string>
+		</array>
+	</dict>
+	<key>com.apple.security.temporary-exception.apple-events</key>
+	<array>
+		<string>com.apple.iwork.pages</string>
+		<string>com.apple.iwork.numbers</string>
+		<string>com.apple.iwork.keynote</string>
+		<string>com.microsoft.outlook</string>
+		<string>com.microsoft.word</string>
+		<string>com.microsoft.excel</string>
+		<string>com.microsoft.powerpoint</string>
+		<string>com.apple.photos</string>
+	</array>
+	<key>com.apple.security.temporary-exception.apple-events:before:10.8</key>
+	<string>com.apple.mail</string>
 </dict>
 </plist>

BIN
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/ComPDFKit


+ 0 - 4
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/_CodeSignature/CodeResources

@@ -4,10 +4,6 @@
 <dict>
 	<key>files</key>
 	<dict>
-		<key>Resources/.DS_Store</key>
-		<data>
-		h8JtUfHSGJ7UtYRzanub3WwcwNY=
-		</data>
 		<key>Resources/Assets.car</key>
 		<data>
 		Lsv7/Q81njxGwXBA8bI9Dpf4F1w=

+ 4 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/View/KMSelfSignAnnotation.swift

@@ -21,6 +21,10 @@ import Quartz
     var lineAnnotationWidth: CGFloat = 1.0
     var lineOpacity: CGFloat = 1.0
     var lineColor: NSColor = NSColor.black
+    
+    override init() {
+        super.init()
+    }
 
     func getBezierPathsArray() -> [NSBezierPath] {
         var lines = [NSBezierPath]()

+ 4 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/View/KMSelfSignAnnotationFreeText.swift

@@ -113,6 +113,10 @@ import Quartz
         return formatter.string(from: Date())
     }
     
+    override init() {
+        super.init()
+    }
+    
     var includeTime: Bool = false {
            didSet {
                if includeTime != oldValue {

+ 15 - 2
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -3236,8 +3236,20 @@ extension KMMainViewController {
                     }
                 }
                 
-                let image = NSImage(contentsOfFile: url.path)
-                let isDamageImage: Bool = self.isDamageImage(image!, imagePath: url.path)
+                guard let image = NSImage(contentsOfFile: url.path) else {
+                    let alert = NSAlert()
+                    alert.alertStyle = .critical
+                    alert.messageText = String(format: NSLocalizedString("The file \"%@\" could not be opened.", comment: ""), url.lastPathComponent)
+                    alert.informativeText = NSLocalizedString("It may be damaged or use a file format that PDF Reader Pro doesn’t recognize.", comment: "")
+                    alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
+                    alert.beginSheetModal(for: NSApp.mainWindow!) { (response) in
+                        if response == .alertFirstButtonReturn {
+                            // Handle cancel button clicked
+                        }
+                    }
+                    return
+                }
+                let isDamageImage: Bool = self.isDamageImage(image, imagePath: url.path)
                 if isDamageImage {
                     let alert = NSAlert()
                     alert.alertStyle = .critical
@@ -3249,6 +3261,7 @@ extension KMMainViewController {
                             // Handle cancel button clicked
                         }
                     }
+                    return
                 }
                 let isRemoveBGColor = accessoryCtr.selectedButton.state == .on
                 listView.addAnnotation(with: image, isRemoveBGColor: isRemoveBGColor)

+ 5 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -595,6 +595,11 @@ import Cocoa
         if self.model.leftPanelOpen {
             return
         }
+        let readModel = UserDefaults.standard.bool(forKey: "kKMPDFViewIsReadMode")
+        if readModel == true {
+            return
+        }
+        
         DispatchQueue.main.async {
             self.leftSideViewController.showThumbnail()
             self.toolbarController.findItem(KMLeftControlToolbarItemIdentifier)?.isSelected = true

+ 17 - 10
PDF Office/PDF Master/Info.plist

@@ -321,21 +321,18 @@
 	</dict>
 	<key>FirebaseAppDelegateProxyEnabled</key>
 	<false/>
+	<key>LSApplicationQueriesSchemes</key>
+	<array>
+		<string>dbapi-8-emm</string>
+		<string>dbapi-2</string>
+	</array>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>
 		<true/>
 	</dict>
-	<key>SUFeedURL</key>
-	<string></string>
-	<key>UIAppFonts</key>
-	<array>
-		<string>SF-Pro-Text-Regular.otf</string>
-		<string>SF-Pro-Text-Semibold.otf</string>
-		<string>SF-Pro-Text-Bold.otf</string>
-		<string>Ubuntu-Bold.ttf</string>
-		<string>Ubuntu-Medium.ttf</string>
-	</array>
+	<key>NSAppleScriptEnabled</key>
+	<true/>
 	<key>NSServices</key>
 	<array>
 		<dict>
@@ -451,5 +448,15 @@
 			</array>
 		</dict>
 	</array>
+	<key>SUFeedURL</key>
+	<string></string>
+	<key>UIAppFonts</key>
+	<array>
+		<string>SF-Pro-Text-Regular.otf</string>
+		<string>SF-Pro-Text-Semibold.otf</string>
+		<string>SF-Pro-Text-Bold.otf</string>
+		<string>Ubuntu-Bold.ttf</string>
+		<string>Ubuntu-Medium.ttf</string>
+	</array>
 </dict>
 </plist>

+ 20 - 6
PDF Office/PDF Master/PDF_Reader_Pro.entitlements

@@ -2,19 +2,33 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-	<key>com.apple.developer.applesignin</key>
-	<array>
-		<string>Default</string>
-	</array>
 	<key>com.apple.security.app-sandbox</key>
 	<true/>
-	<key>com.apple.security.files.downloads.read-write</key>
-	<true/>
 	<key>com.apple.security.files.user-selected.read-write</key>
 	<true/>
 	<key>com.apple.security.network.client</key>
 	<true/>
 	<key>com.apple.security.print</key>
 	<true/>
+	<key>com.apple.security.scripting-targets</key>
+	<dict>
+		<key>com.apple.mail</key>
+		<array>
+			<string>com.apple.mail.compose</string>
+		</array>
+	</dict>
+	<key>com.apple.security.temporary-exception.apple-events</key>
+	<array>
+		<string>com.apple.iwork.pages</string>
+		<string>com.apple.iwork.numbers</string>
+		<string>com.apple.iwork.keynote</string>
+		<string>com.microsoft.outlook</string>
+		<string>com.microsoft.word</string>
+		<string>com.microsoft.excel</string>
+		<string>com.microsoft.powerpoint</string>
+		<string>com.apple.photos</string>
+	</array>
+	<key>com.apple.security.temporary-exception.apple-events:before:10.8</key>
+	<string>com.apple.mail</string>
 </dict>
 </plist>

+ 18 - 6
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -20634,7 +20634,7 @@
 				CURRENT_PROJECT_VERSION = 1;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = 4GGQPGRTSV;
-				ENABLE_HARDENED_RUNTIME = YES;
+				ENABLE_HARDENED_RUNTIME = NO;
 				EXCLUDED_ARCHS = "";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -20684,6 +20684,8 @@
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = "PDF Master/Info.plist";
 				INFOPLIST_KEY_CFBundleDisplayName = "PDF Reader Pro";
+				INFOPLIST_KEY_NSAppleEventsUsageDescription = "Enable the email access to contact us directly though the Mail app.";
+				INFOPLIST_KEY_NSContactsUsageDescription = "Your consent is required before you could access the function.";
 				INFOPLIST_KEY_NSHumanReadableCopyright = "";
 				INFOPLIST_KEY_NSMainStoryboardFile = Main;
 				INFOPLIST_KEY_NSPrincipalClass = NSApplication;
@@ -20743,7 +20745,7 @@
 				CURRENT_PROJECT_VERSION = 1;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = 4GGQPGRTSV;
-				ENABLE_HARDENED_RUNTIME = YES;
+				ENABLE_HARDENED_RUNTIME = NO;
 				EXCLUDED_ARCHS = "";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -20789,6 +20791,8 @@
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = "PDF Master/Info.plist";
 				INFOPLIST_KEY_CFBundleDisplayName = "PDF Reader Pro";
+				INFOPLIST_KEY_NSAppleEventsUsageDescription = "Enable the email access to contact us directly though the Mail app.";
+				INFOPLIST_KEY_NSContactsUsageDescription = "Your consent is required before you could access the function.";
 				INFOPLIST_KEY_NSHumanReadableCopyright = "";
 				INFOPLIST_KEY_NSMainStoryboardFile = Main;
 				INFOPLIST_KEY_NSPrincipalClass = NSApplication;
@@ -20818,7 +20822,10 @@
 				MACOSX_DEPLOYMENT_TARGET = 11.0;
 				MARKETING_VERSION = 1.3.0;
 				ONLY_ACTIVE_ARCH = NO;
-				OTHER_LDFLAGS = "-ObjC";
+				OTHER_LDFLAGS = (
+					"-ObjC",
+					"-ld_classic",
+				);
 				OTHER_SWIFT_FLAGS = "-DVERSION_FREE";
 				PRODUCT_BUNDLE_IDENTIFIER = com.brother.pdfreaderprofree.mac;
 				PRODUCT_NAME = "$(TARGET_NAME)";
@@ -20917,7 +20924,7 @@
 				CURRENT_PROJECT_VERSION = 1;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = 4GGQPGRTSV;
-				ENABLE_HARDENED_RUNTIME = YES;
+				ENABLE_HARDENED_RUNTIME = NO;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/PDF\\ Master/Third\\ Pard\\ Library/FirebaseAnalytics",
@@ -20943,6 +20950,7 @@
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = "PDF-Reader-Pro-Edition-Info.plist";
 				INFOPLIST_KEY_CFBundleDisplayName = "PDF Reader Pro";
+				INFOPLIST_KEY_NSAppleEventsUsageDescription = "Enable the email access to contact us directly though the Mail app.";
 				INFOPLIST_KEY_NSContactsUsageDescription = "Your consent is required before you could access the function.";
 				INFOPLIST_KEY_NSHumanReadableCopyright = "";
 				INFOPLIST_KEY_NSMainStoryboardFile = Main;
@@ -20991,7 +20999,7 @@
 				CURRENT_PROJECT_VERSION = 1;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = 4GGQPGRTSV;
-				ENABLE_HARDENED_RUNTIME = YES;
+				ENABLE_HARDENED_RUNTIME = NO;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/PDF\\ Master/Third\\ Pard\\ Library/FirebaseAnalytics",
@@ -21013,6 +21021,7 @@
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = "PDF-Reader-Pro-Edition-Info.plist";
 				INFOPLIST_KEY_CFBundleDisplayName = "PDF Reader Pro";
+				INFOPLIST_KEY_NSAppleEventsUsageDescription = "Enable the email access to contact us directly though the Mail app.";
 				INFOPLIST_KEY_NSContactsUsageDescription = "Your consent is required before you could access the function.";
 				INFOPLIST_KEY_NSHumanReadableCopyright = "";
 				INFOPLIST_KEY_NSMainStoryboardFile = Main;
@@ -21032,7 +21041,10 @@
 				);
 				MACOSX_DEPLOYMENT_TARGET = 11.0;
 				MARKETING_VERSION = 1.1.0;
-				OTHER_LDFLAGS = "-ObjC";
+				OTHER_LDFLAGS = (
+					"-ObjC",
+					"-ld_classic",
+				);
 				OTHER_SWIFT_FLAGS = "-DVERSION_PRO";
 				PRODUCT_BUNDLE_IDENTIFIER = com.brother.pdfreaderpro.mac;
 				PRODUCT_NAME = "PDF Reader Pro";

+ 15 - 8
PDF Office/PDF-Reader-Pro-Edition-Info.plist

@@ -309,19 +309,18 @@
 	</dict>
 	<key>FirebaseAppDelegateProxyEnabled</key>
 	<false/>
+	<key>LSApplicationQueriesSchemes</key>
+	<array>
+		<string>dbapi-8-emm</string>
+		<string>dbapi-2</string>
+	</array>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>
 		<true/>
 	</dict>
-	<key>UIAppFonts</key>
-	<array>
-		<string>SF-Pro-Text-Regular.otf</string>
-		<string>SF-Pro-Text-Semibold.otf</string>
-		<string>SF-Pro-Text-Bold.otf</string>
-		<string>Ubuntu-Medium.ttf</string>
-		<string>Ubuntu-Bold.ttf</string>
-	</array>
+	<key>NSAppleScriptEnabled</key>
+	<true/>
 	<key>NSServices</key>
 	<array>
 		<dict>
@@ -437,5 +436,13 @@
 			</array>
 		</dict>
 	</array>
+	<key>UIAppFonts</key>
+	<array>
+		<string>SF-Pro-Text-Regular.otf</string>
+		<string>SF-Pro-Text-Semibold.otf</string>
+		<string>SF-Pro-Text-Bold.otf</string>
+		<string>Ubuntu-Medium.ttf</string>
+		<string>Ubuntu-Bold.ttf</string>
+	</array>
 </dict>
 </plist>