iOS: the Link metadata on automatically included items is incorrect #7692
Labels
area-single-project
Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer
platform/iOS 🍎
s/triaged
Issue has been reviewed
t/bug
Something isn't working
t/housekeeping ♻︎
Milestone
Description
The default item inclusion adds a
Link
metadata on the included items:maui/.nuspec/AutoImport.InTree.props
Line 54 in f746414
maui/.nuspec/AutoImport.InTree.props
Line 61 in f746414
maui/.nuspec/AutoImport.InTree.props
Line 67 in f746414
The
Link
metadata specifies the path inside the app bundle for these items, with one caveat: if the value starts with IPhoneResourcePrefix:maui/.nuspec/Microsoft.Maui.Controls.SingleProject.targets
Line 46 in 3a1dcdc
then we strip that off the final location.
Example:
IPhoneResourcePrefix=Resources
BundleResource
resource withLink
metadataResources/myResource.txt
MyApp.app/myResource.txt
, because we removedIPhoneResourcePrefix
from the start of the path.In MAUI's case, this is what happens:
IPhoneResourcePrefix=Platform/iOS/Resources
Platform/iOS/Resources/art.scnasset/SceneTest.scn
$(iOSProjectFolder)**/*.scnassets/*
, and theLink
metadata is%(RecursiveDir)%(FileName)%(Extension)
which resolves toResources/art.scnasset/SceneTest.scn
.Link
metadata does not start withIPhoneResourcePrefix
, which means the final location in the app bundle isMyApp.app/Resources/art.scnasset/SceneTest.scn
, which is incorrect.maui/.nuspec/AutoImport.InTree.props
Lines 58 to 63 in f746414
Steps to Reproduce
Test project is available here: xamarin/xamarin-macios#15104
Version with bug
6.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 15.4
Did you find any workaround?
Yes: xamarin/xamarin-macios#15104 (comment)
Relevant log output
No response
The text was updated successfully, but these errors were encountered: