presentation-displays icon indicating copy to clipboard operation
presentation-displays copied to clipboard

IOS displayManager.showSecondaryDisplay Error

Open caseplugins opened this issue 2 years ago • 3 comments

Describe the bug presentation_displays/SwiftPresentationDisplaysPlugin.swift:119: Fatal error: Unexpectedly found nil while unwrapping an Optional value presentation_displays/SwiftPresentationDisplaysPlugin.swift:119: Fatal error: Unexpectedly found nil while unwrapping an Optional value

  • thread #1, queue = 'com.apple.main-thread', stop reason = Fatal error: Unexpectedly found nil while unwrapping an Optional value frame #0: 0x0000000185c68d7c libswiftCore.dylib`_swift_runtime_on_report

To Reproduce Steps to reproduce the behavior: Get Displays into displays Array. run displayManager.showSecondaryDisplay(displayId: displays[1].displayId, routerName: "presentation"); App crashes and error is displayed.

I have tried setting display[1].rotation and .flag to 1

Expected behavior Something to show in secondary screen.

Smartphone (please complete the following information):

  • Device: Iphone 11pro

Additional context Second screen is already mirroring.

caseplugins avatar Mar 28 '22 21:03 caseplugins

@caseplugins: I encountered the same issue today and I fixed in this PR: https://github.com/VNAPNIC/presentation-displays/pull/25. Hopefully the reviewers approved soon. In the meantime you can checkout to my branch.

fbernaly avatar Mar 29 '22 01:03 fbernaly

@caseplugins @fbernaly resolved in version 0.2.3

VNAPNIC avatar Mar 29 '22 03:03 VNAPNIC

@fbernaly @VNAPNIC Thanks! Got it to work. I would add to the documentation that you need to adjust the AppDelegate.swift file for an already existing project

caseplugins avatar Mar 30 '22 17:03 caseplugins