macOS App crashes when linking dylib's if kPDFDestinationUnspecifiedValue is used in Swift code

Originator:pohilets
Number:rdar://34030502 Date Originated:August 23 2017
Status:Open Resolved:
Product:macOS + SDK Product Version:
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Area:
Swift

Summary:
Attached project contains a single macOS app target.
It compiles and links without errors or warnings in both Debug and Release configurations, but app crashes when linking dylibs:

dyld: Symbol not found: _kPDFDestinationUnspecifiedValue
  Referenced from: /Users/npohilets/Library/Developer/Xcode/DerivedData/DelmeQuartsSwift-gzpgrohyloslmbfmhztebeoxblmv/Build/Products/Release/DelmeQuartsSwift.app/Contents/MacOS/DelmeQuartsSwift
  Expected in: /System/Library/Frameworks/Quartz.framework/Versions/A/Quartz
 in /Users/npohilets/Library/Developer/Xcode/DerivedData/DelmeQuartsSwift-gzpgrohyloslmbfmhztebeoxblmv/Build/Products/Release/DelmeQuartsSwift.app/Contents/MacOS/DelmeQuartsSwift

With call stack:
#0	0x00000001000339ee in __abort_with_payload ()
#1	0x000000010003343b in abort_with_payload_wrapper_internal ()
#2	0x0000000100033464 in abort_with_payload ()
#3	0x000000010000e793 in dyld::halt(char const*) ()
#4	0x0000000100010b8f in dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) ()
#5	0x000000010000b249 in dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) ()
#6	0x000000010000b036 in _dyld_start ()

Steps to Reproduce:
Open attached project and run the app from the Xcode

Expected Results:
The app should launch successfully

Observed Results:
The app crashes when linking dylib's

Version:
macOS Sierra 10.12.6 (16G29), Xcode 9.0 beta 5 (9M202q)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!