IOS 11 UIActivityViewController completes PDF printing

I have a simple call UIActivityViewController

in my viewController that goes through String

, a UIImage

and PDF (like Data

). The code worked fine in iOS 10 and continues to work fine with all features (e.g. Copy, Mail, PDF Markup) except Print, which crashes nothing on the console. If I comment out the PDF view, the print function works fine with UIImage

. The PDF is well-formed and displays as expected in PDF and AirDrop formats.

Does anyone have any idea what has changed?

Update

No change in Xcode 9b5, iOS 11b5.

override func action(button: UIBarButtonItem) {
    guard let layer = self.currentLayer, let cgImage = layer.thumbnail else { return }
    var representations: [Any] = [
        UIImage(cgImage: cgImage),
        layer.collection.svg, // String representation
        ]

    if let pdf = layer.pdfDataDefault() { // Data
        representations.append(pdf)
    }

    let activityVC = UIActivityViewController(activityItems: representations, applicationActivities: nil)
    activityVC.popoverPresentationController?.barButtonItem = button
    self.present(activityVC, animated: true) {
        // ...
    }
}

      

The stack call on failure (which is "Thread 1: EXC_BAD_ACCESS (code = 1, address = 0x58)") shown below. Nothing is displayed on the console.

enter image description here

Crash log:

Date / Time: 2017-08-06 12:34:50 +0100 OS Version: iPhone OS 11.0 (Build 15A5327g) Architecture: arm64 Report Version: 26

Data source: KPerf Light PET Core cache: 0xffffffe000000000 7520411B-BFF1-86C3-E564-A279565AC465 Reason: Fence-hang-com.apple.DocumentManager.Service: fence control 627ms, inflate (fence length = 629ms)

Command: com.apple.DocumentManager.Service Path: /System/Library/PrivateFrameworks/DocumentManagerUICore.framework/PlugIns/com.apple.DocumentManager.Service.appex/com.apple.DocumentManager.Service Id: com.apple.DocuoreICUoreIC Version: 1.0 (1) Parent: launchd 1 PID: 1054

Duration: 0.60 s Steps: 12 (sampling interval 50 ms)

Hardware model: J98aAP Active cpus: 2

+3


source to share





All Articles