Search code examples
iosmaui

Is it possible to generate a .dSYM file for an iOS app using dotnet publish command?


We would prefer to use the dotnet publish command but we need the .dSYM file for reasons. We find that the time to generate the .ipa file is much quicker with dotnet publish, so that is the preferred method to get our app in the release pipeline. However, no .dsym file is generated during the dotnet publish.


Solution

  • Here is how to publish a .NET MAUI app for iOS and include your Code Signing Key and Provisioning Profile to generate a .dSYM file:

    dotnet publish -f net8.0-ios -c Release -p:ArchiveOnBuild=true -p:RuntimeIdentifier=ios-arm64 -p:CodesignKey="Apple Distribution: John Smith (AY2GDE9QM7)" -p:CodesignProvision="MyProvisioningProfile"
    

    After publishing the iOS/MacCatalyst app using dotnet publish, you can find + retrieve the .dSYM file using the following steps:

    1. Open Xcode
    2. In Xcode, in the menu bar, navigate to Window -> Organizer
      • Alternatively, in Xcode, use the keyboard shortcut cmd + option + shift + o
    3. In the Xcode Archives window, in the top left corner of the window, use the drop-down to select the app for which you want the .dsym file
    4. In the Xcode Archives window, on the left-hand menu, select Archives
    5. In the Xcode Archives window, locate the version of the published app
    6. In the right-click menu, select Show in Finder
    7. In Finder, locate the .xcarchive file, right-click -> Show Package Contents
    8. In Finder, you'll now find the dSYMS folder where you .dSYM file is located

    enter image description here