Skip to content

Crashlytics 6.15: Spaces in xcode project path cause errors #714

@firtinapd

Description

@firtinapd

Please fill in the following fields:

Unity editor version: 2019.2.21f1
Firebase Unity SDK version: 6.15.0
Source you installed the SDK (.unitypackage or Unity Package Manager): .unitypackage
Firebase plugins in use (Auth, Database, etc.): Crashlytics
Additional SDKs you are using (Facebook, AdMob, etc.): Facebook
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): iOS
Scripting Runtime (Mono, and/or IL2CPP): IL2CPP

Please describe the issue here:

When you have the xcode project be in a directory that has space in its path, the Pods/FirebaseCrashlytics/run fails.

▸ Running script 'Crashlytics Run Script'

❌  error: Unable to read Google Service plist at path /Users/****/Library/Application


The following build commands failed:
	PhaseScriptExecution Crashlytics\ Run\ Script /Users/***/Library/Developer/Xcode/DerivedData/Unity-iPhone-bmwiairdimzpuuhaeunzvtktifoc/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Script-EFE64D3C9ECC95B065833628.sh

I have looked at the run script and the problem can be resolved by changing this line:

ARGUMENTS="$API_KEY_ARG $@"

to

ARGUMENTS="$API_KEY_ARG $1 \"$2\""

So that the second argument that gets passed into Pods/FirebaseCrashlytics/run from the xcode build script gets passed correctly.

The relevant build script from the pbxproj:

		AD084429AC4472DDD68F6DAB /* Crashlytics Run Script */ = {
			isa = PBXShellScriptBuildPhase;
			buildActionMask = 2147483647;
			files = (
			);
			name = "Crashlytics Run Script";
			runOnlyForDeploymentPostprocessing = 0;
			shellPath = "/bin/sh -x";
			shellScript = "chmod u+x \"${PROJECT_DIR}/Pods/FirebaseCrashlytics/run\"\nchmod u+x \"${PROJECT_DIR}/Pods/FirebaseCrashlytics/upload-symbols\"\n\"${PROJECT_DIR}/Pods/FirebaseCrashlytics/run\" -gsp \"${PROJECT_DIR}/GoogleService-Info.plist\"";
		};

I guess another solution is to put extra quotes around the path to GoogleService-Info.plist.

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
Haven't tried

What's the issue repro rate? (eg 100%, 1/5 etc)
100%

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions