dotnet / dotnet/macios

ACToolTaskBase's AppendCommandLineArguments does not seem to support XSAppIconAssets/XSLaunchImageAssets outside of project directory

Open
#13,592 0 comments 0 reactions 0 assignees View on GitHub
iOS msbuild
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 13h
Merged PRs (30d)
96

Description

While working on the submission tests, I came across a strange NET6 tv extension test failure:

To quote [the work around PR](https://github.com/xamarin/SubmissionSamples/pull/47):

> The ODRsTVOS test redirected outside and up to the legacy test directory to reuse it's Assets.xcassets folder.

> However, this was causing failures like this:

```
*** Error: Validation failed for '../../../../SubmissionSamples/ODRsTVOS_Extension/ODRsTVOS/bin/iPhone/Release/ODRsTVOS.ipa'.
*** Error: Missing Info.plist Key. Your app's Info.plist must contain the 'CFBundleIcons.CFBundlePrimaryIcon' key. App
*** Error: Missing Info.plist Key. Your app's Info.plist must contain the 'TVTopShelfImage.TVTopShelfPrimaryImageWide' key. App Store operation failed. (1091)
```

> for the NET6 variant.

> After a bunch of msbuild debugging, it turned out that we were not passing these argument to actool:

```
- --app-icon "App Icon & Top Shelf Image"
- --launch-image LaunchImages
```

> This seems to be because [this check](https://github.com/xamarin/xamarin-macios/blob/main/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ACToolTaskBase.cs#L74) fails when the directory is not next to the csproj.

This issue is to look into that strangeness. Given that it appears to affect legacy just as much as NET6, it is not marked at NET6 issue.

### Steps to Reproduce

1. Undo https://github.com/xamarin/SubmissionSamples/pull/47 and run `SUBMISSION_FILTERS="--filter=ODRsTVOS_Extension" make` OR create a project, move the assets out of the folder, and use a redirect ../ to path it outside of the folder, then build and submit the ipa.
2. Note that `- --app-icon "App Icon & Top Shelf Image" - --launch-image LaunchImages ` are not passed to actool or that the final binary info.plist doesn't have CFBundlePrimaryIcon for example.

### Build Logs

This is Legacy with my hack to remove/redirect the asset folder outside the project:

[msbuild.binlog.zip](https://github.com/xamarin/xamarin-macios/files/7730879/msbuild.binlog.zip)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.