fix(unity/ios): resolve UnityFramework module for hosted (pub.dev) installs#3
Open
jaymesC wants to merge 2 commits into
Open
fix(unity/ios): resolve UnityFramework module for hosted (pub.dev) installs#3jaymesC wants to merge 2 commits into
jaymesC wants to merge 2 commits into
Conversation
…yFramework in podspec
Bump version and add CHANGELOG entry for the iOS FRAMEWORK_SEARCH_PATHS fix so the corrected podspec can be published to pub.dev (0.0.3 cannot be re-published). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
gameframework_unity's podspec setFRAMEWORK_SEARCH_PATHSto"${PODS_ROOT}/../.symlinks/plugins/*/ios", but Xcode does not expand asingle
*glob in search paths. So the Swift compiler couldn't find theUnityFrameworkmodule vendored by the consumer plugin, and any projectdepending on the published package failed to build for iOS:
Swift Compiler Error: Unable to resolve module dependency: 'UnityFramework' import UnityFramework It only worked locally because
game syncplants a symlink inside this pod'sown dir (
PODS_TARGET_SRCROOT) — which never happens for hosted (pub.dev)installs.
Fix
Use Xcode's recursive
**syntax, which resolves to the consumer plugin'sios/dir regardless of plugin name — nogame syncsymlink, no Podfile hack:```diff
```
Verification
Built the
gameframework-unity-demoexample for an iOS device against thehosted-style dependency with a stock Podfile and no symlink →
✓ Built Runner.app, withUnityFrameworkembedded and linked.Type of Change