Skip to content

Commit 546ae92

Browse files
author
Stewart Miles
committed
Fixed exception when calling Google.IOSResolver.RemapXcodeExtension().
Google.IOSResolver.RemapXcodeExtension() would throw an exception if Unity's iOS support wasn't installed. This changes IOSResolver to catch both FileNotFoundException and TypeInitializationException exceptions. BUG=31336359 Change-Id: I1de17454c3fa23e9ddd74873849c99712411de98
1 parent c877bf1 commit 546ae92

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed
Binary file not shown.

exploded/Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.1.0.dll.meta

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
77 Bytes
Binary file not shown.

source/IOSResolver/src/IOSResolver.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,16 @@ static IOSResolver() {
271271
RemapXcodeExtension();
272272
try {
273273
TARGET_NAME = PBXProject.GetUnityTargetName();
274-
} catch (FileNotFoundException) {
275-
// It's likely we failed to load the iOS Xcode extension.
276-
Debug.LogWarning(
277-
"Failed to load the UnityEditor.iOS.Extensions.Xcode dll. " +
278-
"Is iOS support installed?");
274+
} catch (Exception exception) {
275+
if (exception is FileNotFoundException ||
276+
exception is TypeInitializationException) {
277+
// It's likely we failed to load the iOS Xcode extension.
278+
Debug.LogWarning(
279+
"Failed to load the UnityEditor.iOS.Extensions.Xcode " +
280+
"dll. Is iOS support installed?");
281+
} else {
282+
throw exception;
283+
}
279284
}
280285
}
281286

0 commit comments

Comments
 (0)