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
Importing header/source files with same names and different paths #8289
Comments
You'll need to use a |
@segiddins |
I have the same issue. I'm try to provide a pure C/C++ project, from a standalone Xcode project, into CocoaPods podspec syntax. The original Xcode project it's here : https://github.com/dreampiggy/libx265-Xcode It have 3 directory which contains the same name source file However, I can not write any correct way to port this into CocoaPods |
I try the Podspec syntax. However, the generate project source files list is totally wrong. Which treat any same name source files (for example,
The generate |
Right now, I can not find a way to solve this for CocoaPods. I thin it’s bug not feature. Because I’ve already use that Now, I have to pre-built the static library ( |
The podspec is here. You can have a try of that with |
OK. I found a hack way to pass this bug. It's to use Pod subspec to allow same filename exist in one Pod. 🐶 And, it take me hours to fix that The final achievement: https://github.com/SDWebImage/libx265-Xcode/blob/3.0/libx265.podspec#L44-L47 The Pod is now on trunk. The x265 codec: https://cocoapods.org/pods/libx265 |
And, during that Podspec, I found another usage issue of CocoaPods subspecs. Is there are any way, to make one I try this workaround, it works in local s.subspec 'common' do |ss|
ss.dependency 'libx265/core'
ss.source_files = 'source/common/*.{h,c,cpp,hpp}'
ss.public_header_files = 'source/x265.h'# dummy to mark all as project header
end |
Yes this is a bug, we've marked it as a defect but no one has taken the time to fix it. PRs are welcomed :)
Headers included in |
I’ll try to provide the solution to fix this. Maybe after the vacation. Though I’m not famaliar with Pods, but I have a little ruby language experience.... |
facing this problem. |
I have the same problem #11172 It solve the issue!
@vojerr I have the same sources for react-native and flutter module project. For RN I have this issue but flutter project have not. I dont understand the reason. |
Cocoapods version: 1.5.3
Xcode version: 10.0
Consider following structure of local pod dependency with objective-c sources:
dependency -> folder1 -> MyClass.h
dependency -> folder1 -> MyClass.m
dependency -> folder2 -> MyClass.h
dependency -> folder2 -> MyClass.h
Files MyClass in folder1 contains implementation of class, named MyClass1
Files MyClass in folder2 contains implementation of class, named MyClass2
It's general case, while using j2objc, that class names are different to files(different packages in java with same class names).
After importing this local dependency to cocoa pods workspace, files from both folders are imported to Xcode project, but from only from one folder are imported into project build phases (but twice). It breaks compilation.
Sample project, demonstrated issue:
https://github.com/vojerr/CocoapodsHeadersBug
The text was updated successfully, but these errors were encountered: