iOS Instruments - How to load dSYM file for Swift libraries such as libswift.foundation.dylib? iOS Instruments - How to load dSYM file for Swift libraries such as libswift.foundation.dylib? ios ios

iOS Instruments - How to load dSYM file for Swift libraries such as libswift.foundation.dylib?


This answer is copied from https://github.com/Flash3001/iOSCharts.Xamarin/issues/17

by: Flash3001

but hope this will help you:

The file is located in: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS

Before:

<Target Name="_CalculateCodesignAppBundleInputs" Condition="'$(_RequireCodeSigning)' == 'true'">        <ItemGroup>            <_CodesignAppBundleInput Include="$(_NativeExecutable)" />            <_CodesignAppBundleInput Include="$(_AppBundlePath)Info.plist" />            <_CodesignAppBundleInput Include="$(_AppBundlePath)embedded.mobileprovision" />            <_CodesignAppBundleInput Include="$(DeviceSpecificIntermediateOutputPath)Entitlements.xcent" />            <_CodesignAppBundleInput Include="@(_BundleResourceWithLogicalName)" />            <_CodesignAppBundleInput Include="@(_NativeLibrary)" />            <_CodesignAppBundleInput Include="@(_Frameworks)" />            <_CodesignAppBundleInput Include="@(_ResolvedAppExtensionReferences -> '$(_AppBundlePath)PlugIns\%(FileName)%(Extension)\_CodeSignature\CodeResources')" Condition="'$(IsAppExtension)' == 'false'" />            <!-- Include WatchOS1 App references -->            <_CodesignAppBundleInput Include="@(_ResolvedWatchAppReferences -> '$(_AppBundlePath)%(FileName)%(Extension)\_CodeSignature\CodeResources')" Condition="'$(IsAppExtension)' == 'true'" />            <!-- Include WatchOS2 App references -->            <_CodesignAppBundleInput Include="@(_ResolvedWatchAppReferences -> '$(_AppBundlePath)Watch\%(FileName)%(Extension)\_CodeSignature\CodeResources')" Condition="'$(OutputType)' == 'Exe'" />        </ItemGroup>    </Target>    <Target Name="_CodesignAppBundle" Condition="'$(_RequireCodeSigning)' == 'true'" DependsOnTargets="$(_CodesignAppBundleDependsOn)"        Inputs="@(_CodesignAppBundleInput)"        Outputs="$(DeviceSpecificIntermediateOutputPath)codesign\$(_AppBundleName)$(AppBundleExtension)">

After:

<Target Name="_CalculateCodesignAppBundleInputs" Condition="'$(_RequireCodeSigning)' == 'true'">        <ItemGroup>            <_CodesignAppBundleInputs Include="$(_AppBundlePath)**\*.*" Exclude="$(_AppBundlePath)_CodeSignature\CodeResources" />        </ItemGroup>    </Target>    <Target Name="_CodesignAppBundle" Condition="'$(_RequireCodeSigning)' == 'true'" DependsOnTargets="$(_CodesignAppBundleDependsOn)"        Inputs="@(_CodesignAppBundleInputs)" Outputs="$(_AppBundlePath)_CodeSignature\CodeResources">

Warning: Do not copy the entire file, as it will break other things.Warning 2: You should not normally modify this file, as it is Xamarin's and can stop the build process from working if you do the wrong thing.Warning 3: It will be replaced when you update Xamarin.


If you have installed Xcode in the default location, the swift dylib files can be found in:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/

(Please note, these are not dSYM files)Under this directory you will find a subdirectory for the different build targets, for example, macosx for OS X, iphoneos for iOS devices and iphonesimulator for the simulator etc. (browse to the lib folder to view what's there)

Loading the correct file from one of these folders should hopefully work.

If all else fails you may need to build your own copy of the swift libraries with debug symbols form the source code which can be found at https://github.com/apple/swift


You can find the dSym files in your archivesunder xcode-> Window -> Organizer -> Archiveschoose the proper version of your build -> Show in finder -> Show Package Contents => you'll find a "dSYMs" folder there.

You could load them into the Instruments application.