Where to add . swiftdoc and .swiftmodule file using podspec

Viewed 409

I want to add file with extension .swiftdoc and .swiftmodule through Cocoapods podspecs.

Those files should be added in "import paths" under "swift compiler search paths".

How is it possible?

My current podspect looks like:

  s.name         =  'Framework'
  s.version      =  '1.4'
  s.license      =  { :type => '', :file => 'LICENSE.md' }
  s.homepage     =  'http://google.com'
  s.authors      =  { 'orta' => 'saranjith' }

  s.summary      =  ''
  s.description  =  ''

  s.resources    =  'Bundle/Resources.bundle'
  
  s.vendored_libraries = 'Libraries/someName.a'
  s.??  = ModuleMap/someName.swiftmodule
1 Answers

I'm assuming you would like to create a podspec with an static library (by looking at your file extension .a)

Try with something like;

s.name         =  'Framework'
  s.version      =  '1.4'
  s.license      =  { :type => '', :file => 'LICENSE.md' }
  s.homepage     =  'http://google.com'
  s.authors      =  { 'orta' => 'saranjith' }

  s.summary      =  ''
  s.description  =  ''

  s.static_framework = true (Potentially needed)
  s.resources    =  'Bundle/Resources.bundle'
  s.vendored_libraries = 'Libraries/someName.a'
  s.source_files = 'Libraries/yourHeaders/*.h'
  s.preserve_paths = 'Libraries/**/*.*' (<-- Potentially you will need to preserve your paths)

Related