CocoaPods
Jump to navigation
Jump to search
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
MergePBX
brew install mergepbx
git config --global merge.mergepbx.name "XCode project files merger"
git config --global merge.mergepbx.driver "mergepbx %O %A %B"
# git config --global core.attributesfile ~/.gitattributes
echo '*.pbxproj merge=mergepbx' >> ~/.gitattributes
Fixing
pod deintegrate
sudo gem install cocoapods-clean
sudo gem install cocoapods -v 1.9.1
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'
Static Framework
Like pod 'GoogleMaps', '~> 3.8.0'
there are some static frameworks. I mean framework inside framework. For what we have to add the property as below in Podspec for the dependency pod framework where static framework or has pod dependency like pod 'GoogleMaps', '~> 3.8.0'
s.static_framework = true
use_frameworks! :linkage => :static
is the alternative of the dependency framework Podspec s.static_framework = true
property. If s.static_framework = true
property missed in the Podspec of any dependency framework which contains static framework then we could use use_frameworks! :linkage => :static
in the dependent Podfile to handle such static framework.
use_frameworks! :linkage => :static
Private Pod Patch
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
url=bit.chorke.org:chorkeorg/academia-core-iossql.git;pod='AcademiaCoreSQL';\
pod repo remove $pod;pod repo add $pod $url;pod update $pod
url=bit.chorke.org:chorkeorg/academia-core-iosapi.git;pod='AcademiaCoreAPI';\
pod repo remove $pod;pod repo add $pod $url;pod update $pod
url=bit.chorke.org:chorkeorg/academia-core-iosgui.git;pod='AcademiaCoreGUI';\
pod repo remove $pod;pod repo add $pod $url;pod update $pod
url=bit.chorke.org:chorkeorg/academia-rupa-iossql.git;pod='AcademiaRupaSQL';\
pod repo remove $pod;pod repo add $pod $url;pod update $pod
url=bit.chorke.org:chorkeorg/academia-rupa-iosapi.git;pod='AcademiaRupaAPI';\
pod repo remove $pod;pod repo add $pod $url;pod update $pod
url=bit.chorke.org:chorkeorg/academia-rupa-iosvum.git;pod='AcademiaRupaVUM';\
pod repo remove $pod;pod repo add $pod $url;pod update $pod
url=bit.chorke.org:chorkeorg/academia-rupa-iosgui.git;pod='AcademiaRupaGUI';\
pod repo remove $pod;pod repo add $pod $url;pod update $pod
Multiple Commands Error
For Xcode 11.4 please select the Xcode menu item as following:
File » Workspace Settings » Shared Workspace Settings » Build System » Legacy Build System ⌘ + Shift + Option + K ⌘ + Shift + K ⌘ + Shift + R ⌘ + R ⌘ + U
p='academia-main-iosapp';b="$p.bkp";if [ -d "$b" ];then rm -rf $b;fi;mv $p $b;\
git clone "bit.chorke.org:chorkeorg/$p.git";if [ -d "$p" ];then cd $p;\
cp ../$b/Podfile* .;pod install;git status;cd ..;fi
Xcode Freeze
sudo rm -rf ~/Library/Developer/Xcode/
sudo rm -rf ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState/