iOS Build Environment Help Center

Create dSYM location

append delete FakeMelon

Windows version: 11
Builder version: 3.64
iOS SDK version: 17.2

Hi, I need to upload dSYM zip to firebase to see crashes, I checked the "Create dSYM" checkbox in the builder but I don't see where the symbols are created.
I did search for dSYM in the whole project and found 2 .dSYM files but I'm not sure which one is the right one or if it's even what I'm looking for.

Reply RSS

Replies

append delete #1. Pierre-Marie Baty

Hello

Can you please give me the URL of the instructions you're trying to follow here ?

append delete #2. FakeMelon

https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?hl=en&authuser=0&platform=unity

I guess here it says that the symbols are automatically uploaded with the project on iOS, but then firebase still requires me to upload it manually here:
https://i.postimg.cc/5tX3TKQD/image.png

append delete #3. Pierre-Marie Baty

Oh I see.

% Google's instructions
iOS+ (Apple platforms)

For Apple platform apps using the Crashlytics Unity SDK 8.2.0+, the Firebase Unity Editor plugin automatically configures your Xcode project to upload symbols.
%

And that's all !? Now, that's a *technical* document ! Congrats Google on being immensely helpful.

Anyway, that phrase tends to indicate that the Xcode project file must contain some sort of post-processing shell script that does what these "instructions" say. I suggest you look around in your Xcode project directory for files ending in *.sh (UNIX shell script). Certainly one of them is the right one. Let me know which one(s) you find.

append delete #4. FakeMelon

Haha you got me laughing out loud at "instructions".
Anyways, you are exactly correct, there is one *.sh file in the whole project and its name is "process_symbols.sh".
This is the content:
https://pastebin.com/WdWzgB1g

append delete #5. Pierre-Marie Baty

I see. This script calls the "usymtool" executable which Unity dropped at the root of your Xcode project dir. Actually it dropped it in two versions, "usymtool" for the case where you're running an Intel Mac, and "usymtoolarm64" for the case you're running an Apple Silicon Mac. The only problem here is that they don't provide "usymtool.exe" for the case you're running Windows... And since these are precompiled executables, they're a sort of "black box" to me. It's hard to know what they do exactly.

Ah, I found a Xcode project who has them. Both variants weight a whopping 16 megabytes each : they're not exactly "small utilities". If they'd have been below 1 Mb I probably would have spent some time decompiling one. But seeing the big picture of a 16 Mb executable would take weeks. Hold on...

They've left debug symbols in. Very interesting. So it might be possible to decompile them, after all :) I'll give a try and post back.

:: @Pierre-Marie Baty added on 21 May ’24 · 23:44

*edit* These things are written in Go (golang.org). They pick up stuff on the hard disk, compress it, open a connection to the Google Cloud servers, set up TLS (there's a whole bunch of crypto functions in there) for secure transmission, and upload a form and the compressed data. Since it's written in Go and this is a highly portable language, it should be a no-brainer for Unity to produce a Windows variant of this utility. Actually, I wonder if they haven't done that already. Please do a file search in your Unity installation and look for a file called "usymtool.exe". If you find one, let me know where it is and what's its size. Some websites say that it could be located in C:\Program Files\Unity\Hub\Editor\<Unity version>\Editor\Data\Tools. Is it the case ?

append delete #6. FakeMelon

Yep! the file exists exactly in the path you mentioned:
C:\Program Files\Unity\Hub\Editor\<Unity version>\Editor\Data\Tools\usymtool.exe
Size: 16.3 MB

append delete #7. Pierre-Marie Baty

Well, let's try this then.

1. Take this usymtool.exe and copy/paste it aside the others at the root of your Xcode project.
2. Choose a .dSYM file that you want to upload
2. Open a shell prompt
3. Type:

%
usymtool.exe -symbolPath <PATH_TO_YOUR_DSYM_FILE> -il2cppOutputPath Il2CppOutputProject/Source/il2cppOutput/
%

Let me know what happens. This will be interesting :)

If you don't know which .dSYM file to upload, list them here with their sizes, and we'll figure out which is the one that is the most likely the one that should be uploaded.

append delete #8. FakeMelon

From my search inside the project folder I found 2 files:
<appname>.app.dSYM - 17.2 KB
UnityFramework.framework.dSYM - 485 MB
Do you know why there would be more than one?

append delete #9. Pierre-Marie Baty

This is because there are two "targets" in your Xcode project. One is your app, which is in the case of Unity just a bootstrap piece of code that loads and executes the main piece of interest, i.e. the UnityFramework.framework target, where your game code is compiled. So I believe the .dSYM file that Google wants you to upload is very likely to be the 485 Mb one.

:: @Pierre-Marie Baty added on 23 May ’24 · 16:42

*edit* One more bit of explanation. If there was one single "target" in the Xcode project, there would be one single executable file, weighting nearly 500 Mb. That's much slower for iOS to load something that big on startup than a few kilobytes bootstrap app. By separating your app in two, Unity ensures that iOS can load the main app very fast, to display the load screen ideally fast, and then, once the load screen is displayed, it can take all the time it needs to load the 500 Mb rest of your game code.

append delete #10. FakeMelon

Hey, thank you for your detailed explanation.
I tried running the script and it gave this error:

Unable to upload symbols to Unity Cloud Diagnostics: Unity Cloud Diagnostics credentials unavailable. Please provide an auth token with USYM_UPLOAD_AUTH_TOKEN environment variable

Makes sense that it requires a token, I will look for it. Wondering how unity grabs that token without me supplying it when I'm not the one manually activating that script.

append delete #11. Pierre-Marie Baty

Look in your Xcode project file. Environment variables are defined for each "target".

append delete #12. FakeMelon

Sorry for the ignorance, but where is this project file located?

append delete #13. Pierre-Marie Baty

In the "Unity-iPhone.xcodeproj" directory, there is a file called "project.pbxproj". This is where Xcode saves your project settings (actually, the whole .xcodeproj folder belongs to Xcode, but the main file of interest is the .pbxproj file). Simply open it with a text editor and look around for interesting things. Or use the command-line tool "pbxprojparse" (supplied with the builder) to extract information from it.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty