我试图将我的代码包装到CocoaPod库中(外部用作SDK),但我遇到了一些问题(我是新来的,所以我很抱歉如果它没有多大意义)。基本上我使用3个pod(Alamofire,MobilePlayer和SwiftEventBus),如果我有本地文件可以使用,那么最后2个将是很好的,因为我对它进行了一些修改。我这样做了吗?我怎样才能安装"那些在我的代码上使用它的依赖项(不是示例,而是我的Classes / * swift本身)?
我试过这个.podspec但是当我运行pod spec lint --verbose
时它给了我一些sintax错误:
- > SambaPlayerSDK.podspec
- 错误| spec:无法加载SambaPlayerSDK.podspec
中定义的规范。
[!]文件无效SambaPlayerSDK.podspec
:语法错误,意外=>,期待关键字_end
s.dependency =' MobilePlayer',:local => '库/ mobileplayer-IOS'
^
SambaPlayerSDK.podspec:41:语法错误,意外=>,期待keyword_end
... y =' MobilePlayer',:podspec => '库/ mobileplayer-IOS /莫...
...... ^
SambaPlayerSDK.podspec:42:语法错误,意外=>,期待keyword_end
s.dependency =' SwiftEventBus',:local => '库/ SwiftEventBus'
^
SambaPlayerSDK.podspec:43:语法错误,意外=>,期待keyword_end
... =' SwiftEventBus',:podspec => '库/ SwiftEventBus /斯威夫特...
...... ^。更新CocoaPods可能会解决问题。
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'
感谢您的帮助=)