Quick note for iOS/macOS development tools :
Install cocoapods :
sudo gem install cocoapods
Pod declaration in Podfile
:
pod '<pod_name>'
pod '<pod_name>', :git => '<repo_url>.git', :branch => '<branch_name>' #specify branch
pod '<pod_name>', :git => '<repo_url>.git', :commit => '<commit_tag>' #specify commit
Install pods (based on Podfile.lock
) :
pod install
Update all pods :
pod update
Check project before push to cocoapods :
pod spec lint <my_pod_file>.podspec
If lint passing, push to cocoapods :
pod trunk push <my_pod_file>.podspec
Install Carthage :
brew install carthage
Declaration in Cartfile
(exemple) :
github "ashleymills/Reachability.swift"
github "ashleymills/Reachability.swift" ~> 3.0
Install carthage (based on Cartfile.resolved
) :
carthage bootstrap --platform iOS --cache-builds --no-use-binaries
Update all :
carthage update --platform iOS --cache-builds --no-use-binaries
Clean :
vapor clean -y
Build :
vapor build
Generate Xcode project (to build with SPM dependency) :
vapor xcode
Deploy on heroku (after login with heroku toolbox) :
vapor heroku push
A tool to enforce Swift style and conventions.
Installation :
brew install swiftlint
Auto correction :
swiftlint autocorrect
To add SwiftLint to xcodeproject just add a new "Run Script Phase" :
if which swiftlint >/dev/null; then
swiftlint
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
Install:
brew cask install fastlane
Update Fastlane :
fastlane update_fastlane
Install :
sudo gem install jazzy -n /usr/local/bin
Generate doc for all files :
jazzy --min-acl private fileprivate internal
Install : https://github.com/tonsky/FiraCode/wiki