firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

[FR]: Make Crashlytics `upload-symbols` compatible with visionOS

Open treastrain opened this issue 1 year ago • 4 comments

Description

The flags present in Crashlytics upload-symbols at the moment (10.20.0) are:

% upload-symbols --help
usage: upload-symbols [flags] -- <paths>
flags:
	-gsp, --google-service-plist <path to Google service plist>
		The path to your app's GoogleService-Info.plist
	-ai, --app-id <Firebase app id>
		Provide your Firebase app id directly without parsing the Google service plist. This flag will supersede the -gsp, --google-service-plist flag.
	-p, --platform <platform name>
		The platform for which the dSYM was compiled. Either: 'ios', 'mac', 'tvos'. Catalyst apps should be the 'mac' platform.
	-d, --debug
		Output extra debug logging while running
	-bp, --build-phase
		Build Phase Mode is meant to be run as an Xcode Run Script Build Phase. It finds the dSYMs and platform from the build environment variables, instead of having the caller pass them in. With this flag, <paths> and --platform can be omitted.
	-val, --validate
		Only validate the arguments and environment, then stop. This is useful in an Xcode Run Script Build Phase because it won't add to the build time, but it will report errors if the script isn't set up correctly.

<paths>
	list of one or more paths to dSYMs to upload, zip archives containing dSYMs (like those downloaded from iTunes Connect for recompiled bitcode apps), or a directory containing multiple dSYMs to be searched recursively
	Multiple paths of any kind may be provided, such as: "/path/to/.../app-name.dSYM [/path/to/.../build-products-directory /path/to/itunes-connect-archive [...]]"

	Note: archives downloaded from iTunes Connect do not have a .zip file extension. To verify the contents of such an archive, use 'unzip' or manually edit the filename to add the .zip extension and expand in Finder.

upload-symbols -h/--help prints this usage information
upload-symbols -v/--version prints version information

Visit https://firebase.google.com/support with questions or suggestions.

Of these, the <platform name> includes ios for official support, and mac and tvos for community support.

Today, the support for visionOS is in community support, to which I would like to add visionOS.


BTW, in my App project running on visionOS Simulator, I uploaded the dSYM by passing ios to --platform in upload-symbols and then uploaded it to I generated a test crash following the instructions in https://firebase.google.com/docs/crashlytics/test-implementation?platform=ios and it showed up in its dashboard 🎉

However, the operating system is shown as "iOS 1" (originally "visionOS 1") 😆

API Proposal

Add "visionos" to <platform name> in upload-symbols

Firebase Product(s)

Crashlytics

treastrain avatar Jan 21 '24 15:01 treastrain

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Jan 21 '24 15:01 google-oss-bot

I would like to contribute for this but could not figure out how to edit the binary upload-symbols...

treastrain avatar Jan 21 '24 15:01 treastrain

Hey @treastrain,

Thank you for the detailed description! We are not introducing platform specific behaviour and the platform flag is actually not used on our backend. Using ios is fine and we will updating the documentation for VisionPro soon. In terms of the progress of VisionPro support. I have updated a few deprecated kernel functions last year https://github.com/firebase/firebase-ios-sdk/pull/11515 so the SDK now should be able to collecting crash report for VisionPro. There still a few works need to be done on console side to display correct device and we are also waiting physically device for testing.

themiswang avatar Jan 23 '24 18:01 themiswang

@themiswang

Hi Anya, Thanks for replying! And I'm sorry I didn't search well and couldn't get to #11515. I'm unable to become an initial purchaser of the Apple Vision Pro because I live in Japan...

I would like to follow the progress of this, thanks to the help of its contributors!

treastrain avatar Jan 23 '24 18:01 treastrain

@themiswang it would be great to have the docs updated, I'm facing the same exact issue as above:

Adding error here so ppl will easily found a solution from the SERP.

Running upload-symbols in Build Phase mode
error: Could not get platform name from build environment

At the end the workaround for visionos is to follow this procedure and then tweak the script like this:

# Define variables
GOOGLE_PLIST_PATH="${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleService-Info.plist"
DSYM_PATH="${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
PLATFORM_NAME="ios" # xros is not yet supported

# Specify path to upload-symbols script
UPLOAD_SYMBOLS_SCRIPT="${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/upload-symbols"

# Execute upload-symbols script
"${UPLOAD_SYMBOLS_SCRIPT}" -gsp "${GOOGLE_PLIST_PATH}" -p "${PLATFORM_NAME}" "${DSYM_PATH}"

matteocrippa avatar Feb 20 '24 08:02 matteocrippa

People of Google. Could you please take a look at the issue? It looks like 1 human hour job to support a new platform for you (because visionOS is the sister of iPadOS, all should be done by just updating the enum cases and docs)

kanstantsin-bucha avatar Feb 20 '24 08:02 kanstantsin-bucha

+1

farshadtx avatar Feb 26 '24 20:02 farshadtx

Hey folks,

Added fix to upload-symbol and it should ship with the next release 10.23.0, unblocked to identify xros as a new platform for --build-phase. If you are using -gsp --platform flags you can still passing ios as argument as the comment mentioned above. Thanks!

themiswang avatar Mar 05 '24 20:03 themiswang

thx @themiswang! 👍🏻

matteocrippa avatar Mar 05 '24 21:03 matteocrippa

@themiswang Thank you!

kanstantsin-bucha avatar Mar 06 '24 08:03 kanstantsin-bucha

The fix is merged. 10.23.0 should release the week of March 19th

paulb777 avatar Mar 12 '24 23:03 paulb777

Thank you very much 🥽🥽🥽

treastrain avatar Mar 13 '24 02:03 treastrain