David PHAM-VAN

Fix Xcode 13.3 out of memory issue

@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 ## 5.7.5 3 ## 5.7.5
4 4
5 - Update SWIFT code formatter to version 5 5 - Update SWIFT code formatter to version 5
  6 +- Fix Xcode 13.3 out of memory issue
6 7
7 ## 5.7.4 8 ## 5.7.4
8 9
@@ -206,7 +206,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate @@ -206,7 +206,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate
206 206
207 let activityViewController = UIActivityViewController(activityItems: [fileURL, body as Any], applicationActivities: nil) 207 let activityViewController = UIActivityViewController(activityItems: [fileURL, body as Any], applicationActivities: nil)
208 activityViewController.setValue(subject, forKey: "subject") 208 activityViewController.setValue(subject, forKey: "subject")
209 - if UI_USER_INTERFACE_IDIOM() == .pad { 209 + if UIDevice.current.userInterfaceIdiom == .pad {
210 let controller: UIViewController? = UIApplication.shared.keyWindow?.rootViewController 210 let controller: UIViewController? = UIApplication.shared.keyWindow?.rootViewController
211 activityViewController.popoverPresentationController?.sourceView = controller?.view 211 activityViewController.popoverPresentationController?.sourceView = controller?.view
212 activityViewController.popoverPresentationController?.sourceRect = rect 212 activityViewController.popoverPresentationController?.sourceRect = rect
@@ -290,7 +290,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate @@ -290,7 +290,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate
290 result(data) 290 result(data)
291 } 291 }
292 292
293 - if UI_USER_INTERFACE_IDIOM() == .pad { 293 + if UIDevice.current.userInterfaceIdiom == .pad {
294 let viewController: UIViewController? = UIApplication.shared.keyWindow?.rootViewController 294 let viewController: UIViewController? = UIApplication.shared.keyWindow?.rootViewController
295 if viewController != nil { 295 if viewController != nil {
296 controller.present(from: rect, in: viewController!.view, animated: true, completionHandler: pickPrinterCompletionHandler) 296 controller.present(from: rect, in: viewController!.view, animated: true, completionHandler: pickPrinterCompletionHandler)