[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).
Recent Xcode versions only ship 1 version of the SDK, so it is
pointless to have a user-defined SDK version to link against.
We already use the LSMinimumOSVersion to determine the proper
-mmacosx-version-min argument to pass.
* [msbuild] Replaced uses of $(_IpaOutputDir) with $(IpaPackageDir)
Fixes the unit tests
* [msbuild] Define IpaPackageDir/Name based on IpaPackagePath if defined
* [msbuild] Add nuget diagnostics.
* [msbuild] Make restore less verbose.
To see if that's what's causing an infinite newline print loop on jenkins bots.
* [msbuild] nuget can't list sources on jenkins for some reason, so just do it manually.
* [msbuild] Make sure diagnostics doesn't fail the build.
* [msbuild] Support ibtool output when it adds ~ipad or ~iphone modifiers
When targetting older iOS versions (such as iOS 7) for multiple
device targets (e.g. iphone, ipad, etc), ibtool will output
multiple directories using the basename of the original ib file
and add ~ipad or ~iphone blurbs to the filename.
This was causing the linking step to fail due to paths not being
found at the expected locations.
* [msbuild] Added unit tests for ibtool --link w/ --minimum-deployment-target 7.0
Since pre-iOS 8.0 does not support size classes in storyboards,
ibtool will output LaunchScreen~ipad.nib and LaunchScreen~iphone.nib.
This test will fail if the IBTool logic does not properly determine
the outputs to pass to a final ibtool --link command to link all of
the storyboards together.
* [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.
For whatever reason, VS added it even if the package version is
0.9.5, but VS happily finds it and everything builds fine but
it breaks on xbuild/mono/mac??
* [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.
Scoped to the msbuild folder for now which has consistent C# and
MSBuild formatting. The rest of the repo seems to be using different
formatting, so I didn't want to have to decide one way or the other.
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.
[XM] Add release value option to msbuild/mmp to resolve XM 4.5 assemblies from system GAC
- This option "reverts" a C7 fix that prevented resovling assemblies from the GAC, which is unsafe
- If you use this option, you need to know what you are doing. The mono BCL and the XM BCL need to be compatible
- Use strictly puts you in the no support "you get to keep the pieces if it breaks" category.
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.
Starting with Xcode 7, storyboards are output as
Interface.storyboardc/Interface.plist instead of Interface.plist
We can also safely link these storyboards as long as we pass
the storyboardc directory to ibtool.
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.
* [msbuild/tests] Remove car idiom from Contents.json
The car idiom is something new projects used to generate
and that actool doesn't handle anymore.
Logs were polluted by a warning: "The app icon set 'AppIcons' has an unassigned child".
* [msbuild/tests] Add tvOS extension test
We now have MyTVServicesExtension project which
comes from a simple tvOS extension template.
It is attached to MyTVApp.
The TVApp test has been updated to also build the extension.
* [msbuild/tests] Fix Action Extension version number
The action extension project now has a version number that
is matching the parent app.
Avoids warning message.
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.