Skip to content

Load host FFI libraries for Mac Catalyst tests - #11

Merged
marcprux merged 1 commit into
skiptools:mainfrom
fhasse95:maccatalyst-host-ffi
Aug 19, 2026
Merged

Load host FFI libraries for Mac Catalyst tests#11
marcprux merged 1 commit into
skiptools:mainfrom
fhasse95:maccatalyst-host-ffi

Conversation

@fhasse95

@fhasse95 fhasse95 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for loading macOS host FFI dylibs during Robolectric test runs launched from Mac Catalyst XCSkipTests.

Since Mac Catalyst test bundles cannot provide native libraries directly to the macOS JVM used by Robolectric, the harness pass a host library directory via SKIP_FFI_LIBRARY_PATH, and skip-ffi uses that path before falling back to the existing behavior.

Related PRs:


Thank you for contributing to the Skip project! Please use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Please review the contribution guide at https://skip.dev/docs/contributing/ for advice and guidance on making high-quality PRs.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

AI was used to help identify the Catalyst/Robolectric host-library issue and draft the changes. Afterwards, I manually reviewed the code and verified the affected XCSkipTests from a Mac Catalyst test target.


@marcprux marcprux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I presume it is expected to be on the user to manually set the correct SKIP_FFI_LIBRARY_PATH environment in their testing?

@marcprux
marcprux merged commit 7ade715 into skiptools:main Aug 19, 2026
3 checks passed
@fhasse95

Copy link
Copy Markdown
Contributor Author

Looks good. I presume it is expected to be on the user to manually set the correct SKIP_FFI_LIBRARY_PATH environment in their testing?

It can technically be set manually by the user, but it’s primarily intended as an internal environment variable. The corresponding setup is part of skiptools/skip#724, where SKIP_FFI_LIBRARY_PATH is set automatically to the macOS host build output directory when running Robolectric tests for Mac Catalyst targets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants