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

Fix SWIFT_INCLUDE_PATHS for swift library xcframework #11282

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

xuzhongping
Copy link
Contributor

Issue

Description

Existing issues

  1. If a swift library of type library exists in vendored xcframework, SWIFT_INCLUDE_PATHS is not set correctly.
  2. The PR does not fully fix the issue.

About the part I fixed SWIFT_INCLUDE_PATHS

  1. when vendored_xcframework exists in the podspec and contains the swift library,
  2. 1 and when test_spec or app_spec exists in podspec,
  3. 1 and 2 and when source files exist in the podspec

@dnkoutso
Copy link
Contributor

dnkoutso commented Apr 1, 2022

Cc @igor-makarov

@xuzhongping xuzhongping force-pushed the fix/swift_lib_xcframework_import_paths branch from c3cdbaf to c564834 Compare April 1, 2022 14:32
@xuzhongping
Copy link
Contributor Author

The unit test failed in the ubuntu system. I debugged and found that the file path is case-sensitive, while mac is case-insensitive. I found in the xcframework_slice.rb file that this method lowercases the first letter of the name. This caused my unit test to fail. Why is it downcase here? Does anyone know the reason?🤔

# @return [String] the name of the framework
        #
        def name
          @name ||= begin
            case package_type
            when :framework
              File.basename(path, '.framework')
            when :library
              result = File.basename(path, '.a').gsub(/^lib/, '')
              result[0] = result.downcase[0]
              result
            else
              raise Informative, "Invalid package type `#{package_type}`"
            end
          end
        end

@xuzhongping xuzhongping force-pushed the fix/swift_lib_xcframework_import_paths branch from d090d5e to 36d12c8 Compare April 2, 2022 11:41
@xuzhongping
Copy link
Contributor Author

xuzhongping commented Sep 10, 2022

I don't quite understand why 'config_spec.rb -> exclude_from_backup ' fails, but it shouldn't be related to my modification.

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

Successfully merging this pull request may close these issues.

None yet

2 participants