Commit 6ee83243 authored by Elias Naur's avatar Elias Naur

runtime/cgo: ignore missing Info.plist files on iOS

When running Go programs on Corellium virtual iPhones, the Info.plist
files might not exist. Ignore the error.

Updates #31722

Change-Id: Id2e315c09346b69dda9e10cf29fb5dba6743aac4
Reviewed-on: https://go-review.googlesource.com/c/go/+/174202
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 06c9ccdf
...@@ -103,7 +103,7 @@ init_working_dir() ...@@ -103,7 +103,7 @@ init_working_dir()
} }
CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL); CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL);
if (url_ref == NULL) { if (url_ref == NULL) {
fprintf(stderr, "runtime/cgo: no Info.plist URL\n"); // No Info.plist found. It can happen on Corellium virtual devices.
return; return;
} }
CFStringRef url_str_ref = CFURLGetString(url_ref); CFStringRef url_str_ref = CFURLGetString(url_ref);
......
...@@ -105,7 +105,7 @@ init_working_dir() ...@@ -105,7 +105,7 @@ init_working_dir()
} }
CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL); CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL);
if (url_ref == NULL) { if (url_ref == NULL) {
fprintf(stderr, "runtime/cgo: no Info.plist URL\n"); // No Info.plist found. It can happen on Corellium virtual devices.
return; return;
} }
CFStringRef url_str_ref = CFURLGetString(url_ref); CFStringRef url_str_ref = CFURLGetString(url_ref);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment