CocoaPods: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 90: Line 90:


==References==
==References==
* [https://stackoverflow.com/questions/61442990 GoogleMaps causes build error as an indirect dependency]
{|
| valign="top" |
* [https://medium.com/@shahabejaz/create-and-distribute-private-libraries-with-cocoapods-5b6507b57a03 Distribute Private Libraries with Cocoapods]
* [https://medium.com/@shahabejaz/create-and-distribute-private-libraries-with-cocoapods-5b6507b57a03 Distribute Private Libraries with Cocoapods]
* [https://stackoverflow.com/questions/46428752 Clean specific pod from the local cache]
* [https://stackoverflow.com/questions/46428752 Clean specific pod from the local cache]
Line 101: Line 102:
* [https://stackoverflow.com/questions/50199354 Add Git Repository as Pod]
* [https://stackoverflow.com/questions/50199354 Add Git Repository as Pod]
* [https://guides.cocoapods.org/using/pod-install-vs-update.html Pod install vs. pod update]
* [https://guides.cocoapods.org/using/pod-install-vs-update.html Pod install vs. pod update]
| valign="top" |
* [https://stackoverflow.com/questions/61442990 GoogleMaps causes build error as an indirect dependency]
* [https://stackoverflow.com/questions/50718018 Error: Multiple commands produce]
* [http://guides.cocoapods.org/making/private-cocoapods.html Private Pods]
* [http://guides.cocoapods.org/making/private-cocoapods.html Private Pods]
|}

Revision as of 00:59, 27 April 2020

Install

pod --version
pod repo update
cd  /opt/dev/chorke/academia/code/base_workspaces/
cd ./core_workspace/academia-core-ioslib/

pod init
vim Podfile 
open -a xcode Podfile
pod install
1. Target > building settings > ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES, Value type is Boolean, click on the other, change the value to $(inherited)
2. pod update
3. Done

Fixing

pod deintegrate
sudo gem install cocoapods-clean
cd  /opt/dev/chorke/academia/code/base_workspaces/
cd ./init_workspace/academia-init-iosapp/

pod clean
pod setup
pod install

Podspec

pod lib create AcademiaCoreLIB
cd AcademiaCoreLIB/

pod lib lint AcademiaCoreLIB.podspec 
pod repo push AcademiaCoreLIB AcademiaCoreLIB.podspec 
ls -la ~/.cocoapods/repos/AcademiaCoreLIB/AcademiaCoreLIB/1.0.0/
pod repo add AcademiaCoreLIB bit.chorke.org:chorkeorg/academia-core-ioslib.git
pod spec create AcademiaCoreLIB
open -a Xcode AcademiaCoreLIB.podspec
pod spec lint AcademiaCoreLIB.podspec
pod lib lint
:'
git tag -d v1.0.0
git push --delete origin v1.0.0
'
git tag v1.0.0
git push origin v1.0.0
pod trunk register [email protected] 'Chorke Academia' --description='Chorke Academia, Inc.'
pod trunk push
pod install
# pod repo update
pod update AcademiaCoreLIB
pod install --repo-update

Private Podspec

pod repo add AcademiaCoreLIB bit.chorke.org:chorkeorg/academia-core-ioslib.git
cd ~/.cocoapods/repos/AcademiaCoreLIB/; pod repo lint .
pod repo push AcademiaCoreLIB AcademiaCoreLIB.podspec
pod repo remove AcademiaCoreLIB
# add to podfile as pod dependency
pod 'AcademiaCoreLIB', :git => 'bit.chorke.org:chorkeorg/academia-core-ioslib.git'

Private Pod Patching

tag='v1.0.0';git tag -d $tag;git push --delete origin $tag;\
git tag $tag;git push origin $tag

url=bit.chorke.org:chorkeorg/academia-core-ioslib.git;pod='AcademiaCoreLIB';\
pod repo remove $pod;pod repo add $pod $url;pod update $pod

References