Last active
May 23, 2016 17:46
-
-
Save VincentDondain/1525b2fa88c7f73cacae0f1ef8b15da7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/MonoDevelop.IPhone/MonoDevelop.IPhone/Execution/IPhoneDeviceExecutionTarget.cs b/MonoDevelop.IPhone/MonoDevelop.IPhone/Execution/IPhoneDeviceExecutionTarget.cs | |
index cf29ee8..a1f74f0 100644 | |
--- a/MonoDevelop.IPhone/MonoDevelop.IPhone/Execution/IPhoneDeviceExecutionTarget.cs | |
+++ b/MonoDevelop.IPhone/MonoDevelop.IPhone/Execution/IPhoneDeviceExecutionTarget.cs | |
@@ -47,6 +47,10 @@ namespace MonoDevelop.IPhone | |
get { return Device != null ? Device.Model : null; } | |
} | |
+ public string ContainerName { | |
+ get { return Device.GetContainerDevice ().Name; } | |
+ } | |
+ | |
public override string Name { | |
get { return Device != null ? Device.Name : "Device"; } | |
} | |
diff --git a/MonoDevelop.IPhone/MonoDevelop.IPhone/Execution/IPhoneExecutionHandler.cs b/MonoDevelop.IPhone/MonoDevelop.IPhone/Execution/IPhoneExecutionHandler.cs | |
index e87589f..70c4744 100644 | |
--- a/MonoDevelop.IPhone/MonoDevelop.IPhone/Execution/IPhoneExecutionHandler.cs | |
+++ b/MonoDevelop.IPhone/MonoDevelop.IPhone/Execution/IPhoneExecutionHandler.cs | |
@@ -146,9 +146,12 @@ namespace MonoDevelop.IPhone | |
args.Add ("--killdev"); | |
args.AddQuoted (cmd.BundleIdentifier); | |
args.Add ("--launchdev"); | |
- if (IPhoneSdks.MonoTouch.LaunchUsingAppBundle) | |
- args.AddQuoted (cmd.AppPath); | |
- else | |
+ if (IPhoneSdks.MonoTouch.LaunchUsingAppBundle) { | |
+ if (cmd.TargetProject is WatchOSAppProjectFlavor) | |
+ args.AddQuoted (cmd.TargetAppPath); | |
+ else | |
+ args.AddQuoted (cmd.AppPath); | |
+ } else | |
args.AddQuoted (cmd.BundleIdentifier); | |
if (cmd.IsWatchApp) | |
diff --git a/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneProject.cs b/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneProject.cs | |
index 16122a0..5cddd8a 100644 | |
--- a/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneProject.cs | |
+++ b/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneProject.cs | |
@@ -1054,16 +1054,9 @@ namespace MonoDevelop.IPhone | |
if (device.DeviceFamily == AppleDeviceFamily.TV) | |
continue; | |
} else if (target == IPhoneDeviceType.Watch) { | |
- // Watches can only be paired with iPhones, so filter out everything else. | |
- if (device.DeviceFamily != AppleDeviceFamily.IPhone) | |
+ // Only show Apple Watches. | |
+ if (device.DeviceFamily != AppleDeviceFamily.Watch) | |
continue; | |
- | |
- // Filter out iPhone devices that are not paired with a watch. | |
- if (device.Companion == null || device.Companion.DeviceFamily != AppleDeviceFamily.Watch) | |
- continue; | |
- | |
- // Note: we just need an iPhone with a minimum iOS version of 8.0 | |
- minOS = IPhoneSdkVersion.V8_0; | |
} else if (target == IPhoneDeviceType.TV) { | |
// Only show AppleTV devices. | |
if (device.DeviceFamily != AppleDeviceFamily.TV) | |
@@ -1296,7 +1289,11 @@ namespace MonoDevelop.IPhone | |
if (isDevice) { | |
var target = context.ExecutionTarget as IPhoneDeviceExecutionTarget; | |
- var deviceName = target == null ? null : target.Name; | |
+ | |
+ string deviceName = null; | |
+ if (target != null) | |
+ deviceName = IsWatchApp ? target.ContainerName : target.Name; | |
+ | |
var op = new IPhoneDeployOperation (); | |
if (!await op.Run (cfg, appBundleDir, false, deviceName, monitor.CancellationToken)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment