From 9744d49c3d11563febc54e120b2bf08b0f2d1fd0 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 19 May 2016 18:36:22 +0200 Subject: [PATCH] [msbuild] Make sure CFBundleShortVersionString is set to something. This prevents the watch from getting mightily confused when re-installing watch apps/extensions. Not having a CFBundleShortVersionString would cause the following: * Build & install & run would work fine the first time. * The second build & install would confuse the watch so that the app wouldn't launch. Removing the app and reinstalling wouldn't work; the potential options would be to either reboot the device, or add a CFBundleShortVersionString to the Info.plists and install that build twice. --- .../Xamarin.iOS.Tasks.Core/Tasks/CompileAppManifestTaskBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CompileAppManifestTaskBase.cs b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CompileAppManifestTaskBase.cs index ac8896b3964e..55cd488d897f 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CompileAppManifestTaskBase.cs +++ b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CompileAppManifestTaskBase.cs @@ -148,6 +148,7 @@ bool Compile (PDictionary plist) if (!plist.ContainsKey (ManifestKeys.CFBundleSupportedPlatforms)) plist[ManifestKeys.CFBundleSupportedPlatforms] = new PArray { SdkPlatform }; plist.SetIfNotPresent (ManifestKeys.CFBundleVersion, "1.0"); + plist.SetIfNotPresent (ManifestKeys.CFBundleShortVersionString, plist.GetCFBundleVersion ()); if (!SdkIsSimulator) { SetValue (plist, "DTCompiler", sdkSettings.DTCompiler);