alias xcbuild=$(xcode-select -p)/../SharedFrameworks/XCBuild.framework/Versions/A/Support/xcbuild
# THIS DOESNT WORK YET: xcbuild openIDEConsole # … then switch to Xcode ➡️
xcbuild showSpecs
xcbuild build <foo.pif> [—target <target>]
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
extension Sequence { | |
@warn_unqualified_access | |
public func min<T:Comparable>(by: (Element) throws -> T) rethrows -> Element? { | |
return try self.min { try by($0) < by($1) } | |
} | |
@warn_unqualified_access | |
public func max<T:Comparable>(by: (Element) throws -> T) rethrows -> Element? { | |
return try self.max { try by($0) > by($1) } | |
} | |
} |
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
// | |
// InAppManager.swift | |
// | |
// Created by Ellina Kuznetcova on 12/10/2016. | |
// Copyright © 2016 Flatstack. All rights reserved. | |
// | |
import Foundation | |
import StoreKit |
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
RACSignal* activitySignal = [[RACObserve(self, viewModel.inProgress) map:^id(NSNumber* value) { | |
if (value.boolValue == NO) return [RACSignal return:@""]; | |
return [[RACSignal interval:0.5 onScheduler:[RACScheduler mainThreadScheduler]] | |
scanWithStart:@"." | |
reduce:^id(NSString* previous, id current) { | |
if (previous.length > 2) return @"."; | |
return [previous stringByAppendingString:@"."]; | |
}]; | |
}] switchToLatest]; |
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 'xcodeproj' | |
project = Xcodeproj::Project.new 'SomeProject.xcodeproj' | |
target = project.targets.last | |
build_phase = target.source_build_phase | |
files = build_phase.files | |
settings = { 'COMPILER_FLAGS' => '-fno-objc-arc' } | |
files.each do |f| | |
if f.display_name =~ /Spec/ | |
if f.settings |
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 ruby | |
#This script currently only works if you have your derived data in the default location | |
#First look for a project path as our workspace | |
xcodeWorkspacePath = ENV['XcodeProjectPath'] | |
if xcodeWorkspacePath | |
workspaceName = /([\w\s]+).xcodeproj/.match(xcodeWorkspacePath)[1] | |
#If we don't have a project we have a workspace, check for that and exit with code 1 if that doesn't exist | |
else |