I've created a SDK framework and added all files (Swift, Objective C and c++). Also added shared.framework which is written in Kotlin(KMM). I linked SDK framework into dummy project and working correctly. Now I've to deliver SDK framework to cocoapod. So for that I've created PodSpec file inside SDK framework and installed it to demo project. It installed successfully, but can't access header files (Objective C) in swift file.
Here is my PodSpec file.
Pod::Spec.new do |spec|
spec.name = "DemoSDKSwift"
spec.version = "0.0.1"
spec.summary = "A short description of DemoSDKSwift."
spec.description = "A very long description of DemoSDKSwift."
spec.homepage = "https://BITBUCKET_URL.COM/DemoSDKSwift"
spec.source = { :git => "https://BITBUCKET_URL.COM/DemoSDKSwift.git", :tag => "#{spec.version}" }
spec.license = "MIT"
spec.author = { "Author Name" => "AuthorName@streamplate.com" }
spec.source_files = "DemoSDKSwift/**/*"
spec.platform = :ios, "15.0"
spec.ios.deployment_target = '15.0'
spec.vendored_frameworks = 'Frameworks/shared.framework'
spec.libraries = 'c++', 'sqlite3', 'z', 'stdc++'
spec.pod_target_xcconfig = {
'KOTLIN_PROJECT_PATH' => ':shared',
'PRODUCT_MODULE_NAME' => 'shared',
}
end
I also have added Bridging header file but it's not working. I tried so many solutions, but couldn't figure out. Please help to make it working.