Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to bind frameworks that contain bundles #36

Open
MerlinTHS opened this issue Jul 8, 2024 · 2 comments
Open

Unable to bind frameworks that contain bundles #36

MerlinTHS opened this issue Jul 8, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@MerlinTHS
Copy link

Hi, I'm trying to create a binding library for the Usercentrics framework. The binding for the Usercentrics Core framework works as expected. The binding for the UsercentricsUI framework crashes at runtime when calling any UI related method.
UsercentricsUI/ResourceLoader.swift:28: Fatal error: [USERCENTRICS] Cannot load bundle

I have uploaded a sample branch with minimal adjustments (calling Usercentrics methods in GetString) to the NewBinding template.
Is there a BuildAction to include bundles at runtime?

@silhanji
Copy link

Hi,

not sure if this is the optiaml approach, but I have had a similar issue and resolved it by copying bundle directory into build app. This can be done by adding following into binding project csproj file:

<ItemGroup>
  <Content Include="Path\To\Your\Bundle">
    <Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    <PublishFolderType>RootDirectory</PublishFolderType>
  </Content>
</ItemGroup>

@MerlinTHS
Copy link
Author

This results in an build error if I try to use it for a .bundle "file". A workaround is to copy the .bundle into the apps Resources/Raw directory.

@rachelkang rachelkang added the documentation Improvements or additions to documentation label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants