[tests] Use a different bundle id for different apps that can be installed on the same device. (#1509)
* [tests] Use a different bundle id for different apps that can be installed on the same device. * [xharness] Add workaround for radar #29847128.
This commit is contained in:
Родитель
3a480b53bf
Коммит
6fe1c9feab
|
@ -74,7 +74,7 @@ namespace MonoTouchFixtures.CoreFoundation {
|
||||||
{
|
{
|
||||||
var main = CFBundle.GetMain ();
|
var main = CFBundle.GetMain ();
|
||||||
#if __WATCHOS__
|
#if __WATCHOS__
|
||||||
var expectedBundleId = "com.xamarin.monotouch-test.watchkitapp.watchkitextension";
|
var expectedBundleId = "com.xamarin.monotouch-test-watch.watchkitapp.watchkitextension";
|
||||||
#elif MONOMAC
|
#elif MONOMAC
|
||||||
var expectedBundleId = "com.xamarin.xammac_tests";
|
var expectedBundleId = "com.xamarin.xammac_tests";
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -90,7 +90,9 @@ namespace xharness
|
||||||
XmlDocument info_plist = new XmlDocument ();
|
XmlDocument info_plist = new XmlDocument ();
|
||||||
var target_info_plist = Path.Combine (TargetDirectory, "Info-watchos-extension.plist");
|
var target_info_plist = Path.Combine (TargetDirectory, "Info-watchos-extension.plist");
|
||||||
info_plist.LoadWithoutNetworkAccess (Path.Combine (TargetDirectory, "Info.plist"));
|
info_plist.LoadWithoutNetworkAccess (Path.Combine (TargetDirectory, "Info.plist"));
|
||||||
BundleIdentifier = info_plist.GetCFBundleIdentifier ();
|
BundleIdentifier = info_plist.GetCFBundleIdentifier () + "-watch";
|
||||||
|
if (BundleIdentifier.Length >= 58)
|
||||||
|
BundleIdentifier = BundleIdentifier.Substring (0, 57); // If the main app's bundle id is 58 characters (or sometimes more), then the watch extension crashes at launch. radar #29847128.
|
||||||
info_plist.SetCFBundleIdentifier (BundleIdentifier + ".watchkitapp.watchkitextension");
|
info_plist.SetCFBundleIdentifier (BundleIdentifier + ".watchkitapp.watchkitextension");
|
||||||
info_plist.SetMinimumOSVersion ("2.0");
|
info_plist.SetMinimumOSVersion ("2.0");
|
||||||
info_plist.SetUIDeviceFamily (4);
|
info_plist.SetUIDeviceFamily (4);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче