This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open3' | |
stdout, stderr, status = Open3.capture3(*['xcrun', 'xccov', 'view', '--report', '/path.to/result.xcresult', '--json']) | |
puts stdout # => {...} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
headerView.translatesAutoresizingMaskIntoConstraints = false | |
tableView.tableHeaderView = headerView | |
NSLayoutConstraint.activate([ | |
headerView.topAnchor.constraint(equalTo: tableView.topAnchor), | |
headerView.widthAnchor.constraint(equalTo: tableView.widthAnchor), | |
headerView.centerXAnchor.constraint(equalTo: tableView.centerXAnchor)]) | |
tableView.tableHeaderView?.layoutIfNeeded() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
import AVFoundation | |
class ViewController: NSViewController, AVCaptureVideoDataOutputSampleBufferDelegate { | |
private let session = AVCaptureSession() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
view.wantsLayer = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let q = DispatchQueue(label: "q") | |
let group = DispatchGroup() | |
group.enter() | |
q.async { | |
loadA(completion: { | |
// Do something... | |
group.leave() | |
}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct TabView: View { | |
var views: [TabBarItem] | |
@State var selectedIndex: Int = 0 | |
init(_ views: [TabBarItem]) { | |
self.views = views | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lane :sync_bitrise_yml do | |
if !ENV['CI'] | |
next | |
end | |
Dir.chdir("#{ENV['PWD']}") do | |
sh "curl -O -H 'Authorization: token #{ENV['BITRISE_ACCESS_TOKEN']}' 'https://api.bitrise.io/v0.1/apps/#{ENV['BITRISE_APP_SLUG']}/bitrise.yml'" | |
unless system('git diff --quiet --exit-code') | |
sh 'git add bitrise.yml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -exo pipefail | |
PROJECT_ROOT=$(cd $(dirname $0); cd ..; pwd) | |
PODS_ROOT="$PROJECT_ROOT/Pods" | |
PODS_PROJECT="$PODS_ROOT/Pods.xcodeproj" | |
SYMROOT="$PODS_ROOT/Build" | |
(cd "$PROJECT_ROOT"; bundle install --path=vendor/bundle --binstubs=vendor/bin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
platform :ios, '10.3' | |
install! 'cocoapods', integrate_targets: false | |
inhibit_all_warnings! | |
use_modular_headers! | |
target 'Shared' do | |
use_frameworks! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git reset --hard | |
git checkout $1 | |
xcodebuild build -scheme Demo -sdk iphonesimulator -derivedDataPath build | |
xcrun simctl install 89955894-3580-47CE-86FD-5C3E41850418 ~/work/Demo/build/Build/Products/Debug-iphonesimulator/Demo.app | |
xcrun simctl install F28EC412-2D31-4F56-9705-670823B8B554 ~/work/Demo/build/Build/Products/Debug-iphonesimulator/Demo.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -ex | |
bundle install --path=vendor/bundle --binstubs=vendor/bin | |
bundle exec pod install | |
carthage checkout | |
carthage build --no-use-binaries --platform ios --cache-builds BonMot | |
carthage build --no-use-binaries --platform ios --cache-builds bugsnag-cocoa |