Skip to content

Commit 8796b16

Browse files
authored
Merge pull request #4 from xraph/fix/framework-search-path-macos-unreal
fix(podspec): recursive ** framework search path on Unity macOS + Unreal iOS
2 parents 443d74f + 937fab5 commit 8796b16

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

engines/unity/dart/macos/gameframework_unity.podspec

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ to sync your Unity export to your plugin's macos/ directory.
4242
s.pod_target_xcconfig = {
4343
'DEFINES_MODULE' => 'YES',
4444
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386',
45-
# Search for frameworks in the local directory (symlink), Pods build directory, and sibling plugins
46-
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_TARGET_SRCROOT}" "${PODS_CONFIGURATION_BUILD_DIR}" "${PODS_ROOT}/../.symlinks/plugins/*/macos"',
45+
# Find UnityFramework wherever the consumer plugin vendors it. NOTE: Xcode
46+
# does NOT expand a single `*` in search paths, so "plugins/*/macos" never
47+
# resolves for hosted (pub.dev) installs — it only worked when `game sync`
48+
# planted a symlink in this pod's own dir. Use Xcode's recursive `**`
49+
# syntax, which searches all subdirectories under the plugins symlink dir.
50+
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_TARGET_SRCROOT}" "${PODS_CONFIGURATION_BUILD_DIR}" "${PODS_ROOT}/../.symlinks/plugins/**"',
4751
# Allow weak linking to UnityFramework
4852
'OTHER_LDFLAGS' => '$(inherited) -ObjC'
4953
}

engines/unreal/dart/ios/gameframework_unreal.podspec

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ to sync your Unreal export to your plugin's ios/ directory.
4444
s.pod_target_xcconfig = {
4545
'DEFINES_MODULE' => 'YES',
4646
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386',
47-
# Search for frameworks in the local directory (symlink), Pods build directory, and sibling plugins
48-
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_TARGET_SRCROOT}" "${PODS_CONFIGURATION_BUILD_DIR}" "${PODS_ROOT}/../.symlinks/plugins/*/ios"',
47+
# Find UnrealFramework wherever the consumer plugin vendors it. NOTE: Xcode
48+
# does NOT expand a single `*` in search paths, so "plugins/*/ios" never
49+
# resolves for hosted (pub.dev) installs — it only worked when `game sync`
50+
# planted a symlink in this pod's own dir. Use Xcode's recursive `**`
51+
# syntax, which searches all subdirectories under the plugins symlink dir.
52+
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_TARGET_SRCROOT}" "${PODS_CONFIGURATION_BUILD_DIR}" "${PODS_ROOT}/../.symlinks/plugins/**"',
4953
# Allow weak linking to UnrealFramework
5054
'OTHER_LDFLAGS' => '$(inherited) -ObjC',
5155
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES'

0 commit comments

Comments
 (0)