Xcode 10 Archived App Doesn't Run on Macs with Xcode 9 or Earlier Installed: DYLD, [0x4] Symbol missing?

前提是你 提交于 2019-12-11 19:05:11

问题


The crash log begins like so:

Termination Reason:    DYLD, [0x4] Symbol missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
 Symbol not found: __T0SiN
 Referenced from: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftos.dylib
 Expected in: /Volumes/VOLUME/*/REDACTED.app/Contents/MacOS/../Frameworks/libswiftCore.dylib
in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftos.dylib

Our Deployment Target is set to 10.12. The crash log is the same whether swift libs are embedded or not. Below is the output of otool -L for our app itself:

/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1555.10.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 23.0.0)
@rpath/Alamofire.framework/Versions/A/Alamofire (compatibility version 0.0.0, current version 0.0.0)
@rpath/KeychainAccess.framework/Versions/A/KeychainAccess (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1670.0.0)
@rpath/libswiftAppKit.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftCore.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftCoreData.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftCoreFoundation.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftCoreGraphics.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftCoreImage.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftDarwin.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftDispatch.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftFoundation.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftIOKit.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftMetal.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftObjectiveC.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftQuartzCore.dylib (compatibility version 1.0.0, current version 1000.11.37)
@rpath/libswiftXPC.dylib (compatibility version 1.0.0, current version 1000.11.37)

Researching the topic lead to https://github.com/sindresorhus/gifski-app/issues/12 which appeared to be a very similar issue. Our attempts to configure with @loader_path/../Frameworks have not worked, and the git diffs there are useless as many of the files have since been deleted.

Any ideas or experience with older Xcode being an issue, but only on some machines?


回答1:


Seems like a longshot, but I had a similar issue and this worked for me.

Build Settings -> Always Embed Swift Standard Libraries -> YES



来源:https://stackoverflow.com/questions/52452236/xcode-10-archived-app-doesnt-run-on-macs-with-xcode-9-or-earlier-installed-dyl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!