Create Cocoapod using Binary iOS Framework (Dynamic Framework )
CocoaPod Specifications
you have successfully exported the universal framework, let’s distribute it as a CocoaPod!
steps 1: create Pod spec name using cmd —
$ pod spec create myFramework
I’m using ShooterFramework Name
Created a myFramework.podspec
(ShooterFramework) file in your directory which will contain information about the CocoaPod you are publishing, such as its name, version, sources, and more.
Paste the following contents inside it:
Pod::Spec.new do |spec|
spec.name = "ShooterFramework"
spec.version = "0.0.1"
spec.summary = "A ShooterFramework of ShooterFramework gamers. "
spec.description = "this is just for shooter lovers gamers "
spec.homepage = "https://www.dropbox.com/"
spec.license = { :type => 'MIT', :file => 'LICENSE' }
spec.author = { "Krishna" => "krishna@gmail.com" }
spec.source = { :git => "https://www.dropbox.com/**/SpaceShooter.zip?dl=0", :tag => "{spec.version}" }
spec.platform = :ios, "11.0"
spec.ios.deployment_target = "11.0"
spec.vendored_frameworks = 'SpaceShooter.framework'
end
you can change content accordingly you name, ver, sum, disc, source link, etc.
Here is an explanation for some of the more non-trivial properties:
s.license
- you must ship a license file with your CocoaPod, so go ahead and create aLICENSE
file in your project directory with this as its content.s.source
- the hosted.zip
location of your CocoaPod files (in your case, theMySDK.framework
folder and theLICENSE
file). More on this later.s.ios.vendored_frameworks
- the path of the framework you are distributing within thes.source
archive, after being decompressed.
then check your framework is working using cmd
$ pod spec lint ShooterFramework.podspec
cool almost done !
after that register in cocoapod using cmd —
pod trunk register krishna@gmail.com
then push pod trunk push MyFramework.podspec
references
https://gist.github.com/kushwaha03/57537bd93d330c87269248c2adf00d25
Thank you!
Connect on Linkedin