Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge a9c21ef791
[dotnet] Add support for some of the single-project MSBuild properties. (#10545)
* [tests] Add test case for single-project properties in .NET.

* [msbuild] Add support for the single-project ApplicationId MSBuild property.

* [msbuild] Add support for the single-project ApplicationTitle, ApplicationVersion and AppleShortVersion MSBuild properties.

* [dotnet] Enable the single-project MSBuild properties by default.

* [dotnet] Add a short doc about single project properties.

* [tests] Fix the GeneratePlistTaskTests.BundleIdentifier test according to bundle identifier changes.

This test asserts that the CFBundleIdentifier value in the Info.plist isn't
overwritten, and does so by calling the CompileAppManifest task, giving it a
different value for the bundle identifier than what's in the Info.plist.

The behavior change is that now we do things in the following manner:

DetectSigningIdentityTask will read the Info.plist, compute a bundle
identifier (which will be the value from the Info.plist if it's there), and
returns it to the MSBuild code. Eventually that value will be passed to the
CompileAppManifestTask, which will write it to the Info.plist.

However, this test doesn't run the DetectSigningIdentityTask, which means that
the initial value for the bundle identifier doesn't come from the Info.plist.
2021-01-29 17:37:37 +01:00
Rolf Bjarne Kvinge d1c9cb2198
[msbuild] Simplify some code in DetectSigningIdentityTask. (#10479)
* We assigned the same value to DetectedBundleId in every branch, so instead
  assign it once at the beginning.
* We assigned the same value to DetectedAppId to most branches, so instead
  assign that value at the beginning as a default value.
2021-01-20 21:26:01 +01:00
Rolf Bjarne Kvinge 4a32d37c5d
[msbuild] Remove unused property from DetectSigningIdentityTask. (#10478) 2021-01-20 21:23:51 +01:00
Rolf Bjarne Kvinge 8e1f6e1d7e
[msbuild] Fix code signing logic for Mac Catalyst. (#10408)
Code signing for Mac Catalyst is very much like code signing for macOS, except that:

* If a provisioning profile is required, then we must find a code signing certificate.
* Provide a code signing key even if we don't need a code signing certificate.

This makes the tests in monotouch-test that require a correctly signed app pass.
2021-01-15 16:41:50 +01:00
Rolf Bjarne Kvinge 4181593b15
[msbuild] Merge the iOS and Mac versions of the DetectSigningIdentity task. (#10407)
Mac Catalyst needs much of the Mac signing logic, so merge the iOS and Mac
versions of DetectSigningIdentity so that the Xamarin.iOS.Tasks assembly
contains what it needs for Mac Catalyst.
2021-01-14 07:49:30 +01:00
Rolf Bjarne Kvinge 25ed862e34 [msbuild] Catalyst uses the macOS certificates and profiles for codesigning. 2020-12-03 10:42:26 +01:00
Rolf Bjarne Kvinge b5a1908cfd
[msbuild] Use localized error strings instead of constants for a few errors. (#10111)
Seems like this got past the localization work somehow.
2020-11-19 08:26:05 +01:00
Rolf Bjarne Kvinge bc2db4c60a
[msbuild] Share the _DetectSigningIdentity target. (#8785)
Also rework the class hierarchy a little bit, so that Xamarin.iOS and
Xamarin.Mac are identical:

	DetectSigningIdentityTaskBase
	└─── iOS/DetectSigningIdentityTaskCore
	│    └─── iOS/DetectSigningIdentity
	└─── Mac/DetectSigningIdentityTaskCore
	│    └─── Mac/DetectSigningIdentity
2020-06-08 08:58:59 +02:00
Rolf Bjarne Kvinge 7369b5edfb
[msbuild] Unify _RequireCodeSigning and EnableCodeSigning into _RequireCodeSigning. (#8743) 2020-06-04 15:17:32 +02:00
Rolf Bjarne Kvinge 3549ccf3dd
[msbuild] Inherit from Xamarin[Tool]Task instead of [Tool]Task in a most tasks. (#8582)
This makes it possible to remove a lot of duplicated code.
2020-05-13 15:44:59 +02:00
Waleed Chaudhry bcbfe4d5e4
[Localization] MSBuild 2020-03-13 17:46:28 -04:00
Rolf Bjarne Kvinge 3fcaa41419
[msbuild] Re-use tools/common/TargetFramework.cs. (#8044)
This allows us to replace Xamarin.MacDev.Tasks.PlatformFramework with
Xamarin.Utils.ApplePlatform.

It also allow for more complex target framework handling/parsing in the
future, using the TargetFramework class.
2020-03-05 15:21:35 +01:00
Sam 72afd997d6 Add more details to MSBuild errors for provisioning profiles (#5984) 2019-05-06 08:27:16 +02:00
Vincent Dondain e6ee7c5e2f
[msbuild] Add missing {1} in LogMessage (#3262) 2018-01-19 10:27:14 -05:00
Jeffrey Stedfast 7b663d11f1
[msbuild] Resolve a Provisioning Profile if needed for iOS Sim builds (#3244) 2018-01-18 16:29:14 -05:00
Jeffrey Stedfast c22d033e1a
[msbuild] DetectSigningIdentity fix for Mac when RequireProvisioningP… (#3212)
* [msbuild] DetectSigningIdentity fix for Mac when RequireProvisioningProfile is false

Fixes https://github.com/xamarin/maccore/issues/612

* Disable some tests since they don't make correct assumptions anymore

* Added comment to explain why tests are disabled
2018-01-12 14:21:52 -05:00
Jeffrey Stedfast cfdf59dce4 [msbuild] Tweak the codesign logic for iOS Simulator builds (#3114)
Don't *always* codesign, especially for iOS8 which seems to break.

iOS Simulator builds should only be codesigned if they require
Entitlements (signified by RequireProvisionProfile).
2018-01-08 14:32:00 -05:00
Vincent Dondain 808c67017d
[msbuild] Add support for optionally explaining why inapplicable certificates are not applicable (#3085)
Help fix #58251: When looking for valid signing certificates, print out each invalid certificate and state why it's not valid
(https://bugzilla.xamarin.com/show_bug.cgi?id=58251)
2017-12-12 14:25:04 -05:00
Jeffrey Stedfast a3692f4314 [msbuild] Codesign iOS Simulator builds using the '-' key. Fixes #59379 (#3060)
When codesigning iOS Simulator builds, it is important to note
that the codesign command itself cannot include the entitlements,
but the mtouch command *MUST* embed the entitlements using
-Xlinker.

https://bugzilla.xamarin.com/show_bug.cgi?id=59379
2017-11-29 15:26:29 -05:00
Rolf Bjarne Kvinge ce323717be
Revert "[msbuild] Fixed Condition for CalculateCodesignAppBundleInputs (#2843)" (#2944)
This reverts commit cb216083f1, because it breaks several monotouch-tests:

    [FAIL] KeyChainTest.Add_Certificate :   Add_Certificate
    [FAIL] KeyChainTest.AddQueryRemove_Identity :   Expected: True
    [FAIL] KeyChainTest.CheckId :   same guid
    [FAIL] KeyChainTest.SecItemAdd_Identity :   Expected: True
    [FAIL] RecordTest.Accessible_17579 :   Add
    [FAIL] RecordTest.AuthenticationType_17579 :   Add
    [FAIL] RecordTest.DeskCase_83099_InmutableDictionary :   Password could not be saved to keychain
    [FAIL] RecordTest.IdentityRecordTest :   Identity added
    [FAIL] RecordTest.Protocol_17579 :   Add
2017-11-01 16:19:02 +01:00
Jeffrey Stedfast cb216083f1
[msbuild] Fixed Condition for CalculateCodesignAppBundleInputs (#2843)
* [msbuild] Fixed Condition for CalculateCodesignAppBundleInputs

CodesignAppBundle was not being executed because the inputs were empty.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59379

* Codesign AppExtensiosn as well (and might as well run CodesignVerify too)

* Revert CompileEntitlements change, only compile them if we require codesigning

* Don't embed mobile provision file unless the build requires codesigning

* More fixes to codesigning iPhoneSimulator builds

* Fixed CodesignAppBundle tests to not check dsym timestamps for iPhoneSimulator builds

* Ignore the user's signing key & provisioning profile for Simulator builds

Xcode9 does not use them. It always codesigns Simulator builds with "-"
and never involves the specified provisioning profile.

This finally fixes the AppGroups sample to work properly

For CodesignVerify, having a _ProvisioningProfile defined means that
we have definitely codesigned the app bundle, so it makes sense to
verify the code signature (it probably doesn't make sense to do if
the codesign key is just "-", for example).
2017-10-30 16:52:03 -04:00
Jeffrey Stedfast b55f758caf [msbuild] Updated DetectSigningIdentity to allow thumbprints for the CodeSignKey (#2914) 2017-10-26 15:30:38 -04:00
Jeffrey Stedfast 64804703fb [msbuild] Fixed string formatting error (#2861) 2017-10-10 10:59:11 +02:00
Rolf Bjarne Kvinge 1ccd95acaa Add support for optionally explaining why inapplicable certificates are not applicable. Partially fixes #58251. (#2865)
This also requires a Xamarin.MacDev bump:

xamarin/Xamarin.MacDev@f83f84d Add support for optionally explaining why inapplicable provisioning profiles are not applicable. Partially fixes #58251. (#16)
xamarin/Xamarin.MacDev@d60d25b Added new iPhone X icon sizes

https://bugzilla.xamarin.com/show_bug.cgi?id=58251
2017-10-10 10:56:25 +02:00
Jeffrey Stedfast 9909748eb4 [msbuild] Emit a build error when CFBundleIdentifier is null/empty (#2791)
* [msbuild] Removed unused DetectBundleIdentifier task

* [msbuild] Emit a build error when Info.plist CFBundleIdentifier is null/empty

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59572
2017-10-06 10:26:33 +02:00
Jeffrey Stedfast 361f3abf53 [msbuild] Removed Task name/property logging that MSBuild does for us now (#2426) 2017-08-10 09:00:18 -04:00
Jeffrey Stedfast 146e7b3962 [msbuild] Allow Provisioning Profile lookups by name and use only the most recent version
Use the 'unique' argument to MobileProvisionIndex's lookup methods
to only get back the most recent versions of each provisioning
profile so that we don't accidentally pick an older version.
2016-11-01 12:27:18 -04:00
Jeffrey Stedfast 0eda3276b7 [msbuild] Allow codesigning Simulator builds w/o the need of a developer cert (#833) 2016-09-14 15:43:25 -04:00
Jeffrey Stedfast b8a90fd243 [msbuild] Even iOS Simulator builds now require signing certificates (#809)
Now that dylibs and frameworks are required to be signed in order to
run on the Simulator, we cannot allow the DetectSigningIdentity task
to return success if it didn't find a codesign key.
2016-09-09 19:14:05 +02:00
Rolf Bjarne Kvinge 68df944ad6 Build MSBuild targets & assemblies. 2016-04-24 14:48:44 -04:00