Skip to content

Instantly share code, notes, and snippets.

@speaktoalvin
Last active February 19, 2017 03:03
Show Gist options
  • Save speaktoalvin/32cd0bb1b0aeccbe39b26ef6e34ed446 to your computer and use it in GitHub Desktop.
Save speaktoalvin/32cd0bb1b0aeccbe39b26ef6e34ed446 to your computer and use it in GitHub Desktop.
Creating a framework with Realm as a dependency
Pod::Spec.new do |s|
s.name = 'MyFramework'
s.version = '0.1.0'
s.summary = 'An iOS, watchOS and tvOS framework'
s.description = <<-DESC
An iOS, watchOS and tvOS framework
DESC
s.homepage = 'https://github.com/aaalveee/MyFramework'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Alvin Varghese' => 'alvinvarghese@live.com' }
s.source = { :git => 'https://github.com/aaalveee/MyFramework.git', :tag => s.version.to_s }
s.ios.deployment_target = '10.2'
s.watchos.deployment_target = '3.1'
s.tvos.deployment_target = '10.1'
s.source_files = 'MyFramework/Classes/**/*'
s.frameworks = 'Foundation'
s.dependency 'RealmSwift'
s.source_files = 'MyFramework/Classes/*.{swift}'
s.default_subspec = 'MainSpec'
# For full-scale integration, such as the iOS app
s.subspec 'MainSpec' do |core|
# You can specify other CocoaPods rules in here
core.resource_bundles = {
'MyFramework' => ['MyFramework/Assets/*.{jpg,png,realm}']
}
end
# For minimal integrations, like the watchOS widget
s.subspec 'LiteSpec' do |lite|
# You can specify other CocoaPod pods rules in here
lite.resource_bundles = {
'MyFramework' => ['MyFramework/Assets/*.{realm}']
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment