[msbuild] When doing device-specific builds, ignore incompatible device OS's
If the user has tvOS, watchOS, and iOS projects in their solution
and goes to build for one of them for a specific device, it passes
along the device specific info to MSBuild. The build would then
fail for the tvOS and/or watchOS projects because of incompatible
architecture requirements.
This fixes that problem by short-cutting the ParseDeviceSpecificBuildInfo
task to output the default values (the values used when not building
for a specific device).
[msbuild] When doing device-specific builds, ignore incompatible device OS's
If the user has tvOS, watchOS, and iOS projects in their solution
and goes to build for one of them for a specific device, it passes
along the device specific info to MSBuild. The build would then
fail for the tvOS and/or watchOS projects because of incompatible
architecture requirements.
This fixes that problem by short-cutting the ParseDeviceSpecificBuildInfo
task to output the default values (the values used when not building
for a specific device).
* [msbuild] Replaced uses of $(_IpaOutputDir) with $(IpaPackageDir)
Fixes the unit tests
* [msbuild] Define IpaPackageDir/Name based on IpaPackagePath if defined
* [msbuild] Rename and unify to IsMacEnabled
We previously had an MtouchTargetsEnabled and a separate
IsMacTargetsEnabled for iOS and XM, when both actually
meant the same thing: is a Mac enabled for building this
project?
Note that instead of "targets", we make it more generic,
since the condition can be used in a task, a property
group or whatever really, not just to enable/disable
certain targets.
Also, we call it Enabled, rather than Connected or
Available, since it's more natural to think that all such
tasks/targets are enabled when you're building locally
on the Mac. Connected wouldn't have been appropriate, and
Available would be confusing.
For backwards compatibility I've kepd the old MtouchTargetsEnabled
pointing to IsMacEnabled. We'll change our Windows targets
accordingly to also unify this property and how/where it's
set.
* [msbuild] Use full condition comparison for robustness
This is the proper way to use a boolean in a condition, and
prevents errors whenever the property is an empty string or
anything other than a boolean value.
* [msbuild] Remove unnecessary duplicate implementation of Move
Our implementation of the Move task was a partial copy of what
the MSBuild Move task does: https://github.com/Microsoft/msbuild/blob/master/src/XMakeTasks/Move.cs
Remove the unnecessary code, make it inherit the base implementation
like we do for the other MSBuild-overriden tasks, and place it in a
corresponding MsBuildTasks folder to denote this (again, like we do
in iOS.Tasks).
Removing this (unnecessary IMO) custom implementation of Move
ensures that when we switch to MSBuild, we can leverage improvements
and fixes on the task automatically.
* [msbuild] Move all the common MSBuild overriden tasks to MacDev
These tasks previously existed in iOS.Tasks, and Mac.Tasks. Since
they are reused across iOS and XM targets, move them to the common
MacDev project and update the targets accordingly.
Like the Copy/Delete/MakeDir/RemoveDir/Touch tasks, we need to override
this one so we can allow customer targets to also execute Mac tools
remotely when building from Windows, bringing parity to the build
customizations allowed on XS/xbuild since they build locally and Exec
"just works" there of course.
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.
Looks like Xcode isn't generating any UIDeviceRequiredCapabilities
for watchOS 1 extensions.
It used to have UIRequiredDeviceCapabilities = 'watch-companion'
but that *might* not be required anymore.
Commit 94e35a8570 on xamarin-macios/master
comes from those same assumptions.
Now regarding bug #41204:
User is getting error "ERROR ITMS-90563: "Missing UIRequiredDeviceCapabilities value"
when publish WatchKitCatalog sample.
(https://bugzilla.xamarin.com/show_bug.cgi?id=41204)
This might happen because we're still creating an empty array for the
UIDeviceRequiredCapabilities key.
In any case there's no need to create it.
Xcode doesn't see to add a UIRequiredDeviceCapabilities = 'watch-companion'
anymore for watchos apps/extensions, not even when setting the deployment
version to 2.0.
This makes watchOS 2 apps launch in the simulator again.
MSBuild compares what is in FileWrites with the Outputs of the target
and any file that exists in FileWrites but *doesn't* exist in Outputs
gets deleted with the assumption that it is no longer needed via the
IncrementalClean MSBuild target.
Since these tasks cannot know what the outputs will be until the task
is run, we cannot use FileWrites.