Use CocoaPods to package static library .a files and .framework files

Use CocoaPods to package static library .a files and .framework files

Install the cocoapods-packager plugin

Execute the following command:

sudo gem install cocoapods-packager

Enter the password and see the following, it means that the cocoapods-packager plugin is successful

kinglydeMacBook-Pro:KYMenu kingly$ sudo gem install cocoapods-packager
Password:
Sorry, try again.
Password:
Fetching: cocoapods-packager-1.5.0.gem (100%)
Successfully installed cocoapods-packager-1.5.0
Parsing documentation for cocoapods-packager-1.5.0
Installing ri documentation for cocoapods-packager-1.5.0
Done installing documentation for cocoapods-packager after 0 seconds
1 gem installed

cd to the file directory where podspec is located

kinglydeMacBook-Pro:KYMenu kingly$ ls
Carthage		KYMenu.gif		KYMenuDemo_swift
KYMenu			KYMenu.podspec		LICENSE
KYMenu-0.0.8		KYMenuDemo_objc		README.md
kinglydeMacBook-Pro:KYMenu kingly$ 

Pack

Packaged into .framework files

$pod  package KYMenu.podspec --force  

Packaged into .a files. --force means force override

$pod  package KYMenu.podspec --library --force  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324943765&siteId=291194637