Skip to content

Commit 0367afd

Browse files
committed
Move RuntimeIdentifier to iOS-specific PropertyGroup for proper evaluation
The previous location in the main PropertyGroup didn't work because TargetFramework is not set during outer build evaluation. Moving the RuntimeIdentifier assignment to the iOS-specific PropertyGroup (using GetTargetPlatformIdentifier condition) ensures it's evaluated during the inner build when TargetFramework is actually set to net10.0-ios. This is the same pattern used for CodesignEntitlements, which works correctly. Now both the binding project and main project will build for simulator by default, avoiding code signing requirements in CI.
1 parent 68e0f10 commit 0367afd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

10.0/AgeSignals/AgeSignals/AgeSignals.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
<SingleProject>true</SingleProject>
1515
<ImplicitUsings>enable</ImplicitUsings>
1616
<Nullable>enable</Nullable>
17-
18-
<!-- Default iOS builds to simulator to avoid code signing requirements in CI -->
19-
<RuntimeIdentifier Condition="'$(TargetFramework)' == 'net10.0-ios' AND '$(RuntimeIdentifier)' == ''">iossimulator-x64</RuntimeIdentifier>
2017

2118
<!-- Display name -->
2219
<ApplicationTitle>Age Signals</ApplicationTitle>
@@ -86,6 +83,8 @@
8683
<!-- iOS Entitlements -->
8784
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
8885
<CodesignEntitlements>Platforms\iOS\Entitlements.plist</CodesignEntitlements>
86+
<!-- Force simulator build when no RuntimeIdentifier specified (CI builds) -->
87+
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">iossimulator-x64</RuntimeIdentifier>
8988
</PropertyGroup>
9089

9190
</Project>

0 commit comments

Comments
 (0)