example: https://github.com/tareq3/RandomCarsFramework
Pod::Spec.new do |spec|
spec.name = 'RandomCars'
spec.version = '0.2'
spec.license = { :type => 'MIT' }
spec.homepage = 'https://github.com/tareq3/'
spec.authors = { 'Tareq' => 'mti.tareq3@gmail.com' }
spec.summary = 'Random Cars generator'
spec.source = { :git => 'https://github.com/tareq3/RandomCarsFramework.git', :tag => spec.version.to_s }
spec.requires_arc = true
spec.ios.deployment_target = '10.0'
spec.xcconfig = {
'FRAMEWORK_SEARCH_PATHS' => '$(inherited)'
}
spec.default_subspec = 'Debug'
spec.subspec 'Debug' do |sp|
sp.vendored_frameworks = 'RandomCars.xcframework'
end
spec.subspec 'Release' do |sp|
sp.vendored_frameworks = 'RandomCars.xcframework'
end
spec.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64 i386' }
spec.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64 i386' }
end
Step 7: Now make a commit and push the code and try to make a release and tag with your framework version . ex: 0.1
create tag and release tag from terminal
git tag '0.1'
git push --tags
test lib
arch -x86_64 pod lib lint --verbose --allow-warnings
test spec
arch -x86_64 pod spec lint --verbose --allow-warnings
push the code to cocoapod now
arch -x86_64 pod trunk push RandomCars.podspec --allow-warnings
you may need to register
pod trunk register mti.tareq3@gmail.com Tareq
pod 'RandomCars', :git => 'https://github.com/tareq3/RandomCarsFramework.git', :tag => '0.2'