You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[msbuild] Enable signing by default for all platforms. Fixes#18469.
Enable signing by default for all platforms, because that's what Xcode does.
This fixes an issue for simulator builds, where certain features don't work unless
the app is signed (#18469).
It also simplifies and unifies our code to detect signing identities, so that it's
much more shared/equal beteween platforms.
However, simulator builds have a few peculiarities:
* The placeholder code signing certificate ("-", or what Xcode calls "Sign to
Run Locally") is always used.
* Any entitlements the app requests will be embedded in the native executable in
a Mach-O section named `__ents_der`.
* The actual app signature only demands the
"com.apple.security.get-task-allow" entitlement (which seems to be allowed
without a provisioning profile when using the placeholder code signing
certificate).
* No provisioning profiles are used.
In order to provide a fairly decent way of restoring old behavior (not signing simulator
builds), I created a public property to determine whether we're building for the
simulator (SdkIsSimulator), and added documentation on how to use this new property
to disable code signing.
Fixes#18469.
Log.LogMessage(MessageImportance.Low,"The item '{0}' contains '{1}', which must be signed, which means that the item must be signed too.",item.ItemSpec,sortedItems[i].ItemSpec);
Log.LogMessage(MessageImportance.Low,"The item '{0}' contains '{1}', which must be signed, which means that the item must be signed too.",item.ItemSpec,sortedItem.ItemSpec);
157
161
returntrue;// there's an item inside this directory that needs to be signed, so this directory must be signed too
158
162
}
159
163
}
@@ -416,17 +420,22 @@ bool ExecuteUnsafe ()
416
420
}
417
421
418
422
// first sort all the items by path length, longest path first.
Log.LogWarning(null,null,null,Entitlements,0,0,0,0,MSBStrings.W0108b/* Cannot expand $(TeamIdentifierPrefix) in Entitlements.plist without a provisioning profile for key '{0}' with value '{1}' */,key,pstr.Value);
151
166
warnedTeamIdentifierPrefix=true;
@@ -455,7 +470,7 @@ public override bool Execute ()
455
470
MobileProvision?profile;
456
471
PDictionarytemplate;
457
472
PDictionarycompiled;
458
-
PDictionaryarchived;
473
+
PDictionary?archived=null;
459
474
stringpath;
460
475
461
476
switch(SdkPlatform){
@@ -507,34 +522,50 @@ public override bool Execute ()
/* The path to the entitlements must be resolved to the full path, because we might want to reference it from a containing project that just references this project,
526
+
* and in that case it becomes a bit complicated to resolve to a full path on disk when building remotely from Windows. Instead just resolve to a full path here,
527
+
* and use that from now on. This has to be done from a task, so that we get the full path on the mac when executed remotely from Windows. */
/* The path to the entitlements must be resolved to the full path, because we might want to reference it from a containing project that just references this project,
525
-
* and in that case it becomes a bit complicated to resolve to a full path on disk when building remotely from Windows. Instead just resolve to a full path here,
526
-
* and use that from now on. This has to be done from a task, so that we get the full path on the mac when executed remotely from Windows. */
0 commit comments