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

[Bug] Xcode Index not works for xcframework #12356

Open
Whirlwind opened this issue Apr 18, 2024 · 0 comments
Open

[Bug] Xcode Index not works for xcframework #12356

Whirlwind opened this issue Apr 18, 2024 · 0 comments

Comments

@Whirlwind
Copy link
Contributor

Whirlwind commented Apr 18, 2024

Report

What did you do?

I using a pod with a xcframework in its podspec:

s.vendor_frameworks = "xx.xcframework"

After pod install, xcode build success, but the xcode index system throw a error:
image

I check the index log:

-F/Users/username/Library/Developer/Xcode/DerivedData/XX-enbejkwbbrxfrvblkydbbmgjooda/Index.noindex/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/XXXXX

And the build log:

-F/Users/username/Library/Developer/Xcode/DerivedData/XX-enbejkwbbrxfrvblkydbbmgjooda/Build/Products/InhuseDebug-iphoneos/XCFrameworkIntermediates/XXXXX

And the xcconfig:

PODS_BUILD_DIR=${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR=${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_XCFRAMEWORKS_BUILD_DIR=${PODS_CONFIGURATION_BUILD_DIR}/XCFrameworkIntermediates

It seem that the Xcode Index System and Build System will change the BUILD_DIR to different value, and the copy-xcframeworks.sh only copy the framework to BUILD_DIR when Build Sytem running.

So the Xcode Index System will could not find the framework.

I change to change the PODS_XCFRAMEWORKS_BUILD_DIR in all xcconfig:

PODS_XCFRAMEWORKS_BUILD_DIR=${PODS_ROOT}/XCFrameworkIntermediates/$(EFFECTIVE_PLATFORM_NAME)

( I remove the ${CONFIGURATION}, I don't known why the Index System always use the Debug, but there is not a Debug configuration in my project.)

It works both Index System and Build System.

CocoaPods Environment

Stack

   CocoaPods : 1.10.1
        Ruby : ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23]
    RubyGems : 3.0.3.1
        Host : macOS 14.1.1 (23B81)
       Xcode : 15.0 (15A240d)
         Git : git version 2.44.0
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories :

Installation Source

Executable Path: /Users/bytedance/.bundle/vendor/ruby/2.6.0/bin/pod

Plugins

cocoapods-deintegrate   : 1.0.5
cocoapods-plugins       : 1.0.0
cocoapods-search        : 1.0.1
cocoapods-trunk         : 1.6.0
cocoapods-try           : 1.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant