Here is the looks and feel of your terminal once the tutorial has been applied on your system:
Using Homebrew:
| #!/bin/bash | |
| # update_build_number.sh | |
| # Usage: `update_build_number.sh [branch]` | |
| # Run this script after the 'Copy Bundle Resources' build phase | |
| # Ref: http://tgoode.com/2014/06/05/sensible-way-increment-bundle-version-cfbundleversion-xcode/ | |
| branch=${1:-'master'} | |
| buildNumber=$(expr $(git rev-list $branch --count) - $(git rev-list HEAD..$branch --count)) | |
| echo "Updating build number to $buildNumber using branch '$branch'." |
| def generate_modulemap(name, path) | |
| f = File.new(File.join("#{path}/module.modulemap"), "w+") | |
| module_name = "#{name}" | |
| while(module_name["+"]) | |
| module_name["+"] = "_" | |
| end | |
| f.puts("module XB#{module_name} {") | |
| f.puts(" umbrella header \"#{name}_umbrella.h\"") | |
| f.puts(" export *") | |
| f.puts("}") |
Here is the looks and feel of your terminal once the tutorial has been applied on your system:
Using Homebrew:
| #!/bin/bash | |
| BGreen='\033[1;32m' | |
| Default='\033[0;m' | |
| podName="" | |
| version="" | |
| podspecFilePath="" | |
| homepage="" | |
| httpsRepo="" |
| #!/bin/bash | |
| # -*- tab-width: 2; encoding: utf-8 -*- | |
| ## @file version_compare | |
| ## Compare [semantic] versions in Bash, comparable to PHP's version_compare function. | |
| # ------------------------------------------------------------------ | |
| ## @author Mark Carver <[email protected]> | |
| ## @copyright MIT | |
| ## @version 1.0.0 | |
| ## @see http://php.net/manual/en/function.version-compare.php |
| #!/bin/bash | |
| # Link: <https://gist.github.com/jellybeansoup/db7b24fb4c7ed44030f4> | |
| # ./update-version.sh --version=1.2.9 --build=95 --target=MonkeyKing | |
| # We use PlistBuddy to handle the Info.plist values. Here we define where it lives. | |
| plistBuddy="/usr/libexec/PlistBuddy" | |
| BGreen='\033[1;32m' | |
| # Parse input variables and update settings. |
| #!/bin/bash | |
| BGreen='\033[1;32m' | |
| Default='\033[0;m' | |
| podName="" | |
| version="" | |
| podspecFilePath="" | |
| homepage="" | |
| httpsRepo="" |
| #Disables ATS in debug builds. | |
| INFOPLIST="${TARGET_BUILD_DIR}"/"${INFOPLIST_PATH}" | |
| case "${CONFIGURATION}" in | |
| "Release"|"Adhoc") | |
| /usr/libexec/PlistBuddy -c "Set :NSAppTransportSecurity:NSAllowsArbitraryLoads NO" "${INFOPLIST}" | |
| ;; | |
| "Debug") | |
| /usr/libexec/PlistBuddy -c "Set :NSAppTransportSecurity:NSAllowsArbitraryLoads YES" "${INFOPLIST}" | |
| ;; | |
| esac |
| func getBrightnessValue(from sampleBuffer: CMSampleBuffer) -> Float { | |
| guard | |
| let metadataDict = CMCopyDictionaryOfAttachments(nil, sampleBuffer, kCMAttachmentMode_ShouldPropagate) as? [String: Any], | |
| let exifMetadata = metadataDict[String(kCGImagePropertyExifDictionary)] as? [String: Any], | |
| let brightnessValue = exifMetadata[String(kCGImagePropertyExifBrightnessValue)] as? Float | |
| else { return 0.0 } | |
| return brightnessValue | |
| } |
| import AVFoundation | |
| public typealias AOIBaseType = AOIBaseProtocol | |
| public protocol AOIBaseProtocol { | |
| associatedtype T | |
| var aoi: T { get } | |
| static var aoi: T.Type { get } | |
| } |