4

I'm trying to wrap my code into a CocoaPod library ( for external use as a SDK ) but I'm experiencing some problems ( I'm new at this so I'm sorry if it doesn't make to much sense). Basically I'm using 3 pods ( Alamofire, MobilePlayer and SwiftEventBus ) and these last 2 would be great if I had the files local to work with since I'm doing some modifications on it. Am I doing this right? And how can I "install" those dependencies to use it on my code ( not the example one but my Classes/*swift itself )?

I've tried this .podspec but it gives me some sintax errors when I run pod spec lint --verbose:

-> SambaPlayerSDK.podspec - ERROR | spec: The specification defined in SambaPlayerSDK.podspec could not be loaded.

[!] Invalid SambaPlayerSDK.podspec file: syntax error, unexpected =>, expecting keyword_end s.dependency = 'MobilePlayer', :local => 'library/mobileplayer-ios' ^ SambaPlayerSDK.podspec:41: syntax error, unexpected =>, expecting keyword_end ...y = 'MobilePlayer', :podspec => 'library/mobileplayer-ios/Mo... ... ^ SambaPlayerSDK.podspec:42: syntax error, unexpected =>, expecting keyword_end s.dependency = 'SwiftEventBus', :local => 'library/SwiftEventBus' ^ SambaPlayerSDK.podspec:43: syntax error, unexpected =>, expecting keyword_end ... = 'SwiftEventBus', :podspec => 'library/SwiftEventBus/Swift... ... ^. Updating CocoaPods might fix the issue.

  s.platform     = :ios, '8.0'
  s.requires_arc = true
  s.source_files = 'Pod/Classes/**/*'
  s.resource_bundles = {
    'SambaPlayerSDK' => ['Pod/Assets/*.png']
  }
  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
  s.dependency = 'Alamofire', '~> 3.0'
  s.dependency = 'MobilePlayer', :path => 'library/mobileplayer-ios'
  s.dependency = 'MobilePlayer', :podspec => 'library/mobileplayer-ios/MobilePlayer.podspec'
  s.dependency = 'SwiftEventBus', :path => 'library/SwiftEventBus'
  s.dependency = 'SwiftEventBus', :podspec => 'library/SwiftEventBus/SwiftEventBus.podspec'

Thanks for any help =)

0 Answers0