- Add a new Target of kind Aggregate, name it OCLint
- Under Builde Phases, add a new Run Script Phase
- Paste the script
- Select target OCLint
- Build the target (press ⌘+B)
| mr Marathi | |
| bs Bosnian | |
| ee_TG Ewe (Togo) | |
| ms Malay | |
| kam_KE Kamba (Kenya) | |
| mt Maltese | |
| ha Hausa | |
| es_HN Spanish (Honduras) | |
| ml_IN Malayalam (India) | |
| ro_MD Romanian (Moldova) |
| say -v \? | while read LINE | |
| do | |
| SPEAKER=$(echo $LINE | egrep -o "^[a-zA-Z\-]*[ ]?[A-Z][a-z]+") | |
| TEXT=$(echo $LINE | egrep -o "#.*" | tr "#" " ") | |
| echo $SPEAKER | |
| echo -ne "This is voice $SPEAKER speaking the example text: \n" $TEXT | say -v $SPEAKER | |
| done |
| # Mac OS X hidden files | |
| .DS_Store | |
| # Node | |
| npm-debug.log | |
| # WebStorm | |
| .idea/ | |
| xcrun simctl get_app_container booted [BUNDLE_INDENTIFIER] data |
| (UITextFieldDelegate)+\s*\n?\{ |
| name="(ActivityIndicator|BlackTextFieldText|Blue|BlueLineSeparate|BlueLinkColor|BluePercentage|BlueProgress|BlueQuestion|BlueThankYouText|BrownCircleLineChart|BrownFillColorLineChart|BrownPieChart|DarkGrayCatalog|GrayButton|GrayLineSeparate|GrayPieChart|GrayPlaceHolder|GraySelectedRaw|GrayTextFieldLine|GrayTextFieldTitle|GreenPieChart|GreenValuesLineChart|Orange)" |
| post_install do |installer| | |
| ignored_targets = ["autocontratacion-gonet", "Pods-autocontratacion-gonet_Example", "Pods-autocontratacion-gonet_Tests"] | |
| puts "\nSetting up targets." | |
| installer.pods_project.targets.each do |target| | |
| unless ignored_targets.include?(target.name) | |
| puts "Disabling warnings for target #{target}" | |
| target.build_configurations.each do |config| | |
| config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = "YES" | |
| end | |
| else |
| echo "Setting build and version numbers..." | |
| versionNumber=`date +%Y%m.%d`; echo "New versionNumber ${versionNumber}" | |
| buildNumber=`date +%H%M%S`; echo "New buildNumber ${buildNumber}" | |
| /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $versionNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}" | |
| /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}" | |
| echo "Setting branch name..." | |
| function parse_git_dirty() { | |
| git diff --quiet --ignore-submodules HEAD 2>/dev/null; [ $? -eq 1 ] && echo "*" | |
| } |
Extension:
import Foundation
import UIKit
extension UIColor {
convenience init(hexString: String) {
let hex = hexString.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
var int = UInt32()
Scanner(string: hex).scanHexInt32(&int)