Skip to content

iOS ODR not working #26218

Description

@sethom

Apple platform

iOS

Framework version

net10.0-*

Affected platform version

VS Insiders [12009.208]

Description

I am upgrading an app from XF and can't get ODR for iOS to work in the simulator or on a device. Here are the steps I've taken to configure ODR.

  • I have selected "Embed on-demand resources in the app bundle"
  • I have set my appId in the Maui csproj file using the ApplicationId tag.
  • The asset in question is not duplicated under the Platforms folder.
  • I have tried to specify the on-demand resource using both versions of the syntax:

<MauiAsset Update="Resources\Raw\SoundFonts\AcousticGuitar.sf2" ResourceTags="SFAcousticGuitar" AssetPack="SFAcousticGuitar" />

and...

<BundleResource Include="Resources\Raw\SoundFonts\AcousticGuitar.sf2" LogicalName="AcousticGuitar.sf2">
	<OnDemandResource>true</OnDemandResource>
	<OnDemandResourceTags>SFAcousticGuitar</OnDemandResourceTags>
</BundleResource>

This last suggestion was made by CoPilot. I can't seem to find much documentation on how to do ODR correctly in MAUI. The app crashes when executing the code to fetch the resource. In my older XF version of this app, there is "OnDemandResources" under the Release folder which contains a list of asset pack folders which contain info.plist files and the actual assets. This OnDemandResources folder or equivalent can't be found anywhere that I can find under the bin folder.

Any ideas?

Regards,

Sean

Steps to Reproduce

Steps are outlined above.

Did you find any workaround?

No response

Build logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    need-attentionAn issue requires our attention/response

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions