Not able to export MyLibrary-Swift.h header from apple_library()
See original GitHub issueI have a library that has Swift and Objective-C code. Some Swift classes I want to export to Objective-C, I see that buck correctly generates MyLibrary-Swift.h
for all classes marked as @objc
, however I don’t see a way export this header from my library, so that I can used it in my dependencies. Is this possible?
apple_library(
name = 'MyLibrary',
srcs = [
'ObjC.m',
'SwiftKit1.swift',
'SwiftKit2.swift'
],
exported_headers = [
'ObjC.h',
'MyLibrary-Swift.h' <---------------------------------------- this doesn't work
],
visibility = ['PUBLIC']
)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Importing Project-Swift.h into a Objective-C class...file not found
I found a new way to find the correct generated header file name: go to your target -> Build Settings -> Search keywords...
Read more >Importing Swift into Objective-C - Apple Developer
Overview. You can work with types declared in Swift from within the Objective-C code in your project by importing an Xcode-generated header file....
Read more >Framework header file not found error in Xcode 8 editor
So in my case, everything is Swift. Swift app using a Swift framework. The Swift framework generates the .framework file and sticks it...
Read more >Xcode12: Application Target's "Module-Swift.h" File Not Found
I went through and commented out all of our ObjC code that references our Swift code and commented out all imports of the...
Read more >umbrella header not found | Apple Developer Forums
I fixed this by deleting my Project.h using Xcode (with move to trash) and then recreating it. Posted 7 years ago by. bartleby....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nguyentruongtho, could you please let me know what is the latest status on that? I’d love if you could ping me on Messenger: http://m.me/gontovnik
Thanks!
This is part of the ongoing work for creating module from a target, but I guess it can solve your problem already: https://github.com/nguyentruongtho/buck/tree/tho/swift_exported_header
You can find very dummy poc sample here: https://github.com/nguyentruongtho/buck_swift_test/tree/master/swift_export_headers
Run:
rm -rf buck-out && buck run :parent#macosx-x86_64
Let me know if you find any edge cases.