Skip to content

Commit

Permalink
[msbuild] Fix watchOS submissions with Xcode 14. Fixes #16499. (#16526)
Browse files Browse the repository at this point in the history
We have to remove any arm64e slices from the WK binary we copy from Apple's
SDK into the Watch app, as explained in Apple's forums.

Ref: https://developer.apple.com/forums/thread/714224
Fixes #16120.
Fixes #16499.
  • Loading branch information
rolfbjarne authored Nov 2, 2022
1 parent 060055a commit 0304f2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions msbuild/Xamarin.iOS.Tasks/Xamarin.WatchOS.App.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,16 @@ Copyright (C) 2015-2016 Xamarin. All rights reserved.
<Target Name="_CompileToNative" DependsOnTargets="$(_CompileToNativeDependsOn)"
Inputs="$(_NativeWatchApp)"
Outputs="$(_NativeExecutable);$(_AppBundlePath)_WatchKitStub\WK">

<PropertyGroup Condition="'$(_SdkIsSimulator)' != 'true'">
<!-- Remove any arm64e slices when building for device -->
<WKDittoArchitectures Condition="'$(WKDittoArchitectures)' == ''">--arch arm64_32 --arch arm64 --arch armv7k</WKDittoArchitectures>
</PropertyGroup>

<Ditto
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)'"
AdditionalArguments="$(WKDittoArchitectures)"
ToolExe="$(DittoExe)"
ToolPath="$(DittoPath)"
Source="$(_NativeWatchApp)"
Expand All @@ -85,6 +92,7 @@ Copyright (C) 2015-2016 Xamarin. All rights reserved.
<Ditto
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)'"
AdditionalArguments="$(WKDittoArchitectures)"
ToolExe="$(DittoExe)"
ToolPath="$(DittoPath)"
Source="$(_NativeWatchApp)"
Expand Down

5 comments on commit 0304f2b

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.